05 2015 档案

摘要:Time Limit: 15000MSMemory Limit: 65536KTotal Submissions: 5268Accepted: 1896DescriptionAndy the smart computer science student was attending an algori... 阅读全文
posted @ 2015-05-30 09:54 ALXPCUN 阅读(129) 评论(0) 推荐(0)
摘要:跨越千年的RSA算法【转】http://www.matrix67.com/blog/archives/5100数论,数学中的皇冠,最纯粹的数学。早在古希腊时代,人们就开始痴迷地研究数字,沉浸于这个几乎没有任何实用价值的思维游戏中。直到计 算机诞生之后,几千年来的数论研究成果突然有了实际的应用,这个过... 阅读全文
posted @ 2015-05-28 14:10 ALXPCUN 阅读(231) 评论(0) 推荐(0)
摘要:【转】http://blog.chinaunix.net/uid-21411227-id-1826986.html一.逻辑运算符 1.& 位与运算 1) 运算规则 位与运算的实质是将参与运算的两个数据,按对应的二进制数逐位进行逻辑与运算。例如:int型常量4和7进行位与运算的运算过程如下:4=0... 阅读全文
posted @ 2015-05-28 11:54 ALXPCUN 阅读(190) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 5158Accepted: 2844DescriptionThe ICPC committee would like to have its meeting as soon as pos... 阅读全文
posted @ 2015-05-28 11:41 ALXPCUN 阅读(123) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 13500Accepted: 6968DescriptionBulls are so much better at math than the cows. They can multip... 阅读全文
posted @ 2015-05-28 11:22 ALXPCUN 阅读(122) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10333Accepted: 6118DescriptionFor any even number n greater than or equal to 4, there exists ... 阅读全文
posted @ 2015-05-28 11:02 ALXPCUN 阅读(149) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 33998Accepted: 19786DescriptionFJ is surveying his herd to find the most average cow. He want... 阅读全文
posted @ 2015-05-28 10:18 ALXPCUN 阅读(123) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 14681Accepted: 5153DescriptionStan and Ollie are playing a guessing game. Stan thinks of a nu... 阅读全文
posted @ 2015-05-28 10:13 ALXPCUN 阅读(220) 评论(0) 推荐(0)
摘要:Time Limit: 5000MSMemory Limit: 65536KTotal Submissions: 9175Accepted: 5548DescriptionThe look and say sequence is defined as follows. Start with any ... 阅读全文
posted @ 2015-05-28 10:03 ALXPCUN 阅读(174) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 25736Accepted: 8605DescriptionThe digital root of a positive integer is found by summing the ... 阅读全文
posted @ 2015-05-28 09:21 ALXPCUN 阅读(112) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 16053Accepted: 8786DescriptionThe Antique Comedians of Malidinesia prefer comedies to tragedi... 阅读全文
posted @ 2015-05-28 09:01 ALXPCUN 阅读(181) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 131072KTotal Submissions: 9915Accepted: 6276DescriptionOur vicar raised money to have the church clock repaired for se... 阅读全文
posted @ 2015-05-28 08:19 ALXPCUN 阅读(123) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 10509Accepted: 6786DescriptionThere is a board with 100 * 100 grids as shown below. The left-... 阅读全文
posted @ 2015-05-28 08:01 ALXPCUN 阅读(147) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 17778Accepted: 10871DescriptionEva的家庭作业里有很多数列填空练习。填空练习的要求是:已知数列的前四项,填出第五项。因为已经知道这些数列只可能是等差或等比... 阅读全文
posted @ 2015-05-28 07:49 ALXPCUN 阅读(174) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 29241Accepted: 12136DescriptionYou have devised a new encryption technique which encodes a me... 阅读全文
posted @ 2015-05-28 07:41 ALXPCUN 阅读(159) 评论(0) 推荐(0)
摘要:描述栈是常用的一种数据结构,有n令元素在栈顶端一侧等待进栈,栈顶端另一侧是出栈序 列。你已经知道栈的操作有两·种:push和pop,前者是将一个元素进栈,后者是将栈顶元素弹出。现在要使用这两种操作,由一个操作序列可以得到一系列 的输出序列。请你编程求出对于给定的n,计算并输出由操作数序列1,2,…,... 阅读全文
posted @ 2015-05-27 11:38 ALXPCUN 阅读(273) 评论(0) 推荐(0)
摘要:描述人类终于登上了火星的土地并且见到了神秘的火星人。人类和火星人都无法理解对方的语 言,但是我们的科学家发明了一种用数字交流的方法。这种交流方法是这样的,首先,火星人把一个非常大的数字告诉人类科学家,科学家破解这个数字的含义后, 再把一个很小的数字加到这个大数上面,把结果告诉火星人,作为人类的回答。... 阅读全文
posted @ 2015-05-27 10:59 ALXPCUN 阅读(209) 评论(0) 推荐(0)
摘要:描述我们可以把由“0”和“1”组成的字符串分为三类:全“0”串称为B串,全“1”串称为I串,既含“0”又含“1”的串则称为F串。FBI树是一种二叉树1,它的结点类型也包括F结点,B结点和I结点三种。由一个长度为2^N的“01”串S可以构造出一棵FBI树T,递归的构造方法如下:1) T的根结点为R,其... 阅读全文
posted @ 2015-05-27 10:27 ALXPCUN 阅读(193) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 13771Accepted: 7502DescriptionThe GeoSurvComp geologic survey company is responsible for dete... 阅读全文
posted @ 2015-05-27 09:58 ALXPCUN 阅读(116) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 16905Accepted: 5082DescriptionA sequence of n > 0 integers is called a jolly jumper if the ab... 阅读全文
posted @ 2015-05-27 09:07 ALXPCUN 阅读(159) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 19986Accepted: 8058DescriptionMany graduate students of Peking University are living in Wanli... 阅读全文
posted @ 2015-05-27 08:33 ALXPCUN 阅读(180) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 30000KTotal Submissions: 20776Accepted: 7278Case Time Limit: 1000MSDescriptionFarmer John and Betsy are playing a game... 阅读全文
posted @ 2015-05-27 07:33 ALXPCUN 阅读(119) 评论(0) 推荐(0)
摘要:Problem DescriptionClaire and her little friend, ykwd, are travelling in Shevchenko's Park! The park is beautiful - but large, indeed. N feature spots... 阅读全文
posted @ 2015-05-27 07:30 ALXPCUN 阅读(126) 评论(0) 推荐(0)
摘要:描述一年一度的xuzhenyiOI2006在风景如画的大同中学举行。按照以往惯例, 在激烈的比赛过程后,选手们会应邀去风景名胜区游览。今年当然也不例外。为了确定一条最佳的旅游路线,组委会请各位选手编一程序帮忙寻找。假设所有的风景 点都集中在一个C列R行的矩阵中,矩阵的每一元素代表风景点或者障碍物。现... 阅读全文
posted @ 2015-05-27 07:25 ALXPCUN 阅读(349) 评论(0) 推荐(0)
摘要:描述对于一个递归函数w(a,b,c)如果a20 or b>20 or c>20就返回w(20,20,20)如果a#include #include #define REP(i, s, n) for(int i = s; i = s; i --)#define MAX_N 20 + 10using n... 阅读全文
posted @ 2015-05-26 13:17 ALXPCUN 阅读(173) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 5513Accepted: 2495DescriptionA set of n 1-dimensional items have to be packed in identical bi... 阅读全文
posted @ 2015-05-26 08:28 ALXPCUN 阅读(143) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 25081Accepted: 13539DescriptionThere is a rectangular room, covered with square tiles. Each t... 阅读全文
posted @ 2015-05-26 08:02 ALXPCUN 阅读(123) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 14344Accepted: 7524DescriptionFor hundreds of years Fermat's Last Theorem, which stated simpl... 阅读全文
posted @ 2015-05-26 07:42 ALXPCUN 阅读(164) 评论(0) 推荐(0)
摘要:DescriptionBessie正在计划一年一度的奶牛大集会,来自全国各地的奶牛将 来参加这一次集会。当然,她会选择最方便的地点来举办这次集会。每个奶牛居住在 N(1 tot) 时,ans才会减小。然后就没有然后了。CODE:#include #include #include #define R... 阅读全文
posted @ 2015-05-25 15:54 ALXPCUN 阅读(204) 评论(0) 推荐(0)
摘要:DescriptionFJ 打算带着他可爱的N (1 ≤ N ≤ 2,000)头奶牛去参加”年度最佳老农”的比赛.在比赛中,每个农夫把他的奶牛排成一列,然后准备经过评委检验. 比赛中简单地将奶牛的名字缩写为其头字母(the initial letter of every cow),举个例子,FJ带了... 阅读全文
posted @ 2015-05-25 13:42 ALXPCUN 阅读(245) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 17966Accepted: 8681DescriptionWrite a program to read four lines of upper case (i.e., all CAP... 阅读全文
posted @ 2015-05-25 11:40 ALXPCUN 阅读(188) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12828Accepted: 8839DescriptionYou are the CEO of Nasty Hacks Inc., a company that creates sma... 阅读全文
posted @ 2015-05-25 11:25 ALXPCUN 阅读(161) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 23668Accepted: 12945DescriptionJulius Caesar lived in a time of danger and intrigue. The hard... 阅读全文
posted @ 2015-05-25 11:15 ALXPCUN 阅读(161) 评论(0) 推荐(0)
摘要:ime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 34320Accepted: 11688DescriptionBackgroundThe knight is getting bored of seeing the same black ... 阅读全文
posted @ 2015-05-25 10:56 ALXPCUN 阅读(144) 评论(0) 推荐(0)
摘要:背景在峰会期间,武装部队得处于高度戒备。警察将监视每一条大街,军队将保卫建筑物,领 空将布满了F-2003飞机。此外,巡洋船只和舰队将被派去保护海岸线。不幸的是因为种种原因,国防海军部仅有很少的几位军官能指挥大型海战。因此,他们 考虑培养一些新的海军指挥官,他们选择了“海战”游戏来帮助学习。描述在这... 阅读全文
posted @ 2015-05-25 10:37 ALXPCUN 阅读(300) 评论(0) 推荐(0)
摘要:描述N个盒子排成一行(1#include #include #define REP(i, s, n) for(int i = s; i = s; i --)#define MAX_N 20using namespace std;typedef unsigned long long ULL;int m... 阅读全文
posted @ 2015-05-25 10:33 ALXPCUN 阅读(263) 评论(0) 推荐(0)
摘要:描述整数分解(版本2)一个正整数可以分解成若干个自然数之和。请你编一个程序,对于给出的一个正整数n(1 3 时, 我们发现应该把数拆成尽量多的2和3的和,因为大于2,3的数拆成2,3乘积都别拆成别的大,就算是4也只是与2 * 2等价(4 = 2 + 2), 不会使答案更优。CODE:#include... 阅读全文
posted @ 2015-05-25 09:08 ALXPCUN 阅读(385) 评论(0) 推荐(0)
摘要:描述13号又是一个星期五。13号在星期五比在其他日子少吗?为了回答这个问题,写一个程序,要求计算每个月的十三号落在周一到周日的次数。给出N年的 一个周期,要求计算1900年1月1日至1900+N-1年12月31日中十三号落在周一到周日的次数,N为正整数且不大于400.注意,开始今年是一千九百年,不是... 阅读全文
posted @ 2015-05-25 08:22 ALXPCUN 阅读(424) 评论(0) 推荐(0)
摘要:描述 对于一群(NP个)要互送礼物的朋友,GY要确定每个人送出的钱比收到的多多少。 在这一个问题中,每个人都准备了一些钱来送礼物,而这些钱将会被平均分给那些将收到他的礼物的人。 然而,在任何一群朋友中,有些人将送出较多的礼物(可能是因为有较多的朋友),有些人有准备了较多的钱。 给出一群朋友,没有人的... 阅读全文
posted @ 2015-05-25 08:18 ALXPCUN 阅读(283) 评论(0) 推荐(0)
摘要:描述众所周知,在每一个彗星后都有一只UFO。这些UFO时常来收集地球上的忠诚支持者。不幸的是,他们的飞碟每次出行都只能带上一组支持者。因此,他们要用 一种聪明的方案让这些小组提前知道谁会被彗星带走。他们为每个彗星起了一个名字,通过这些名字来决定这个小组是不是被带走的那个特定的小组(你认为是谁给 这些... 阅读全文
posted @ 2015-05-25 08:16 ALXPCUN 阅读(264) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 22932Accepted: 11567DescriptionDue to recent rains, water has pooled in various places in Far... 阅读全文
posted @ 2015-05-24 20:40 ALXPCUN 阅读(142) 评论(0) 推荐(0)
摘要:描述xiaomengxian一进门,发现外公、外婆、叔叔、阿姨……都坐在客厅里等着 他呢。经过仔细观察,xiaomengxian发现他们所有人正好组成了一个凸多边形。最重要的是,他们每个人手里都拿着一个红包(^o^)。于是非常心 急,xiaomengxian决定找一条最短的路线,拿到所有的红包。假设... 阅读全文
posted @ 2015-05-24 19:02 ALXPCUN 阅读(307) 评论(0) 推荐(0)
摘要:描述小菜最近在学数的数字数字特征,因此他打算编程来研究一下这个问题.他的问题很简单,输入一个数N(1000#include #include #define REP(i, s, n) for(int i = s; i = s; i --)#define MAX_N 50using namespace... 阅读全文
posted @ 2015-05-24 15:36 ALXPCUN 阅读(185) 评论(0) 推荐(0)
摘要:背景平面上有N个圆柱形的大钉子,半径都为R,所有钉子组成一个凸多边形。现在你要用一条绳子把这些钉子围起来,绳子直径忽略不计。描述求出绳子的长度格式输入格式第1行两个数:整数N(1#include #include #include #define REP(i, s, n) for(int i = s... 阅读全文
posted @ 2015-05-24 15:12 ALXPCUN 阅读(433) 评论(0) 推荐(0)
摘要:描述这次,OI山成为了雷曼兔那无尽的冒险传说的新舞台!传说OI山中埋藏着巨大的宝藏,伴随着这个传说的是一个迷题:最瑰丽的舞者将达至精灵世界的彼岸…… 经过仔细推敲,雷曼兔发现这是一个提示宝藏埋藏位置的谜语,在该谜语中指出了一个特定的路径,只有经过了该路径宝藏才会出现,具体情况如下: OI... 阅读全文
posted @ 2015-05-24 14:43 ALXPCUN 阅读(219) 评论(0) 推荐(0)
摘要:描述今天是情人节的前一天,小杉还在电影院打工(惨啊…)。老板很懂得情人节的情调,要小杉提前做好准备,那么现在给小杉的任务是对电影院的座椅上色。电影院总共n+1行m+1列的椅子排成一个矩阵。第一行的椅子已经全部上了粉红色,第一列从第二个开始的椅子已经全部上了天蓝色。一个可爱的上色方案应该满足除了第一行... 阅读全文
posted @ 2015-05-23 18:50 ALXPCUN 阅读(172) 评论(0) 推荐(0)
摘要:背景问世间,青春期为何物?答曰:“甲亢,甲亢,再甲亢;挨饿,挨饿,再挨饿!”描述正处在某一特定时期之中的李大水牛由于消化系统比较发达,最近一直处在饥饿的状态中。某日上课,正当他饿得头昏眼花之时,眼前突然闪现出了一个n*m(n and m#include #include #include #defi... 阅读全文
posted @ 2015-05-23 18:31 ALXPCUN 阅读(235) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 21730Accepted: 13614DescriptionThe king pays his loyal knight in gold coins. On the first day... 阅读全文
posted @ 2015-05-22 10:54 ALXPCUN 阅读(117) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10646Accepted: 5645DescriptionThe database of the Pentagon contains a top-secret information.... 阅读全文
posted @ 2015-05-22 09:14 ALXPCUN 阅读(92) 评论(0) 推荐(0)
摘要:背景怪盗基德 VS OIBH第三话描述怪盗基德第三次来到熟悉的OIBH总部。屡屡失败的OIBH这次看守的是The Eye of Moon。还是那个房间,还是那扇门,不同的是OIBH对密码锁进行了改进。这次屏幕上只显示一个数n(基德:这是改进了还是退化了?)。密码生成方法:设集合A中A={1,2,..... 阅读全文
posted @ 2015-05-22 08:44 ALXPCUN 阅读(174) 评论(0) 推荐(0)
摘要:Unhappy JinjinTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10819Accepted: 7916DescriptionJinjin is a junior school student. Besides the cl... 阅读全文
posted @ 2015-05-22 08:13 ALXPCUN 阅读(137) 评论(0) 推荐(0)
摘要:Above AverageTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 15028Accepted: 7875DescriptionIt is said that 90% of frosh expect to be above av... 阅读全文
posted @ 2015-05-22 08:01 ALXPCUN 阅读(131) 评论(0) 推荐(0)
摘要:The TriangleTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 40041Accepted: 24119Description73 88 1 02 7 4 44 5 2 6 5(Figu... 阅读全文
posted @ 2015-05-22 07:42 ALXPCUN 阅读(131) 评论(0) 推荐(0)
摘要:QuicksumTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 14812Accepted: 10322DescriptionA checksum is an algorithm that scans a packet of data... 阅读全文
posted @ 2015-05-21 15:46 ALXPCUN 阅读(163) 评论(0) 推荐(0)
摘要:Herd SumsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 16500Accepted: 9750DescriptionThe cows in farmer John's herd are numbered and brande... 阅读全文
posted @ 2015-05-21 15:38 ALXPCUN 阅读(115) 评论(0) 推荐(0)
摘要:DoublesTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 19905Accepted: 11516DescriptionAs part of an arithmetic competency program, your stude... 阅读全文
posted @ 2015-05-21 14:51 ALXPCUN 阅读(152) 评论(0) 推荐(0)
摘要:The Seven Percent SolutionTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7529Accepted: 5047DescriptionUniform Resource Identifiers (or URIs)... 阅读全文
posted @ 2015-05-21 12:04 ALXPCUN 阅读(144) 评论(0) 推荐(0)
摘要:Cow MultiplicationTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12181Accepted: 8485DescriptionBessie is tired of multiplying pairs of numbe... 阅读全文
posted @ 2015-05-21 11:47 ALXPCUN 阅读(141) 评论(0) 推荐(0)
摘要:HangoverTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 108445Accepted: 52837DescriptionHow far can you make a stack of cards overhang a tabl... 阅读全文
posted @ 2015-05-21 11:40 ALXPCUN 阅读(145) 评论(0) 推荐(0)
摘要:滑雪Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 81652Accepted: 30495DescriptionMichael 喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你... 阅读全文
posted @ 2015-05-21 11:23 ALXPCUN 阅读(149) 评论(0) 推荐(0)