[백준_14503] 로봇청소기 python
확실히 시뮬레이션 문제를 풀 때에는, 여러 조건들을 함수화하여 체크하는 것이 좋은 것 같다. # n, m 입력 n, m = map(int, input().split()) # r, c, d입력 r, c ,d = map(int, input().split()) # room 입력 room = [ list(map(int, input().split())) for _ in range(n) ] # 함수들 # all_cleaned_or_wall(x, y): def all_cleaned_or_wall(x, y): dxs, dys = [-1, 1, 0, 0], [0, 0, 1, -1] for dx, dy in zip(dxs, dys): # 주변 위치 nx, ny = x + dx, y + dy # 청소안되어있는 빈칸이 나오면..
2022. 8. 28.