1938
-
백준 1938번 통나무 옮기기PS 2020. 2. 19. 13:28
https://www.acmicpc.net/problem/1938 1938번: 통나무 옮기기 첫째 줄에 주어진 평지의 한 변의 길이 N이 주어진다. (4= n || tb.y = n || tb.x = n || tc.y = n || tc.x = n) continue; if (visit[tb.y][tb.x][ts] || map[ta.y][ta.x] == 1 || map[tb.y][tb.x] == 1 || map[tc.y][tc.x] == 1) continue; q.push({ ta, tb, tc, ts, time + 1 }); visit[tb.y][tb.x][ts] = true; } } return -1; } int ..