| ||||||||||
| 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 | |||||||||
double 型数据比较时注意如果
dis[i][j]=pow(3.0,0.5);
dis[i][k]=pow(3.0,0.5);
那么
if(dis[i][j]==dis[i][j])
{
……
}
if将判断为false,必须写成
if(abs(dis[i][j]-dis[i][k])<0.0000001)
{
……
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator