| ||||||||||
| 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 | |||||||||
贪心DP。。 for(int i=1;i<=N;i++)
{
f[i]=0x7fffffff;
for(int j=i-1;j>=max(0,i-100);j--){
delta=a[ i ].e-a[ j+1 ].b;
f[i]=min(f[i],f[j]+( delta /L)+(delta%L!=0));
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator