백준 15261 Donut Drone (CERC 2017 D)
문제 설명(링크): https://www.acmicpc.net/problem/15261 15261번: Donut Drone The first line contains two integers r and c (3 ≤ r, c ≤ 2 000) — the number of rows and the number of columns of the toroidal grid. The i-th of the following r lines contains a sequence of c integers ei,1, ei,2, . . . , ei,c (1 ≤ ei,j ≤ 109) — www.acmicpc.net 문제 요약 도넛처럼 생긴 격자판에서 각각의 높이가 있는데, 한 칸에서 시작할 때 다음으로 갈 칸은 왼쪽 위, 왼쪽, 왼쪽 ..