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

Re:大侠看看呀。。为何过不了啊。。thx+++

Posted by yuech at 2009-12-13 02:58:09 on Problem 2502
In Reply To:大侠看看呀。。为何过不了啊。。thx+++ Posted by:782423381 at 2009-10-20 22:41:06
初始化有点问题。。
for(i=0;i<pos;i++) 
        for(j=i+1;j<pos;j++)
        {
            double xxx=dis2(x[i],y[i],x[j],y[j]);
            if(xxx<d[i][j]) d[i][j]=xxx;
        }
改为for(j=i+1;j<=pos;j++)
{
    double xxx=dis2(x[i],y[i],x[j],y[j]);
            if(xxx<d[i][j]) d[i][j]=d[j][i]=xxx;

}
就对了

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