| ||||||||||
| 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 | |||||||||
Re:大侠看看呀。。为何过不了啊。。thx+++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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator