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 |
这个题目的SPJ很奇怪。。。。。在枚举最远点的时候,这个是WA的 for (i = 0; i < m; ++i) for (j = 0; j < m; ++j) { if (i == j) continue; double dis = getDistance(v[i], v[j]); if (sign(dis - ans) > 0) { ans = dis; a = v[i]; b = v[j]; } } 改成这样就AC了。。。。。我晕 for (i = 0; i < m; ++i) for (j = 0; j < m; ++j) { if (i == j) continue; double dis = getDistance(v[i], v[j]); if (sign(dis - ans) >= 0) { ans = dis; a = v[i]; b = v[j]; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator