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
- 코딩테스트
- codingtest
- DFS와BFS
- Algorithm
- 개발
- 안드로이드스튜디오
- Vue
- 백준
- BAEKJOON
- DFS
- AndroidStudio
- 알고리즘
- 동적계획법과최단거리역추적
- cos pro
- Flutter
- 코테
- DART
- 분할정복
- 파이썬
- 안드로이드
- cos
- django
- vuejs
- android
- issue
- Python
- 동적계획법
- C++
- cos pro 1급
- 코드품앗이
Archives
- Today
- Total
목록cos 1급 3차 비숍으로부터 도망쳐 python (1)
Development Artist
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/b5G7V6/btruhvRuDzG/hFdiFJOlZbGDWIsqCDRQc1/img.png)
문제 유형 코딩 난이도 hard Note 1. bfs문제 유형. '순회'라는 개념. dxy : 비숍이 갈 수 있는 좌표를 설정. Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean # 3차 3번 def solution(bishops): answer = 0 dxy = [[1,1],[1,-1],[-1,1],[-1,-1]] field = [[0] * 8 for i in range(8)] for bis in bishops: x = ord(bis[0])-65 y = int(bis[1])-1 field[x][y] = 1 for dx, dy in dxy: nx , ny = x, y while True: nx += dx ny += dy if nx >=8 o..
Algorithm/COS
2022. 2. 25. 12:12