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 | 29 | 30 |
Tags
- cos pro
- BAEKJOON
- DFS와BFS
- 안드로이드
- 알고리즘
- DFS
- 동적계획법
- issue
- 백준
- Algorithm
- cos
- Python
- 코딩테스트
- DART
- codingtest
- 안드로이드스튜디오
- 동적계획법과최단거리역추적
- 코드품앗이
- Flutter
- 코테
- 개발
- docker
- C++
- vuejs
- 분할정복
- AndroidStudio
- django
- cos pro 1급
- android
- 파이썬
Archives
- Today
- Total
목록cos 체스의나이트 (1)
Development Artist

문제 유형 코딩 난이도 (주관적인) easy Note 1. dx, dy로 나이트의 이동 경우를 고정하기. bfs에서 자주 쓰이는 방식인데, 원할한 순회를 위해 이런식으로 이동 값을 설정. Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean var_N = 8 dx = [1, 2, 2, 1, -1, -2, -2, -1] dy = [-2, -1, 1, 2, 2, 1, -1, -2] def solution(pos): answer = 0 start_row = int(pos[1]) start_col = ord(pos[0])-65 for i in range(var_N): now_row = start_row + dx[i] now_col = start_col..
Algorithm/COS
2022. 2. 24. 21:36