上一页 1 ··· 8 9 10 11 12 13 14 15 下一页
摘要: 连续最大积Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 1383 Accepted Submission(s): 261 Problem Description小明和他的好朋友小西在玩一个游戏,由电脑随机生成一个由-2,0,2三个数组成的数组,并且约定,谁先算出这个数组中某一段连续元素的积的最大值,就算谁赢!比如我们有如下随机数组: 2 2 0 -2 0 2 2 -2 -2 0 在这个数组的众多连续子序列中,2 2 -2 -2这个连续子. 阅读全文
posted @ 2013-05-26 13:06 _log__ 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 美素数Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0 Problem Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。 给定一个区间,你能计算出这个区间... 阅读全文
posted @ 2013-05-18 22:24 _log__ 阅读(219) 评论(0) 推荐(0) 编辑
摘要: #include<cstdio>#include<iostream>#include<string>#include<cstring>#define MAXN 100010using namespace std ;short d[2][MAXN] , ans[MAXN] , T[MAXN];struct node{ int mun; node * next ;} ;int mun[2] ,len , ok , b[2] , N , mm ;bool GetMun( node * & hand , node * & pre ){ / 阅读全文
posted @ 2013-05-17 23:04 _log__ 阅读(946) 评论(0) 推荐(0) 编辑
摘要: K Smallest SumsYou're given k arrays, each array has k integers. There are kkways to pick exactly one element in each array and calculate the sum of the integers. Your task is to find the k smallest sums among them.InputThere will be several test cases. The first line of each case contains an in 阅读全文
posted @ 2013-05-11 12:52 _log__ 阅读(179) 评论(0) 推荐(0) 编辑
摘要: PieTime Limit:1000MSMemory Limit:65536KTotal Submissions:8258Accepted:3007Special JudgeDescriptionMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my party and each o 阅读全文
posted @ 2013-05-11 12:05 _log__ 阅读(142) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000).His C (2 <= C <= N) cows don't like this barn layout and become aggressive towards each other once 阅读全文
posted @ 2013-05-11 11:59 _log__ 阅读(230) 评论(0) 推荐(0) 编辑
摘要: DescriptionToday is Yukari'sn-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to placencandles on the top of the cake. As Yukari has lived for such a long long time. Though she herself insists tha 阅读全文
posted @ 2013-05-11 11:55 _log__ 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Bad Hair DayTime Limit:2000MSMemory Limit:65536KTotal Submissions:11337Accepted:3831DescriptionSome of Farmer John'sNcows (1 ≤N≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see the top of other 阅读全文
posted @ 2013-05-11 11:47 _log__ 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Time Limit:3000MSMemory Limit:65536KTotal Submissions:8030Accepted:2170Case Time Limit:1000MSSpecial JudgeDescriptionBill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days influent people's memories about some per 阅读全文
posted @ 2013-05-11 11:41 _log__ 阅读(183) 评论(0) 推荐(0) 编辑
摘要: A Bug's LifeTime Limit:10000MSMemory Limit:65536KTotal Submissions:23776Accepted:7738DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite gende 阅读全文
posted @ 2013-05-11 11:33 _log__ 阅读(164) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 下一页