10 bool test[100][100][100];
12 ifstream fin ("concom.in");
13 ofstream fout ("concom.out");
16 for (i=0;i<n;i++) { fin>>x>>y>>z; a[x-1][y-1]=z; }
21 if (a[i][k]>50 && i!=j && test[i][j][k]==false) { a[i][j]+=a[k][j]; test[i][j][k]=true; }
28 if (a[i][j]>50 && i!=j) { fout<<i+1<<' '<<j+1<<endl; }