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 yygy at 2012-10-19 10:14:12 on Problem 1968
一个人去分册子,分册子的学校顺序是按0,1,2,3,。。。,n-1号学校这样的分的
然后还有一个条件就是前面学校分到的册子数目是m/n+1,后面学校分到的是m/n
总的加起来要等于m本册子,那么可以得出分m/n+1本册子的学校数目是n-m%n
然后前面学校分到的每一本册子里面页数一定要小于后面学校分到的。
从下面这一句话可以看出来。我刚开始理解成了总和要小于后面的。汗。
Any bookflet A that is distributed to a school S_i must have fewer or at most an equal number of pages that any other booklet B that is distributed to a school S_j, if S_i gets the booklets before S_j (i.e if i < j then pages(A) <= pages(B)).
每一个学校分到的册子要按照原来题目输入的顺序排好,最后,输出指定学校分到的第一本册子。
学校编号从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