Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Algorithm
- Flutter
- vuejs
- BAEKJOON
- cos
- 코딩테스트
- 파이썬
- django
- android
- 백준
- 코테
- Vue
- 개발
- 알고리즘
- 안드로이드스튜디오
- cos pro
- Python
- DFS
- 동적계획법과최단거리역추적
- 동적계획법
- 안드로이드
- cos pro 1급
- C++
- 코드품앗이
- 분할정복
- AndroidStudio
- codingtest
- issue
- DART
- DFS와BFS
Archives
- Today
- Total
목록cos 1급 6차 꽃피는 봄이 언제 오나요 python (1)
Development Artist

문제 유형 코딩 난이도 normal Note 1. bfs 문제. 백준의 토마토 문제와 유사(?같음.). 2. bfs 문제를 많이 풀어보면, 익숙하다. Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean # bfs, 백준 토마토 문제 from collections import deque dx=[-1,0,1,0] # 좌 우 dy=[0,1,0,-1] # 상 하 queue = deque() def bfs(n, garden): while queue: x,y = queue.popleft() for i in range(4): nx = x + dx[i] ny = y + dy[i] if 0
Algorithm/COS
2022. 2. 28. 17:26