BOJ 28131 - K-지폐

image.png

그냥 d(i,j)d(i,j)ii 위치에서 경로합을 kk로 나눈 나머지가 jj 일 때 최단경로라고 정의하면 된다.

Tags:

Categories:

Updated:

Comments