上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页
摘要: Color the BallTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4028 Accepted Submission(s): 999Problem DescriptionThere are infinite balls in a line (numbered 1 2 3 ....), and initially all of them are paint black. Now Jim use a brush paint t... 阅读全文
posted @ 2014-02-26 18:49 偶尔会寂寞 阅读(286) 评论(0) 推荐(0) 编辑
摘要: Color the ballTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7117 Accepted Submission(s): 3688Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a #include#include#include#define MAX 100002#define MAXN 400005using namespace std;str... 阅读全文
posted @ 2014-02-26 10:41 偶尔会寂寞 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 历届试题时间限制:1.0s 内存限制:256.0MB问题描述幸运数是波兰数学家乌拉姆命名的。它采用与生成素数类似的“筛法”生成。首先从1开始写出自然数1,2,3,4,5,6,....1 就是第一个幸运数。我们从2这个数开始。把所有序号能被2整除的项删除,变为:1 _ 3 _ 5 _ 7 _ 9 ....把它们缩紧,重新记序,为:1 3 5 7 9 .... 。这时,3为第2个幸运数,然后把所有能被3整除的序号位置的数删去。注意,是序号位置,不是那个数本身能否被3整除!! 删除的应该是5,11, 17, ...此时7为第3个幸运数,然后再删去序号位置能被7整除的(19,39,...)最后剩下的. 阅读全文
posted @ 2014-02-25 15:47 偶尔会寂寞 阅读(1139) 评论(0) 推荐(1) 编辑
摘要: 历届试题 剪格子 时间限制:1.0s 内存限制:256.0MB问题描述如下图所示,3 x 3 的格子中填写了一些整数。+--*--+--+|10* 1|52|+--****--+|20|30* 1|*******--+| 1| 2| 3|+--+--+--+我们沿着图中的星号线剪开,得到两个部分,每个部分的数字和都是60。本题的要求就是请你编程判定:对给定的m x n 的格子中的整数,是否可以分割为两个部分,使得这两个区域的数字和相等。如果存在多种解答,请输出包含左上角格子的那个区域包含的格子的最小数目。如果无法分割,则输出 0。输入格式程序先读入两个整数 m n 用空格分割 (m,n#in. 阅读全文
posted @ 2014-02-24 22:09 偶尔会寂寞 阅读(309) 评论(0) 推荐(0) 编辑
摘要: Anniversary partyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3861Accepted Submission(s): 1800Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical stru 阅读全文
posted @ 2014-02-23 13:49 偶尔会寂寞 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 历届试题 带分数 时间限制:1.0s 内存限制:256.0MB问题描述100 可以表示为带分数的形式:100 = 3 + 69258 / 714。还可以表示为:100 = 82 + 3546 / 197。注意特征:带分数中,数字1~9分别出现且只出现一次(不包含0)。类似这样的带分数,100 有 11 种表示法。输入格式从标准输入读入一个正整数N (N#includeusing namespace std;bool used[10];int a[10], N, total;void permutation(int pos){ if (pos == 9){ int p = ... 阅读全文
posted @ 2014-02-23 11:10 偶尔会寂寞 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 算法提高 道路和航路 时间限制:1.0s 内存限制:256.0MB问题描述农夫约翰正在针对一个新区域的牛奶配送合同进行研究。他打算分发牛奶到T个城镇(标号为1..T),这些城镇通过R条标号为(1..R)的道路和P条标号为(1..P)的航路相连。每一条公路i或者航路i表示成连接城镇Ai(1Bi的单向通行。实际上,如果现在有一条航路是从Ai到Bi的话,那么意味着肯定没有通行方案从Bi回到Ai。农夫约翰想把他那优良的牛奶从配送中心送到各个城镇,当然希望代价越小越好,你可以帮助他嘛?配送中心位于城镇S中(1#include#include#include#include#define MAXT 25. 阅读全文
posted @ 2014-02-23 10:11 偶尔会寂寞 阅读(793) 评论(4) 推荐(1) 编辑
摘要: Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 60673Accepted Submission(s): 16589Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, 阅读全文
posted @ 2014-02-22 09:08 偶尔会寂寞 阅读(250) 评论(0) 推荐(0) 编辑
摘要: Can you solve this equation?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6753Accepted Submission(s): 3151Problem DescriptionNow,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try yo 阅读全文
posted @ 2014-02-21 21:59 偶尔会寂寞 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 小希的迷宫Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22191Accepted Submission(s): 6791Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提 阅读全文
posted @ 2014-02-21 21:09 偶尔会寂寞 阅读(514) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页