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 |
不小心用贪心过了!思路是先对每个队的所要范围(x,y),按x从小到大排序,x相等是y从小到大排序; 然后对每个队,从x->y枚举找出T-shirt最大数目的那个,如果为0就退出; 否则就该数目自减1; 分配到最后,看能否分配好; Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator