문제 링크 : https://www.acmicpc.net/problem/11403 #include #include using namespace std; int N, via[101][101]; int main(){//inputcin>>N;for(int i=0; ivia[i][j];}} //calcfor (int k = 0; k < N; k++) {for (int i = 0; i < N; i++) {for (int j = 0; j < N; j++) {if (via[i][k] == 1 && via[k][j] == 1) {via[i][j] = 1;}}}}//outputfor(int i=0; i