[백준 / Python] 2206번 벽 부수고 이동하기
문제https://www.acmicpc.net/problem/2206 소스코드import sys from collections import dequeimport pprintn, m = map(int, input().split())mapdata = []for _ in range(n): mapdata.append(list(sys.stdin.readline().rstrip()))visit = [[[0] * 2 for _ in range(m)] for _ in range(n)]xp = [1, -1, 0, 0]yp = [0, 0, 1, -1]queue = deque()queue.append([0, 0, 0])answer = -1visit[0][0][0] = 1# print(len(mapdata), len..
2024. 8. 21.
[백준 / Python] 14370번 전화번호 수수께끼 (Large)
문제https://www.acmicpc.net/problem/14370코드import sysinput = sys.stdin.readline n = int(input())data = { 'A':0, 'B':0, 'C':0, 'D':0, 'E':0, 'F':0, 'G':0, 'H':0, 'I':0, 'J':0, 'K':0, 'L':0, 'M':0, 'N':0, 'O':0, 'P':0, 'Q':0, 'R':0, 'S':0, 'T':0, 'U':0, 'V':0, 'W':0, 'X':0, 'Y':0, 'Z':0}for i in range(n): answerlist = [..
2024. 5. 16.