| ||||||||||
| 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:IO吧,不知怎么的mingw的IO就是慢…… Posted by:frkstyc at 2007-09-23 15:44:46 2S时限,原先G++ TLE而C++ 225MS AC:
for (res=i=0;i<=n;i++)
if (a[i]>d) res+=(a[i]-2)/(d-1);
改成下面这样 G++ 991MS AC:
for (res=i=0;i<=n;i++)
{
if (a[i]<=d) continue;
res+=(a[i]-2)/(d-1);
}
真奇怪!!continue在G++能够使if加速一倍?
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator