Skip to content

Commit

Permalink
Update 23258.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
encrypted-def authored Mar 9, 2024
1 parent 9abc07a commit 6fa6bac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 0x1C/solutions/23258.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ int main(void){
cin.tie(0);

cin >> N >> Q;

for(int i=1; i<=N; i++)
for(int j=1; j<=N; j++){
cin >> D[0][i][j];
if(D[0][i][j]==0 && i!=j) // i!=j 인데 0을 입력 받은 경우 문제에서 준 최대 크기보다 큰 값으로 대입
D[0][i][j] = 180000;
}

// 3차원 배열 D의 첫 인덱스는 1, 2, ..., i번 도시까지 거쳐 갈 수 있을 때의 최소 거리값을 뜻함
// 즉, D[i][s][e] 는 중간 도시의 번호가 i 이하임을 보장하면서 s 부터 e 까지 도달하는 거리의 최솟값이다.
for(int i=1; i<=N; i++)
Expand Down

0 comments on commit 6fa6bac

Please sign in to comment.