05 2013 档案

金山游戏编程复赛 连续最大积
摘要:连续最大积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__ 阅读(228) 评论(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__ 阅读(221) 评论(0) 推荐(0) 编辑

C++大作业之链表实现的高精度加法,减法,和数组实现的高精度乘法。
摘要:#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__ 阅读(964) 评论(0) 推荐(0) 编辑

K Smallest Sums
摘要: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__ 阅读(182) 评论(0) 推荐(0) 编辑

poj 3122 Pie 二分
摘要: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__ 阅读(150) 评论(0) 推荐(0) 编辑

二分 Aggressive cows
摘要: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__ 阅读(232) 评论(0) 推荐(0) 编辑

HDU 4430 Yukari's Birthday二分查找
摘要: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__ 阅读(199) 评论(0) 推荐(0) 编辑

POJ 3250 Bad Hair Day
摘要: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__ 阅读(174) 评论(0) 推荐(0) 编辑

POJ 2796 Feel Good
摘要: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__ 阅读(184) 评论(0) 推荐(0) 编辑

PoJ2492A Bug's Life并查集
摘要: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__ 阅读(173) 评论(0) 推荐(0) 编辑

uva11991 Easy Problem from Rujia Liu?
摘要:Easy Problem from Rujia Liu?Though Rujia Liu usually sets hard problems for contests (for example, regional contests like Xi'an 2006, Beijing 2007 and Wuhan 2009, or UVa OJ contests like Rujia Liu's Presents 1 and 2), he occasionally sets easy problem (for example, 'the Coco-Cola Store&# 阅读全文

posted @ 2013-05-11 10:52 _log__ 阅读(176) 评论(0) 推荐(0) 编辑

POJ 1050 To the Max
摘要:To the MaxTime Limit:1000MSMemory Limit:10000KTotal Submissions:35476Accepted:18625DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is the sum of all t 阅读全文

posted @ 2013-05-08 22:17 _log__ 阅读(109) 评论(0) 推荐(0) 编辑

Human Gene Functions
摘要:DescriptionIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologists have been interested in identifying human genes and determining their functions, because these can be used to diagnose h 阅读全文

posted @ 2013-05-08 22:08 _log__ 阅读(136) 评论(0) 推荐(0) 编辑

POJ 1836 Alignment 最长上升子序列变形
摘要:AlignmentTime Limit:1000MSMemory Limit:30000KTotal Submissions:10545Accepted:3375DescriptionIn the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of the captain. The captain is not satisfied with the way his soldiers are 阅读全文

posted @ 2013-05-08 21:51 _log__ 阅读(127) 评论(0) 推荐(0) 编辑

HDU1114 Piggy-Bank 完全背包
摘要:Piggy-BankProblem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple. Whenever some ACM member has any small money, he takes all the coins. 阅读全文

posted @ 2013-05-08 21:43 _log__ 阅读(143) 评论(0) 推荐(0) 编辑

POJ 1742 Coins 多重背包
摘要:CoinsTime Limit:3000MSMemory Limit:30000KTotal Submissions:24891Accepted:8419DescriptionPeople in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby shop. He w 阅读全文

posted @ 2013-05-08 21:36 _log__ 阅读(163) 评论(0) 推荐(0) 编辑

POJ 3267 The Cow Lexicon 动态规划
摘要:The Cow LexiconTime Limit:2000MSMemory Limit:65536KTotal Submissions:6999Accepted:3242DescriptionFew know that the cows have their own dictionary withW(1 ≤W≤ 600) words, each containing no more 25 of the characters 'a'..'z'. Their cowmunication system, based on mooing, is not very ac 阅读全文

posted @ 2013-05-08 21:23 _log__ 阅读(115) 评论(0) 推荐(0) 编辑