| ||||||||||
| 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 | |||||||||
不要动不动就怀疑数据In Reply To:我觉得这个题的官方测试可能有问题,理由如下: Posted by:lbp at 2005-09-16 13:34:11 > //在下面的部分代码段中,饱含在下面的帖子中
> if( fish==max_fish )
> {
> for(i=1;i<=n;i++)
> if(best_t[i] <=tt[i])//奇怪之处:改成best_t[i] <tt[i]就过不了!!!!
> break;
> if(i != n+1)
> {
> for(i=1;i<=n;i++)best_t[i] = tt[i];
> max_fish = fish;
> }
> }
> 实际上,不管best_t[i] <tt[i] 还是best_t[i] <=tt[i];紧接的break;必然要被执行;所以下面的i!=n+1必然为真,,,也就是best_t[i] <tt[i]与best_t[i] <=tt[i]在这 是等效的,然而系统作出截然不同的判断,,所以我觉得系统有问题。。。如果我错了,还希望大家指教。。。
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator