摘要: 题目描述 乔治有一些同样长的小木棍,他把这些木棍随意砍成几段,直到每段的长都不超过50。 现在,他想把小木棍拼接成原来的样子,但是却忘记了自己开始时有多少根木棍和它们的长度。 给出每段小木棍的长度,编程帮他找出原始木棍的最小可能长度。 输入输出格式 输入格式: 输入文件共有二行。 第一行为一个单独的 阅读全文
posted @ 2018-03-08 16:03 planche 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目描述 现有n个砝码,重量分别为a1,a2,a3,……,an,在去掉m个砝码后,问最多能称量出多少不同的重量(不包括0)。 输入输出格式 输入格式: 输入文件weight.in的第1行为有两个整数n和m,用空格分隔 第2行有n个正整数a1,a2,a3,……,an,表示每个砝码的重量。 输出格式: 阅读全文
posted @ 2018-03-08 15:08 planche 阅读(371) 评论(0) 推荐(0) 编辑
摘要: During the final part of fashion show all models come to the stage and stay in one row and fashion designer stays to right to model on the right. Duri 阅读全文
posted @ 2018-03-08 14:08 planche 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Masha's little brother draw two points on a sheet of paper. After that, he draws some circles and gave the sheet to his sister. Masha has just returne 阅读全文
posted @ 2018-03-08 14:07 planche 阅读(197) 评论(0) 推荐(0) 编辑
摘要: There are two main kinds of events in the life of top-model: fashion shows and photo shoots. Participating in any of these events affects the rating o 阅读全文
posted @ 2018-03-08 14:04 planche 阅读(484) 评论(0) 推荐(0) 编辑
摘要: 题目描述 N个人坐成一圈玩游戏。一开始我们把所有玩家按顺时针从1到N编号。首先第一回合是玩家1作为庄家。每个回合庄家都会随机(即按相等的概率)从卡牌堆里选择一张卡片,假设卡片上的数字为X,则庄家首先把卡片上的数字向所有玩家展示,然后按顺时针从庄家位置数第X个人将被处决即退出游戏。然后卡片将会被放回卡 阅读全文
posted @ 2018-03-08 14:00 planche 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 题目描述 轮状病毒有很多变种。许多轮状病毒都是由一个轮状基产生。一个n轮状基由圆环上n个不同的基原子和圆心的一个核原子构成。2个原子之间的边表示这2个原子之间的信息通道,如图1。 n轮状病毒的产生规律是在n轮状基中删除若干边,使各原子之间有唯一一条信息通道。例如,共有16个不同的3轮状病毒,入图2所 阅读全文
posted @ 2018-03-08 14:00 planche 阅读(101) 评论(0) 推荐(0) 编辑