Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

这个题目的SPJ很奇怪。。。。。

Posted by tutest at 2009-05-24 22:50:35 on Problem 3384
在枚举最远点的时候,这个是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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator