Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

贪心DP。。

Posted by lqp18_31 at 2009-08-22 10:27:10 on Problem 2437
	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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator