문제 링크입니다: https://www.acmicpc.net/problem/2098http://jaimemin.tistory.com/365와 비슷한 문제였습니다.다른점은 다시 해당 도시로 돌아오는 경로도 더해줘야하고 (i,j)와 (j,i)가 대칭이 아니라는 점이였습니다. #include #include #include //memset using namespace std; const int MAX = 16; const int INF = 987654321; int N; int W[MAX][MAX]; int cache[MAX][1 W[i][j]; int result = INF; memset(cache, -1, sizeof(cache)); cout