[백준/BOJ] 백준 5873번 : Distant Pastures
https://www.acmicpc.net/problem/5873 5873번: Distant Pastures Farmer John's farm is made up of an N x N grid of pastures, where each pasture contains one of two different types of grass. To specify these two types of grass, we use the characters ( and ), so for example FJ's farm might look like the following grid: (( www.acmicpc.net 각 위치를 노드로 다루어, 노드 번호[0 ~ n*n-1]를 부여하고, 이를 통해 플로이드 와샬로 최단 거리 비용을 ..
2023.10.25