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

Re:请大牛讲解一下这个题是什么意思,搞半没读懂啊???

Posted by 074100215 at 2009-12-01 23:04:13 on Problem 1010
In Reply To:Re:请大牛讲解一下这个题是什么意思,搞半没读懂啊??? Posted by:074100215 at 2009-12-01 22:56:26
举个例子吧,第一个
就是有三种面值的邮票:1 2 3;0是结束标志
有两个人要买,邮票面值加起来分别是: 7 4; 0是结束标志
邮票总数不可以超出4
对7来说:1+1+2+3=7,也就是两个1邮票,一个2邮票,一个3邮票
输出时,先输出7
       在输出邮票种数:3种
        将组成序列写出:1 1 2 3
如果有两种情况种数相同,那总票数少的更优
如果总有票数也相同,那么最大值较大的更优
如果最大值也相同,那么输出tie
如果不可组成,输出none
注意一下格式就好了
我用暴力做得,就是讨论各种情况
将近5KB的代码,但时间是0MS,你可以试一下

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