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

不小心用贪心过了!

Posted by joy_w at 2009-11-04 20:55:38 on Problem 2584
思路是先对每个队的所要范围(x,y),按x从小到大排序,x相等是y从小到大排序;
然后对每个队,从x->y枚举找出T-shirt最大数目的那个,如果为0就退出;
否则就该数目自减1;
分配到最后,看能否分配好;

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