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 |
变态int check(__int64 mid) { int i; __int64 total,tmp,v; total=(__int64)(m*mid); for(i=1;i<=n;i++) { v=a[i]-mid; if(v<=0) continue; if(v%water) tmp=(v/water)+1; else tmp=v/water; if(tmp>mid) return 0; total-=tmp; if(total<0) return 0; } return 1; } 能过 下面的始终wa。。。。 int check() { int i; __int64 total,tmp,v; total=(__int64)(m*mid); for(i=1;i<=n;i++) { v=a[i]-mid; if(v<=0) continue; if(v%water) tmp=(v/water)+1; else tmp=v/water; if(tmp>mid) return 0; total-=tmp; if(total<0) return 0; } return 1; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator