Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
蒟蒻请教(见内)WA代码片段: ans = INF; pos = 1; for(i=1; i<=n; i++) { t = 0; for(j=1; j<=n; j++) { if(j == i) continue; if(f[i][j] > t) t = f[i][j]; } if(t < ans) { ans = t; pos = i; } } if(ans == INF) printf("disjoint\n"); else printf("%d %d\n",pos,ans); 把上面pos = 1的语句改成pos = 0就AC了! 蒟蒻请教为什么。。 谢谢! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator