OpenJudge 2786 Pell数列
摘要:1.链接地址:http://bailian.openjudge.cn/practice/27862.题目:总Time Limit:3000msMemory Limit:65536kBDescriptionPell数列a1, a2, a3, ...的定义是这样的,a1 = 1, a2 = 2, ... , an = 2 * an − 1 + an - 2 (n > 2)。给出一个正整数k,要求Pell数列的第k项模上32767是多少。Input第1行是测试数据的组数n,后面跟着n行输入。每组测试数据占1行,包括一个正整数k (1 ≤ k 2 #include 3 4 #define MAX
阅读全文
posted @
2014-03-06 15:06
mobileliker
阅读(538)
推荐(0)
OpenJudge/Poj 2027 No Brainer
摘要:1.链接地址:http://bailian.openjudge.cn/practice/2027http://poj.org/problem?id=20272.题目:总Time Limit:1000msMemory Limit:65536kBDescriptionZombies love to eat brains. Yum.InputThe first line contains a single integer n indicating the number of data sets. The following n lines each represent a data set. Eac
阅读全文
posted @
2014-03-06 14:51
mobileliker
阅读(185)
推荐(0)
OpenJudge 2773 2726 2727 采药
摘要:1.链接地址:http://bailian.openjudge.cn/practice/2773/http://bailian.openjudge.cn/practice/2726/http://bailian.openjudge.cn/practice/2727/2.题目:总Time Limit:1000msMemory Limit:65536kBDescription辰辰是个很有潜能、天资聪颖的孩子,他的梦想是称为世界上最伟大的医师。为此,他想拜附近最有威望的医师为师。医师为了判断他的资质,给他出 了一个难题。医师把他带到个到处都是草药的山洞里对他说:“孩子,这个山洞里有一些不同的草药,采
阅读全文
posted @
2014-03-06 14:43
mobileliker
阅读(371)
推荐(0)
OpenJudge/Poj 2013 Symmetric Order
摘要:1.链接地址:http://bailian.openjudge.cn/practice/2013http://poj.org/problem?id=20132.题目:Symmetric OrderTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 11793Accepted: 7181DescriptionIn your job at Albatross Circus Management (yes, it's run by a bunch of clowns), you have just finished writing
阅读全文
posted @
2014-03-06 12:24
mobileliker
阅读(196)
推荐(0)
OpenJudge/Poj 1088 滑雪
摘要:1.链接地址:bailian.openjudge.cn/practice/1088http://poj.org/problem?id=10882.题目:总Time Limit:1000msMemory Limit:65536kBDescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个 区域中最长的滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714...
阅读全文
posted @
2014-03-06 11:24
mobileliker
阅读(252)
推荐(0)
OpenJudge/Poj 2001 Shortest Prefixes
摘要:1.链接地址:http://bailian.openjudge.cn/practice/2001http://poj.org/problem?id=20012.题目:Shortest PrefixesTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 12208Accepted: 5210DescriptionA prefix of a string is a substring starting at the beginning of the given string. The prefixes of "carbon&q
阅读全文
posted @
2014-03-04 21:53
mobileliker
阅读(231)
推荐(0)
OpenJudge 2795 金银岛
摘要:1.链接地址:http://bailian.openjudge.cn/practice/2795/2.题目:总Time Limit:3000msMemory Limit:65536kBDescription某天KID利用飞行器飞到了一个金银岛上,上面有许多珍贵的金属,KID虽然更喜欢各种宝石的艺术品,可是也不拒绝这样珍贵的金属。但是他只带着一个口袋,口袋至多只能装重量为w的物品。岛上金属有s个种类, 每种金属重量不同,分别为n1, n2, ... , ns,同时每个种类的金属总的价值也不同,分别为v1,v2, ..., vs。KID想一次带走价值尽可能多的金属,问他最多能带走价值多少的金属。注
阅读全文
posted @
2014-03-04 21:42
mobileliker
阅读(444)
推荐(0)
OpenJudge/Poj 2000 Gold Coins
摘要:1.链接地址:http://bailian.openjudge.cn/practice/2000http://poj.org/problem?id=20002.题目:总Time Limit:1000msMemory Limit:65536kBDescriptionThe king pays his loyal knight in gold coins. On the first day of his service, the knight receives one gold coin. On each of the next two days (the second and third day
阅读全文
posted @
2014-03-02 22:20
mobileliker
阅读(207)
推荐(0)
OpenJudge 2979 陪审团的人选 / Poj 1015 Jury Compromise
摘要:1.链接地址:http://bailian.openjudge.cn/practice/2979http://poj.org/problem?id=10152.题目:总Time Limit:1000msMemory Limit:65536kBDescription在遥远的国家佛罗布尼亚,嫌犯是否有罪,须由陪审团决定。陪审团是由法官从公众中挑选的。先随机挑选n个人作为陪审团的候选人,然后再从这n个人中选m人组成陪审团。选m人的办法是:控方和辩方会根据对候选人的喜欢程度,给所有候选人打分,分值从0到20。为了公平起见,法官选出陪审团的原则是:选出的m个人,必须满足辩方总分和控方总分的差的绝对值最小
阅读全文
posted @
2014-03-02 20:48
mobileliker
阅读(459)
推荐(0)
OpenJudge/Poj 1936 All in All
摘要:1.链接地址:http://poj.org/problem?id=1936http://bailian.openjudge.cn/practice/19362.题目:All in AllTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 26651Accepted: 10862DescriptionYou have devised a new encryption technique which encodes a message by inserting between its characters randomly genera
阅读全文
posted @
2014-03-02 14:37
mobileliker
阅读(303)
推荐(0)
OpenJudge/Poj 1661 帮助 Jimmy
摘要:1.链接地址:bailian.openjudge.cn/practice/1661http://poj.org/problem?id=16612.题目:总Time Limit:1000msMemory Limit:65536kBDescription "Help Jimmy" 是在下图所示的场景上完成的游戏。场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米/秒。当Jimmy跑到平台的边缘
阅读全文
posted @
2014-03-02 14:25
mobileliker
阅读(471)
推荐(0)
OpenJudge/Poj 1915 Knight Moves
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1915http://poj.org/problem?id=19152.题目:总Time Limit:1000msMemory Limit:65536kBDescriptionBackgroundMr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him?The Proble
阅读全文
posted @
2014-02-28 21:00
mobileliker
阅读(299)
推荐(0)
OpenJudge 2757 最长上升子序列 / Poj 2533 Longest Ordered Subsequence
摘要:1.链接地址:http://poj.org/problem?id=2533http://bailian.openjudge.cn/practice/27572.题目:总Time Limit:2000msMemory Limit:65536kBDescription一个数的序列bi,当b1 2 #include 3 4 using namespace std; 5 6 int main() 7 { 8 //freopen("C://input.txt","r",stdin); 9 10 int n;//1 > n;12 13 int i,j;14 1
阅读全文
posted @
2014-02-28 20:52
mobileliker
阅读(397)
推荐(0)
OpenJudge/Poj 1163 The Triangle
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1163http://poj.org/problem?id=11632.题目:总时间限制:1000ms内存限制:65536kB描述73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top an...
阅读全文
posted @
2014-02-27 21:39
mobileliker
阅读(233)
推荐(0)
OpenJudge/Poj 1844 Sum
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1844http://poj.org/problem?id=18442.题目:SumTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 10031Accepted: 6564DescriptionConsider the natural numbers from 1 to N. By associating to each number a sign (+ or -) and calculating the value of this expre
阅读全文
posted @
2014-02-27 21:30
mobileliker
阅读(202)
推荐(0)
OpenJudge/Poj 1321 棋盘问题
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1321http://poj.org/problem?id=13212.题目:棋盘问题Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 20403Accepted: 10138Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行
阅读全文
posted @
2014-02-27 21:23
mobileliker
阅读(389)
推荐(0)
OpenJudge/Poj 1753 Flip Game
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1753/http://poj.org/problem?id=17532.题目:总时间限制:1000ms内存限制:65536kB描述Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying eith
阅读全文
posted @
2014-02-27 03:14
mobileliker
阅读(455)
推荐(0)
OpenJudge/Poj 1191 棋盘分割
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1191/http://poj.org/problem?id=11912.题目:总时间限制:1000ms内存限制:65536kB描述将一个8*8的棋盘进行如下分割:将原棋盘割下一块矩形棋盘并使剩下部分也是矩形,再将剩下的部分继续如此分割,这样割了(n-1)次后,连同最后剩下的矩形棋盘共有n块矩形棋盘。(每次切割都只能沿着棋盘格子的边进行)原棋盘上每一格有一个分值,一块矩形棋盘的总分为其所含各格分值之和。现在需要把棋盘按上述规则分割成n块矩形棋盘,并使各矩形棋盘总分的均方差最小。均方差,其中平均值,xi为第i
阅读全文
posted @
2014-02-27 03:07
mobileliker
阅读(457)
推荐(0)
OpenJudge/Poj 1723 SOLDIERS
摘要:1.链接地址:http://bailian.openjudge.cn/practice/1723/http://poj.org/problem?id=17232.题目:总时间限制:1000ms内存限制:65536kB描述N soldiers of the land Gridland are randomly scattered around the country. A position in Gridland is given by a pair (x,y) of integer coordinates. Soldiers can move - in one move, one soldie
阅读全文
posted @
2014-02-27 00:14
mobileliker
阅读(273)
推荐(0)
OpenJudge 2803 碎纸机 / Poj 1416 Shredding Company
摘要:1.链接地址:http://poj.org/problem?id=1416http://bailian.openjudge.cn/practice/28032.题目:总时间限制:1000ms内存限制:65536kB描述你现在负责设计一种新式的碎纸机。一般的碎纸机会把纸切成小片,变得难以阅读。而你设计的新式的碎纸机有以下的特点:1.每次切割之前,先要给定碎纸机一个目标数,而且在每张被送入碎纸机的纸片上也需要包含一个数。2.碎纸机切出的每个纸片上都包括一个数。3.要求切出的每个纸片上的数的和要不大于目标数而且与目标数最接近。举一个例子,如下图,假设目标数是50,输入纸片上的数是12346。碎纸机会
阅读全文
posted @
2014-02-27 00:07
mobileliker
阅读(779)
推荐(0)