04 2013 档案

摘要:[1443] Weiqihttp://ac.nbutoj.com/Problem/view.xhtml?id=1443时间限制: 1000 ms 内存限制: 65535 K问题描述Have you ever played Weiqi?In a composition, there exist two kinds of chess pieces black and white.The problem is so easy, can you find out how many white pieces are encircled by blacks?输入First line will contai 阅读全文
posted @ 2013-04-30 23:32 Jack Ge 阅读(216) 评论(0) 推荐(0) 编辑
摘要:[1444] The Waterfall Flow http://ac.nbutoj.com/Problem/view.xhtml?id=1444时间限制: 1000 ms 内存限制: 65535 K问题描述 The Hero is on the way to beat the Devil, now he comes near to a waterfall flow. The Devil puts a magic on the waterfall flow in order to stop the Hero.The magic makes the waterfall flow... 阅读全文
posted @ 2013-04-30 22:54 Jack Ge 阅读(301) 评论(0) 推荐(0) 编辑
摘要:小孩报数问题Time Limit:1000MSMemory Limit:65536KTotal Submissions:8181Accepted:3851Description有N个小孩围成一圈,给他们从1开始依次编号,现指定从第W个开始报数,报到第S个时,该小孩出列,然后从下一个小孩开始报数,仍是报到S个出列,如此重复下去,直到所有的小孩都出列(总人数不足S个时将循环报数),求小孩出列的顺序。Input第一行输入小孩的人数N(N<=64)接下来每行输入一个小孩的名字(人名不超过15个字符)最后一行输入W,S (W < N),用逗号","间隔Output按人名输 阅读全文
posted @ 2013-04-30 21:00 Jack Ge 阅读(368) 评论(0) 推荐(0) 编辑
摘要:QuestionsTime Limit:1000MSMemory Limit:65536KTotal Submissions:1208Accepted:441DescriptionHolding a collegiate programming contest is a very exhausting work. There is a well-known proverb that one fool can ask so many questions that a hundred clever men will not answer. And during a collegiate progr 阅读全文
posted @ 2013-04-30 20:23 Jack Ge 阅读(522) 评论(0) 推荐(0) 编辑
摘要:Eeny Meeny MooTime Limit:1000MSMemory Limit:65536KTotal Submissions:2929Accepted:2015DescriptionSurely you have made the experience that when too many people use the Internet simultaneously, the net becomes very, very slow.To put an end to this problem, the University of Ulm has developed a continge 阅读全文
posted @ 2013-04-30 16:56 Jack Ge 阅读(481) 评论(0) 推荐(0) 编辑
摘要:Card TrickTime Limit:1000MSMemory Limit:65536KTotal Submissions:3224Accepted:2354DescriptionThe magician shuffles a small pack of cards, holds it face down and performs the following procedure:The top card is moved to the bottom of the pack. The new top card is dealt face up onto the table. It is th 阅读全文
posted @ 2013-04-30 16:30 Jack Ge 阅读(1028) 评论(0) 推荐(0) 编辑
摘要:ComputerTime Limit : 1000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 1Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionA school bought the first computer some time ago(so this computer's id is 1). During the recent 阅读全文
posted @ 2013-04-30 08:42 Jack Ge 阅读(422) 评论(0) 推荐(0) 编辑
摘要:Starship TroopersTime Limit : 10000/5000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 1Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionYou, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is 阅读全文
posted @ 2013-04-30 07:57 Jack Ge 阅读(392) 评论(0) 推荐(0) 编辑
摘要:SightseeingTime Limit:2000MSMemory Limit:65536KTotal Submissions:6240Accepted:2197DescriptionTour operator Your Personal Holiday organises guided bus trips across the Benelux. Every day the bus moves from one citySto another cityF. On this way, the tourists in the bus can see the sights alongside th 阅读全文
posted @ 2013-04-29 22:28 Jack Ge 阅读(3760) 评论(0) 推荐(1) 编辑
摘要:Gold TransportationTime Limit:2000MSMemory Limit:65536KTotal Submissions:2407Accepted:858DescriptionRecently, a number of gold mines have been discovered in Zorroming State. To protect this treasure, we must transport this gold to the storehouses as quickly as possible. Suppose that the Zorroming St 阅读全文
posted @ 2013-04-29 21:59 Jack Ge 阅读(365) 评论(0) 推荐(0) 编辑
摘要:Checking an AlibiTime Limit:1000MSMemory Limit:65536KTotal Submissions:5685Accepted:2060DescriptionA crime has been comitted: a load of grain has been taken from the barn by one of FJ's cows. FJ is trying to determine which of his C (1 #include#include#includeusing namespace std;const int VM=520 阅读全文
posted @ 2013-04-29 21:43 Jack Ge 阅读(333) 评论(0) 推荐(0) 编辑
摘要:T-Shirt GumboTime Limit:1000MSMemory Limit:65536KTotal Submissions:2261Accepted:1056DescriptionBoudreaux and Thibodeaux are student volunteers for this year's ACM South Central Region's programming contest. One of their duties is to distribute the contest T-shirts to arriving teams. The T-sh 阅读全文
posted @ 2013-04-29 21:24 Jack Ge 阅读(277) 评论(0) 推荐(0) 编辑
摘要:Secret Milking MachineTime Limit:1000MSMemory Limit:65536KTotal Submissions:7681Accepted:2340DescriptionFarmer John is constructing a new milking machine and wishes to keep it secret as long as possible. He has hidden in it deep within his farm and needs to be able to get to the machine without bein 阅读全文
posted @ 2013-04-29 21:01 Jack Ge 阅读(692) 评论(0) 推荐(0) 编辑
摘要:Problem H 最长子串http://acm.fzu.edu.cn/contest/problem.php?cid=129&sortid=8Accept: 31Submit: 110Time Limit: 3000 mSecMemory Limit : 65536 KBProblem Description问题很简单,给你一个字符串s,问s的子串中不包含s1,s2...sn的最长串有多长。Input输入包含多组数据。第一行为字符串s,字符串s的长度1到10^6次方,第二行是字符串s不能包含的子串个数n,n<=1000。接下来n行字符串,长度不大于100。字符串由小写的英文字符 阅读全文
posted @ 2013-04-29 15:36 Jack Ge 阅读(486) 评论(0) 推荐(0) 编辑
摘要:1504: ZZ的橱柜http://www.acmore.net/problem.php?id=1504Time Limit:1 SecMemory Limit:64 MBSubmit:315Solved:38SubmitStatusWeb BoardDescriptionZZ不仅喜欢买衣服,还是个吃货,天哪!现在的妹纸是怎么了?╮(╯_╰)╭,ZZ有两个大型橱柜A和B,里面放满了零食,每个橱柜里面有N个方格,每个方格里面放了不同重量的美味,现在ZZ要从A、B里面各取一个方格的美味,可是ZZ不想变得太胖,于是他会尽量的选择重量少的美味,当然不是所有的组合都是ZZ喜欢吃的美味,所以她想了一个特别 阅读全文
posted @ 2013-04-28 18:16 Jack Ge 阅读(359) 评论(0) 推荐(0) 编辑
摘要:Tr ATime Limit : 1000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 11Accepted Submission(s) : 7Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionA为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。Input数据的第一行是一个T,表示有T组数据。每组数据的第一行有n(2 #include#includeus 阅读全文
posted @ 2013-04-28 13:25 Jack Ge 阅读(3659) 评论(0) 推荐(0) 编辑
摘要:连连看Time Limit : 20000/10000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 109Accepted Submission(s) : 33Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两 阅读全文
posted @ 2013-04-28 12:27 Jack Ge 阅读(354) 评论(0) 推荐(0) 编辑
摘要:Big NumberTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encr 阅读全文
posted @ 2013-04-28 08:03 Jack Ge 阅读(221) 评论(0) 推荐(0) 编辑
摘要:Count ColorTime Limit:1000MSMemory Limit:65536KTotal Submissions:29895Accepted:8919DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.There is a very long board with length L centimeter, L is a posit 阅读全文
posted @ 2013-04-25 10:01 Jack Ge 阅读(2901) 评论(4) 推荐(0) 编辑
摘要:离散化是程序设计中一个非常常用的技巧,它可以有效的降低时间复杂度。其基本思想就是在众多可能的情况中“只考虑我需要用的值”。下面我将用三个例子说明,如何运用离散化改进一个低效的,甚至根本不可能实现的算法。《算法艺术与信息学竞赛》中的计算几何部分,黄亮举了一个经典的例子,我认为很适合用来介绍离散化思想。这个问题是UVA10173(http://acm.uva.es/p/v101/10173.html),题目意思很简单,给定平面上n个点的坐标,求能够覆盖所有这些点的最小矩形面积。这个问题难就难在,这个矩形可以倾斜放置(边不必平行于坐标轴)。这里的倾斜放置很不好处理,因为我们不知道这个矩形最终会倾斜多 阅读全文
posted @ 2013-04-25 09:32 Jack Ge 阅读(376) 评论(0) 推荐(0) 编辑
摘要:Frequent valuesTime Limit:2000MSMemory Limit:65536KTotal Submissions:11083Accepted:4063DescriptionYou are given a sequence ofnintegersa1, a2, ... , anin non-decreasing order. In addition to that, you are given several queries consisting of indicesiandj(1 ≤ i ≤ j ≤ n). For each query, determine the m 阅读全文
posted @ 2013-04-25 09:29 Jack Ge 阅读(268) 评论(0) 推荐(0) 编辑
摘要:Mayor's postersTime Limit:1000MSMemory Limit:65536KTotal Submissions:32200Accepted:9347DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council has finally 阅读全文
posted @ 2013-04-25 09:02 Jack Ge 阅读(2285) 评论(0) 推荐(0) 编辑
摘要:HotelTime Limit:5000MSMemory Limit:30000KTotal Submissions:1584Accepted:645DescriptionThe "Informatics" hotel is one of the most luxurious hotels from Galaciuc. A lot of tourists arrive or leave this hotel in one year. So it is pretty difficult to keep the evidence of the occupied rooms. B 阅读全文
posted @ 2013-04-25 08:46 Jack Ge 阅读(567) 评论(0) 推荐(0) 编辑
摘要:Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11425Accepted Submission(s): 5650Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecu 阅读全文
posted @ 2013-04-25 08:21 Jack Ge 阅读(266) 评论(0) 推荐(0) 编辑
摘要:HotelTime Limit:3000MSMemory Limit:65536KTotal Submissions:8736Accepted:3701DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superior. Bessie, ever the competent travel agent, has named the Bullmoose Hotel 阅读全文
posted @ 2013-04-25 08:08 Jack Ge 阅读(256) 评论(0) 推荐(0) 编辑
摘要:Tunnel WarfareTime Limit:1000MSMemory Limit:131072KTotal Submissions:5985Accepted:2440DescriptionDuring the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a line. Except the 阅读全文
posted @ 2013-04-25 07:28 Jack Ge 阅读(294) 评论(0) 推荐(0) 编辑
摘要:Clairewd’s messageTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 16Accepted Submission(s) : 7Problem DescriptionClairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing for s 阅读全文
posted @ 2013-04-24 17:48 Jack Ge 阅读(335) 评论(0) 推荐(0) 编辑
摘要:Cyclic NacklaceTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 10Accepted Submission(s) : 8Problem DescriptionCC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 9 阅读全文
posted @ 2013-04-24 15:33 Jack Ge 阅读(318) 评论(0) 推荐(0) 编辑
摘要:Best RewardTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/65536K (Java/Other)Total Submission(s) : 23Accepted Submission(s) : 8Problem DescriptionAfter an uphill battle, General Li won a great victory. Now the head of state decide to reward him with honor and treasures for his great explo 阅读全文
posted @ 2013-04-24 14:15 Jack Ge 阅读(524) 评论(0) 推荐(0) 编辑
摘要:Multiply gameTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1055Accepted Submission(s): 343Problem DescriptionTired of playing computer games, alpc23 is planning to play a game on numbers. Because plus and subtraction is too easy for this gay, he 阅读全文
posted @ 2013-04-24 13:46 Jack Ge 阅读(538) 评论(0) 推荐(0) 编辑
摘要:Count the ColorsTime Limit:2 Seconds Memory Limit:65536 KBPainting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.Your task is counting the segments of different colors you can see at last.InputThe first line of each data set contains exa 阅读全文
posted @ 2013-04-24 13:28 Jack Ge 阅读(691) 评论(0) 推荐(0) 编辑
摘要:City HorizonTime Limit:2000MSMemory Limit:65536KTotal Submissions:14887Accepted:4006DescriptionFarmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes formed by the rectangular buildings.The entire horizon is repr 阅读全文
posted @ 2013-04-24 12:33 Jack Ge 阅读(1221) 评论(0) 推荐(0) 编辑
摘要:Apple TreeTime Limit:2000MSMemory Limit:65536KTotal Submissions:15440Accepted:4571DescriptionThere is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefully nurturing the big apple tree.The tree hasNforks w 阅读全文
posted @ 2013-04-24 11:49 Jack Ge 阅读(709) 评论(0) 推荐(0) 编辑
摘要:CowsTime Limit:3000MSMemory Limit:65536KTotal Submissions:9618Accepted:3153DescriptionFarmer John's cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number line) in his field is particularly good.Farmer John has N cows (we numbe 阅读全文
posted @ 2013-04-24 11:25 Jack Ge 阅读(340) 评论(0) 推荐(0) 编辑
摘要:JapanTime Limit:1000MSMemory Limit:65536KTotal Submissions:16682Accepted:4467DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <= 1000, N <= 1000). K 阅读全文
posted @ 2013-04-24 09:37 Jack Ge 阅读(515) 评论(0) 推荐(0) 编辑
摘要:Buy TicketsTime Limit:4000MSMemory Limit:65536KTotal Submissions:9712Accepted:4679DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little Cat still had schedules go 阅读全文
posted @ 2013-04-24 09:20 Jack Ge 阅读(265) 评论(0) 推荐(0) 编辑
摘要:PictureTime Limit:2000MSMemory Limit:10000KTotal Submissions:9024Accepted:4762DescriptionA number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially or totally covered by the other 阅读全文
posted @ 2013-04-24 09:03 Jack Ge 阅读(374) 评论(0) 推荐(0) 编辑
摘要:AtlantisTime Limit:1000MSMemory Limit:10000KTotal Submissions:13873Accepted:5339DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these maps describe different reg 阅读全文
posted @ 2013-04-24 08:35 Jack Ge 阅读(587) 评论(0) 推荐(0) 编辑
摘要:Mobile phonesTime Limit:5000MSMemory Limit:65536KTotal Submissions:12238Accepted:5617DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S matrix with the rows and columns numbered 阅读全文
posted @ 2013-04-24 07:31 Jack Ge 阅读(284) 评论(0) 推荐(0) 编辑
摘要:MatrixTime Limit:3000MSMemory Limit:65536KTotal Submissions:14123Accepted:5337DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 1、1->0,Q:(x,y)就是问这个点是什么。#include#include#includeusing namesp 阅读全文
posted @ 2013-04-23 23:18 Jack Ge 阅读(378) 评论(0) 推荐(0) 编辑
摘要:FlowersTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1733Accepted Submission(s): 858Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flowers. Th 阅读全文
posted @ 2013-04-23 23:03 Jack Ge 阅读(265) 评论(0) 推荐(0) 编辑
摘要:QueryTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1922Accepted Submission(s): 654Problem DescriptionYou are given two strings s1[0..l1], s2[0..l2] and Q - number of queries.Your task is to answer next queries:1) 1 a i c - you should set i-th c 阅读全文
posted @ 2013-04-23 19:57 Jack Ge 阅读(242) 评论(0) 推荐(0) 编辑
摘要:Who Gets the Most Candies?Time Limit:5000MSMemory Limit:131072KTotal Submissions:7388Accepted:2184Case Time Limit:2000MSDescriptionNchildren are sitting in a circle to play a game.The children are numbered from 1 toNin clockwise order. Each of them has a card with a non-zero integer on it in his/her 阅读全文
posted @ 2013-04-23 19:33 Jack Ge 阅读(2086) 评论(0) 推荐(0) 编辑
摘要:Currency ExchangeTime Limit:1000MSMemory Limit:30000KTotal Submissions:15324Accepted:5275DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can 阅读全文
posted @ 2013-04-23 18:44 Jack Ge 阅读(559) 评论(0) 推荐(0) 编辑
摘要:WormholesTime Limit:2000MSMemory Limit:65536KTotal Submissions:23270Accepted:8301DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BEFORE 阅读全文
posted @ 2013-04-23 18:18 Jack Ge 阅读(2515) 评论(2) 推荐(0) 编辑
摘要:Median Weight BeadTime Limit:1000MSMemory Limit:30000KTotal Submissions:2494Accepted:1249DescriptionThere are N beads which of the same shape and size, but with different weights. N is an odd number and the beads are labeled as 1, 2, ..., N. Your task is to find the bead whose weight is median (the 阅读全文
posted @ 2013-04-23 17:43 Jack Ge 阅读(554) 评论(0) 推荐(0) 编辑
摘要:ArbitrageTime Limit:1000MSMemory Limit:65536KTotal Submissions:12287Accepted:5168DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar buys 0.5 British pound, 阅读全文
posted @ 2013-04-23 15:35 Jack Ge 阅读(132) 评论(0) 推荐(0) 编辑
摘要:FroggerTime Limit:1000MSMemory Limit:65536KTotal Submissions:19928Accepted:6464DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists' sunscreen 阅读全文
posted @ 2013-04-23 15:19 Jack Ge 阅读(239) 评论(0) 推荐(0) 编辑
摘要:106 miles to ChicagoTime Limit:2000MSMemory Limit:65536KTotal Submissions:3305Accepted:1557Special JudgeDescriptionIn the movie "Blues Brothers", the orphanage where Elwood and Jack were raised may be sold to the Board of Education if they do not pay 5000 dollars in taxes at the Cook Count 阅读全文
posted @ 2013-04-23 14:41 Jack Ge 阅读(490) 评论(0) 推荐(0) 编辑
摘要:MPI MaelstromTime Limit:1000MSMemory Limit:10000KTotal Submissions:3896Accepted:2330DescriptionBIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee's research advis 阅读全文
posted @ 2013-04-23 14:15 Jack Ge 阅读(237) 评论(0) 推荐(0) 编辑
摘要:Is It A Tree?Time Limit:1000MSMemory Limit:10000KTotal Submissions:17523Accepted:6005DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties.There is exa 阅读全文
posted @ 2013-04-23 13:08 Jack Ge 阅读(261) 评论(0) 推荐(0) 编辑
摘要:Stars in Your WindowTime Limit:1000MSMemory Limit:65536KTotal Submissions:8175Accepted:2246DescriptionFleeting time does not blur my memory of you. Can it really be 4 years since I first saw you? I still remember, vividly, on the beautiful Zhuhai Campus, 4 years ago, from the moment I saw you smile, 阅读全文
posted @ 2013-04-23 09:50 Jack Ge 阅读(952) 评论(0) 推荐(0) 编辑
摘要:Sequence operationTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4357Accepted Submission(s): 1256Problem Descriptionlxhgww got a sequence contains n characters which are all '0's or '1's.We have five operations here:Change operati 阅读全文
posted @ 2013-04-23 09:05 Jack Ge 阅读(418) 评论(0) 推荐(0) 编辑
摘要:AreYouBusyTime Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Problem DescriptionHappy New Term! As having become a junior, xiaoA recognizes that there is not much time for her to AC problems, because there are some other th 阅读全文
posted @ 2013-04-22 19:40 Jack Ge 阅读(1073) 评论(0) 推荐(0) 编辑
摘要:I love sneakers!Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Problem DescriptionAfter months of hard working, Iserlohn finally wins awesome amount of scholarship. As a great zealot of sneakers, he decides to spend all 阅读全文
posted @ 2013-04-22 19:01 Jack Ge 阅读(314) 评论(0) 推荐(0) 编辑
摘要:ACboy needs your helpTime Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 2 Accepted Submission(s) : 2Problem DescriptionACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from different course 阅读全文
posted @ 2013-04-22 18:30 Jack Ge 阅读(225) 评论(0) 推荐(0) 编辑
摘要:Round and Round We GoTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Problem DescriptionA cyclic number is an integer n digits in length which, when multiplied by any integer from 1 to n, yields a"cycle"of the 阅读全文
posted @ 2013-04-22 17:15 Jack Ge 阅读(284) 评论(0) 推荐(0) 编辑
摘要:ParliamentTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 2 Accepted Submission(s) : 1Problem DescriptionNew convocation of The Fool Land's Parliament consists of N delegates. According to the present regulation delegates should be divided into 阅读全文
posted @ 2013-04-22 16:43 Jack Ge 阅读(646) 评论(0) 推荐(0) 编辑
摘要:False coinTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 4 Accepted Submission(s) : 1Problem DescriptionThe "Gold Bar"bank received information from reliable sources that in their last group of N coins exactly one coin is false and diff 阅读全文
posted @ 2013-04-22 16:23 Jack Ge 阅读(891) 评论(0) 推荐(0) 编辑
摘要:PacketsTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Problem DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always 阅读全文
posted @ 2013-04-22 13:54 Jack Ge 阅读(4029) 评论(1) 推荐(0) 编辑
摘要:DividingTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Problem DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marble 阅读全文
posted @ 2013-04-22 13:29 Jack Ge 阅读(451) 评论(0) 推荐(0) 编辑
摘要:Counterfeit DollarTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 2 Accepted Submission(s) : 1Problem DescriptionSally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit eve 阅读全文
posted @ 2013-04-22 12:39 Jack Ge 阅读(387) 评论(0) 推荐(0) 编辑
摘要:JosephTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 0 Accepted Submission(s) : 0Problem DescriptionThe Joseph's problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . . ., 阅读全文
posted @ 2013-04-22 11:17 Jack Ge 阅读(1596) 评论(0) 推荐(0) 编辑
摘要:取石子游戏Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 1 Accepted Submission(s) : 1Problem Description有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,如果轮到你先取,假设双方都采取最好的策略,问最后你是胜者还是败者。 阅读全文
posted @ 2013-04-22 10:10 Jack Ge 阅读(8507) 评论(3) 推荐(0) 编辑
摘要:青蛙的约会Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 2 Accepted Submission(s) : 2Problem Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰 阅读全文
posted @ 2013-04-22 09:40 Jack Ge 阅读(7477) 评论(0) 推荐(1) 编辑
摘要:String Problem Problem Description Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SK 阅读全文
posted @ 2013-04-22 08:43 Jack Ge 阅读(345) 评论(0) 推荐(0) 编辑
摘要:跑跑卡丁车Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 3 Accepted Submission(s) : 2Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description跑跑卡丁车是时下一款流行的网络休闲游戏,你可以在这虚拟的世界里体验驾驶的乐趣。这款游戏的特别之处是你可以通过漂移来获得一种 加速卡,用这种加速卡可以在有限的时间里提高你的速度。为了使问题 阅读全文
posted @ 2013-04-21 10:56 Jack Ge 阅读(796) 评论(0) 推荐(0) 编辑
摘要:Count the stringTime Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 22 Accepted Submission(s) : 11Problem DescriptionIt is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down 阅读全文
posted @ 2013-04-20 18:43 Jack Ge 阅读(1725) 评论(0) 推荐(0) 编辑
摘要:Simpsons’ Hidden TalentsTime Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 37 Accepted Submission(s) : 11Problem DescriptionHomer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had. Marge: Yeah, what is it? Homer: 阅读全文
posted @ 2013-04-20 12:21 Jack Ge 阅读(1316) 评论(0) 推荐(0) 编辑
摘要:A + B for you againTime Limit : 5000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 30Accepted Submission(s) : 9Problem DescriptionGenerally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two string 阅读全文
posted @ 2013-04-19 17:40 Jack Ge 阅读(474) 评论(0) 推荐(0) 编辑
摘要:Escape from TetrisTime Limit : 12000/4000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 11Accepted Submission(s) : 5Problem Description由于整日整夜地对着这个棋盘,Lele终于走火入魔。每天一睡觉,他就会梦到自己会被人被扔进一个棋盘中,一直找不到出路,然后从梦中惊醒。久而久之,Lele被搞得精神衰弱。梦境是否会成为现实,谁也说不准,不过不怕一万只怕万一。现在Lele每次看到一个棋盘,都会想象一下自己被关 阅读全文
posted @ 2013-04-19 15:33 Jack Ge 阅读(368) 评论(0) 推荐(0) 编辑
摘要:Tobo or not ToboTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 9Accepted Submission(s) : 6Problem DescriptionThe game of Tobo is played on a plastic board designed into a 3 × 3 grid with cells numbered from 1 to 9 as shown in figure (a). The g 阅读全文
posted @ 2013-04-19 14:56 Jack Ge 阅读(439) 评论(0) 推荐(0) 编辑
摘要:无题ITime Limit : 10000/10000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 16Accepted Submission(s) : 8Problem Description一天机器人小A在玩一个简单的智力游戏,这个游戏是这样的,在一个4*4的矩阵中分别有4个1,4个2,4个3和4个4分别表示4种不同的东西,每一步小A可以把同一行的4个数往左移或者往右移一步或者把同一列的4个数字往上移或者往下移一步(1,2,3,4往左移后是2,3,4,1),小A现在想知道进过最少的几 阅读全文
posted @ 2013-04-19 14:12 Jack Ge 阅读(370) 评论(0) 推荐(0) 编辑
摘要:The Rotation GameTime Limit : 45000/15000ms (Java/Other)Memory Limit : 150000/150000K (Java/Other)Total Submission(s) : 7Accepted Submission(s) : 6Problem DescriptionThe rotation game uses a # shaped board, which can hold 24 pieces of square blocks (see Fig.1). The blocks are marked with symbols 1, 阅读全文
posted @ 2013-04-19 12:53 Jack Ge 阅读(919) 评论(0) 推荐(0) 编辑
摘要:PuzzleTime Limit : 6000/3000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 15Accepted Submission(s) : 8Problem DescriptionOne day, Resty gets a very interesting puzzle. Eve said that she will make a cake for Resty if he solved this puzzle, so Resty asks you to help him 阅读全文
posted @ 2013-04-19 11:49 Jack Ge 阅读(412) 评论(0) 推荐(0) 编辑
摘要:Strange fuctionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1840Accepted Submission(s): 1364Problem DescriptionNow, here is a fuction:F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100)Can you find the minimum value when x is between 0 and 阅读全文
posted @ 2013-04-18 23:33 Jack Ge 阅读(903) 评论(0) 推荐(0) 编辑
摘要:CupTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2356Accepted Submission(s): 741Problem DescriptionThe WHU ACM Team has a big cup, with which every member drinks water. Now, we know the volume of the water in the cup, can you tell us it height?Th 阅读全文
posted @ 2013-04-18 23:12 Jack Ge 阅读(558) 评论(0) 推荐(0) 编辑
摘要:Can you solve this equation?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4814Accepted Submission(s): 2247Problem 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 @ 2013-04-18 22:22 Jack Ge 阅读(490) 评论(0) 推荐(0) 编辑
摘要:Life FormsTime Limit:5000MSMemory Limit:65536KTotal Submissions:7270Accepted:1998DescriptionYou may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, eyebrows and the like. A few bear no human resemblance; thes 阅读全文
posted @ 2013-04-18 20:45 Jack Ge 阅读(1251) 评论(0) 推荐(0) 编辑
摘要:选课时间(题目已修改,注意读题)Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2026Accepted Submission(s): 1612 Problem Description又到了选课的时间了,xhd看着选课表发呆,为了想让下一学期好过点,他想知道学n个学分共有多少组合。你来帮帮他吧。(xhd认为一样学分的课没区别)Input输入数据的第一行是一个数据T,表示有T组数据。 每组数据的第一行是两个整数n(1 using namespa 阅读全文
posted @ 2013-04-18 14:38 Jack Ge 阅读(1044) 评论(0) 推荐(0) 编辑
摘要:FruitTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2280Accepted Submission(s): 1266 Problem Description转眼到了收获的季节,由于有TT的专业指导,Lele获得了大丰收。特别是水果,Lele一共种了N种水果,有苹果,梨子,香蕉,西瓜……不但味道好吃,样子更是好看。于是,很多人们慕名而来,找Lele买水果。甚至连大名鼎鼎的HDU ACM总教头 lcy 也来了。lcy抛出一打百元大钞,&qu 阅读全文
posted @ 2013-04-18 14:10 Jack Ge 阅读(271) 评论(0) 推荐(0) 编辑
摘要:Coin ChangeTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 9842Accepted Submission(s): 3300 Problem DescriptionSuppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given 阅读全文
posted @ 2013-04-18 14:02 Jack Ge 阅读(2536) 评论(0) 推荐(0) 编辑
摘要:The BalanceTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4293Accepted Submission(s): 1725 Problem DescriptionNow you are asked to measure a dose of medicine with a balance and a number of weights. Certainly it is not always achievable. So you sh 阅读全文
posted @ 2013-04-18 13:36 Jack Ge 阅读(312) 评论(0) 推荐(0) 编辑
摘要:Big Event in HDUTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 16262Accepted Submission(s): 5741 Problem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College 阅读全文
posted @ 2013-04-18 13:07 Jack Ge 阅读(395) 评论(0) 推荐(0) 编辑
摘要:Square CoinsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6093Accepted Submission(s): 4111 Problem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of 阅读全文
posted @ 2013-04-18 12:36 Jack Ge 阅读(1321) 评论(0) 推荐(0) 编辑
摘要:Holding Bin-Laden Captive!Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11029Accepted Submission(s): 4943 Problem DescriptionWe all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reporte 阅读全文
posted @ 2013-04-18 12:20 Jack Ge 阅读(738) 评论(0) 推荐(0) 编辑
摘要:Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9017Accepted Submission(s): 6341 Problem Description"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says 阅读全文
posted @ 2013-04-18 12:05 Jack Ge 阅读(209) 评论(0) 推荐(0) 编辑
摘要:找单词Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2739Accepted Submission(s): 1941 Problem Description假设有x1个字母A, x2个字母B,..... x26个字母Z,同时假设字母A的价值为1,字母B的价值为2,..... 字母Z的价值为26。那么,对于给定的字母,可以找到多少价值#include#includeusing namespace std;const int N=50;int 阅读全文
posted @ 2013-04-18 10:50 Jack Ge 阅读(1837) 评论(0) 推荐(0) 编辑
摘要:The SuspectsTime Limit:1000MSMemory Limit:20000KTotal Submissions:17242Accepted:8319DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to separa 阅读全文
posted @ 2013-04-17 22:18 Jack Ge 阅读(245) 评论(0) 推荐(0) 编辑
摘要:NetworkTime Limit:1000MSMemory Limit:30000KTotal Submissions:11372Accepted:4337Special JudgeDescriptionAndrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can be connected to each other using cables. Since eac 阅读全文
posted @ 2013-04-17 21:52 Jack Ge 阅读(461) 评论(0) 推荐(0) 编辑
摘要:ConscriptionTime Limit:1000MSMemory Limit:65536KTotal Submissions:5995Accepted:2058DescriptionWindy has a country, and he wants to build an army to protect his country. He has picked upNgirls andMboys and wants to collect them to be his soldiers. To collect a soldier without any privilege, he must p 阅读全文
posted @ 2013-04-17 21:32 Jack Ge 阅读(364) 评论(0) 推荐(0) 编辑
摘要:A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:41842Accepted:12156Case Time Limit:2000MSDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interv 阅读全文
posted @ 2013-04-17 17:57 Jack Ge 阅读(458) 评论(0) 推荐(0) 编辑
摘要:Exact coverhttp://acm.hust.edu.cn/problem.php?id=1017Special Judge Time Limit: 15 Sec Memory Limit: 128 MB Submissions: 5179 Solved: 2748DescriptionThere is an N*M matrix with only 0s and 1s, (1 <= N,M <= 1000). An exact cover is a selection of rows such that every column has a 1 in exactly on 阅读全文
posted @ 2013-04-17 16:19 Jack Ge 阅读(272) 评论(0) 推荐(0) 编辑
摘要:whosyourdaddyTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1028Accepted Submission(s): 508 Problem Descriptionsevenzero liked Warcraft very much, but he haven't practiced it for several years after being addicted to algorithms. Now, though 阅读全文
posted @ 2013-04-17 15:58 Jack Ge 阅读(412) 评论(0) 推荐(0) 编辑
摘要:Bridging signalsTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 399Accepted Submission(s): 250 Problem Description'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers h 阅读全文
posted @ 2013-04-17 15:03 Jack Ge 阅读(563) 评论(0) 推荐(0) 编辑
摘要:MAX Average ProblemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4416Accepted Submission(s): 1106 Problem DescriptionConsider a simple sequence which only contains positive integers as a1, a2 ... an, and a number k. Define ave(i,j) as the averag 阅读全文
posted @ 2013-04-17 14:30 Jack Ge 阅读(691) 评论(0) 推荐(0) 编辑
摘要:Max Sum of Max-K-sub-sequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4573Accepted Submission(s): 1653 Problem DescriptionGiven a circle sequence A[1],A[2],A[3]......A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the r 阅读全文
posted @ 2013-04-17 13:17 Jack Ge 阅读(221) 评论(0) 推荐(0) 编辑
摘要:PieTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 683Accepted Submission(s): 188 Problem DescriptionA lot of boys and girls come to our company to pie friends. After we get their information, we need give each of them an advice for help. We know 阅读全文
posted @ 2013-04-17 11:52 Jack Ge 阅读(305) 评论(0) 推荐(0) 编辑
摘要:MatrixTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1005Accepted Submission(s): 558 Problem DescriptionYifenfei very like play a number game in the n*n Matrix. A positive integer number is put in each area of the Matrix. Every time yifenfei shou 阅读全文
posted @ 2013-04-17 10:30 Jack Ge 阅读(980) 评论(0) 推荐(0) 编辑
摘要:Ranking the CowsTime Limit:2000MSMemory Limit:65536KTotal Submissions:2248Accepted:1045DescriptionEach of Farmer John'sNcows (1 ≤N≤ 1,000) produces milk at a different positive rate, and FJ would like to order his cows according to these rates from the fastest milk producer to the slowest.FJ has 阅读全文
posted @ 2013-04-16 22:16 Jack Ge 阅读(385) 评论(0) 推荐(0) 编辑
摘要:Remmarguts' DateTime Limit:4000MSMemory Limit:65536KTotal Submissions:17098Accepted:4696Description"Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a story."Prince Remmarguts lives i 阅读全文
posted @ 2013-04-16 19:55 Jack Ge 阅读(182) 评论(0) 推荐(0) 编辑
摘要:Similarity of necklaces 2Time Limit:2000MSMemory Limit:65536KTotal Submissions:550Accepted:151DescriptionThe background knowledge of this problem comes from "Similarity of necklaces". Do not worry. I will bring you all the information you need.The little cat thinks about the problem he met 阅读全文
posted @ 2013-04-16 15:35 Jack Ge 阅读(345) 评论(0) 推荐(0) 编辑
摘要:Children of the Candy CornTime Limit:1000MSMemory Limit:65536KTotal Submissions:7551Accepted:3292DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding psychopaths, hippies, and other terrors on t 阅读全文
posted @ 2013-04-16 14:34 Jack Ge 阅读(223) 评论(0) 推荐(0) 编辑
摘要:Dungeon MasterTime Limit:1000MSMemory Limit:65536KTotal Submissions:13187Accepted:5113DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, e 阅读全文
posted @ 2013-04-16 12:48 Jack Ge 阅读(383) 评论(0) 推荐(0) 编辑
摘要:Catch That CowTime Limit:2000MSMemory Limit:65536KTotal Submissions:35043Accepted:10800DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN(0 ≤N≤ 100,000) on a number line and the cow is at a pointK(0 ≤K≤ 100,000) on the 阅读全文
posted @ 2013-04-16 12:25 Jack Ge 阅读(1454) 评论(0) 推荐(0) 编辑
摘要:A Famous GridTime Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 798Accepted Submission(s): 318Problem DescriptionMr. B has recently discovered the grid named "spiral grid".Construct the grid like the following figure. (The grid is actually 阅读全文
posted @ 2013-04-16 12:04 Jack Ge 阅读(490) 评论(0) 推荐(0) 编辑
摘要:Curling 2.0Time Limit:1000MSMemory Limit:65536KTotal Submissions:8047Accepted:3332DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square mesh is marked. The 阅读全文
posted @ 2013-04-16 10:23 Jack Ge 阅读(210) 评论(0) 推荐(0) 编辑
摘要:SticksTime Limit:1000MSMemory Limit:10000KTotal Submissions:106254Accepted:24234DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks he had originally an 阅读全文
posted @ 2013-04-15 23:10 Jack Ge 阅读(205) 评论(0) 推荐(0) 编辑
摘要:SubsequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3132Accepted Submission(s): 1020Problem DescriptionThere is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference betwe 阅读全文
posted @ 2013-04-15 18:22 Jack Ge 阅读(261) 评论(0) 推荐(0) 编辑
摘要:Sliding WindowTime Limit:12000MSMemory Limit:65536KTotal Submissions:29829Accepted:8863Case Time Limit:5000MSDescriptionAn array of sizen≤ 106is given to you. There is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumbers in the wind 阅读全文
posted @ 2013-04-15 17:47 Jack Ge 阅读(1697) 评论(0) 推荐(0) 编辑
摘要:Island TransportTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2822Accepted Submission(s): 922Problem Description In the vast waters far far away, there are many islands. People are living on the islands, and all the transport among the islands. 阅读全文
posted @ 2013-04-15 13:32 Jack Ge 阅读(811) 评论(0) 推荐(0) 编辑
摘要:ControlTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 984Accepted Submission(s): 445Problem Description You, the head of Department of Security, recently received a top-secret information that a group of terrorists is planning to transport some W. 阅读全文
posted @ 2013-04-14 22:38 Jack Ge 阅读(356) 评论(0) 推荐(0) 编辑
摘要:PotsTime Limit:1000MSMemory Limit:65536KTotal Submissions:7783Accepted:3261Special JudgeDescriptionYou are given two pots, having the volume ofAandBliters respectively. The following operations can be performed:FILL(i) fill the poti(1 ≤i≤ 2) from the tap;DROP(i) empty the potito the drain;POUR(i,j) 阅读全文
posted @ 2013-04-14 11:02 Jack Ge 阅读(2587) 评论(0) 推荐(0) 编辑
摘要:FoodTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1491Accepted Submission(s): 534Problem Description You, a part-time dining service worker in your college’s dining hall, are now confused with a new problem: serve as many people as possible. Th.. 阅读全文
posted @ 2013-04-14 10:32 Jack Ge 阅读(351) 评论(0) 推荐(0) 编辑
摘要:Repairing CompanyTime Limit:1000MSMemory Limit:131072KTotal Submissions:5696Accepted:1530DescriptionLily runs a repairing company that services theQblocks in the city. One day the company receivesMrepair tasks, theith of which occurs in blockpi, has a deadlinetion any repairman’s arrival, which is a 阅读全文
posted @ 2013-04-14 09:44 Jack Ge 阅读(288) 评论(0) 推荐(0) 编辑
摘要:Part AcquisitionTime Limit:1000MSMemory Limit:65536KTotal Submissions:2909Accepted:1262Special JudgeDescriptionThe cows have been sent on a mission through space to acquire a new milking machine for their barn. They are flying through a cluster of stars containing N (1 <= N <= 50,000) planets, 阅读全文
posted @ 2013-04-14 09:12 Jack Ge 阅读(389) 评论(0) 推荐(0) 编辑
摘要:Power NetworkTime Limit:2000MSMemory Limit:32768KTotal Submissions:19870Accepted:10452DescriptionA power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0 b 阅读全文
posted @ 2013-04-14 08:16 Jack Ge 阅读(512) 评论(0) 推荐(1) 编辑
摘要:1493: 平面划分http://www.acmore.net/problem.php?id=1493Time Limit:1 SecMemory Limit:128 MBSubmit:139Solved:32SubmitStatusWeb BoardDescription一条直线能够将平面分成2部分,两条直线能够将平面分成4部分,而对于一条“V”型线而言,平面被分成2部分,两条“V”型线最多能够将平面分成7部分。对于椭圆封闭曲线对平面的划分又将不一样,任意两个椭圆至多有两个交点。现在给定一个N,你能够计算出三种不同情况下,空间最多被划分出多少个部分吗?Input若干组测试数据,每组测试数据占 阅读全文
posted @ 2013-04-13 21:50 Jack Ge 阅读(363) 评论(0) 推荐(0) 编辑
摘要:1492: 费马定理http://www.acmore.net/problem.php?id=1492Time Limit:1 SecMemory Limit:128 MBSubmit:82Solved:14SubmitStatusWeb BoardDescription以数学家命名的定理有很多,其中费马定理就是其中之一,费马定理表明如果一个素数p不能整除整数a那么a^(p-1)%p=1恒成立。试验可知p-1并不一定是该式成立的最小指数,那么你能找出最小的指数x满足a^x%p=1吗?Input若干组测试数据,每组数据占一行共两个整数a(1#include#include#includeusin 阅读全文
posted @ 2013-04-13 21:01 Jack Ge 阅读(411) 评论(0) 推荐(0) 编辑
摘要:1494: 连续子串和续http://www.acmore.net/problem.php?id=1494Time Limit:10 SecMemory Limit:128 MBSubmit:99Solved:18SubmitStatusWeb BoardDescription小Y要去参加一场笔试,这场笔试有N道题目,每道题目有不同的分值和难度,分别为ai和bi。小Y想知道从某一题开始,至少连续K道题目,分值的和与难度的和的比率最大是多少?Input若干组测试数据,每组测试数据占3行。第一行输出两个正整数N(1<=N<=10^6),K(1<=K<=N)。第二行N个正整数 阅读全文
posted @ 2013-04-13 20:31 Jack Ge 阅读(387) 评论(0) 推荐(0) 编辑
摘要:1490: 连续子串和http://www.acmore.net/problem.php?id=1490Time Limit:1 SecMemory Limit:128 MBSubmit:209Solved:36SubmitStatusWeb BoardDescription小Y前段时间刚刚做完连续子串和问题,相信大家对连续子串和也都不陌生,现在小Y又碰到了一个新的难题,给定N个整数,求至少K个数连续的最大和为多少?Input若干组测试数据,每组数据第一行给出两个数N(1#include#includeusing namespace std;const int maxn=1000010;con 阅读全文
posted @ 2013-04-13 20:07 Jack Ge 阅读(282) 评论(0) 推荐(0) 编辑
摘要:1489: 数字排列http://www.acmore.net/problem.php?id=1489Time Limit:1 SecMemory Limit:128 MBSubmit:213Solved:77SubmitStatusWeb BoardDescription小Y得到了一个数,他认为相邻位上的数字与数字之间会产生不良影响,比如123,1和2之间产生一个不良影响值,2和3之间产生一个不良影响值。现在他想调整这个数每位的数字的顺序,使得最终得到的数的总的不良影响值最小,且没有前导0。Input输入数据的第一行为T表示有T组数据。每组数据先输入一个整数n(0#include#inclu 阅读全文
posted @ 2013-04-13 18:10 Jack Ge 阅读(386) 评论(0) 推荐(0) 编辑
摘要:KingTime Limit:1000MSMemory Limit:10000KTotal Submissions:8492Accepted:3203DescriptionOnce, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: ``If my child was a son and if only he was a sound king.'' After nine months her child was born, and indeed, sh 阅读全文
posted @ 2013-04-13 11:04 Jack Ge 阅读(589) 评论(1) 推荐(0) 编辑
摘要:Cashier EmploymentTime Limit:1000MSMemory Limit:10000KTotal Submissions:6401Accepted:2312DescriptionA supermarket in Tehran is open 24 hours a day every day and needs a number of cashiers to fit its need. The supermarket manager has hired you to help him, solve his problem. The problem is that the s 阅读全文
posted @ 2013-04-13 10:18 Jack Ge 阅读(1113) 评论(0) 推荐(0) 编辑
摘要:Network of SchoolsTime Limit:1000MSMemory Limit:10000KTotal Submissions:8632Accepted:3408DescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes software (the “receiving sc 阅读全文
posted @ 2013-04-13 08:15 Jack Ge 阅读(215) 评论(0) 推荐(0) 编辑
摘要:IntervalsTime Limit:2000MSMemory Limit:65536KTotal Submissions:18595Accepted:6976DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn.Write a program that:reads the number of intervals, their end points and integers c1, ..., cn from the standard input,computes the 阅读全文
posted @ 2013-04-12 17:34 Jack Ge 阅读(152) 评论(0) 推荐(0) 编辑
摘要:WallsTime Limit:1000MSMemory Limit:10000KTotal Submissions:7166Accepted:3533DescriptionIn a country, great walls have been built in such a way that every great wall connects exactly two towns. The great walls do not cross each other. Thus, the country is divided into such regions that to move from o 阅读全文
posted @ 2013-04-12 16:32 Jack Ge 阅读(332) 评论(0) 推荐(0) 编辑
摘要:PIGSTime Limit:1000MSMemory Limit:10000KTotal Submissions:13440Accepted:5932DescriptionMirko works on a pig farm that consists of M locked pig-houses and Mirko can't unlock any pighouse because he doesn't have the keys. Customers come to the farm one after another. Each of them has keys to s 阅读全文
posted @ 2013-04-12 15:34 Jack Ge 阅读(536) 评论(0) 推荐(0) 编辑
摘要:Domino EffectTime Limit:1000MSMemory Limit:65536KTotal Submissions:6486Accepted:1641DescriptionDid you know that you can use domino bones for other things besides playing Dominoes? Take a number of dominoes and build a row by standing them on end with only a small distance in between. If you do it r 阅读全文
posted @ 2013-04-12 14:14 Jack Ge 阅读(577) 评论(0) 推荐(0) 编辑
摘要:Stockbroker GrapevineTime Limit:1000MSMemory Limit:10000KTotal Submissions:22649Accepted:12348DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the st 阅读全文
posted @ 2013-04-12 13:49 Jack Ge 阅读(341) 评论(0) 推荐(0) 编辑
摘要:Sorting It All OutTime Limit:1000MSMemory Limit:10000KTotal Submissions:23082Accepted:7978DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A, B, C, D i 阅读全文
posted @ 2013-04-12 12:07 Jack Ge 阅读(250) 评论(0) 推荐(0) 编辑
摘要:A Plug for UNIXTime Limit:1000MSMemory Limit:65536KTotal Submissions:12318Accepted:4079DescriptionYou are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an international mandate to make the free flow of information and idea 阅读全文
posted @ 2013-04-12 10:35 Jack Ge 阅读(270) 评论(0) 推荐(0) 编辑
摘要:昂贵的聘礼Time Limit:1000MSMemory Limit:10000KTotal Submissions:30252Accepted:8465Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替他弄来其他的东西,他可 阅读全文
posted @ 2013-04-12 09:53 Jack Ge 阅读(245) 评论(0) 推荐(0) 编辑
摘要:Uncle Tom's Inherited Land*Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 11Accepted Submission(s) : 7Special JudgeProblem DescriptionYour old uncle Tom inherited a piece of land from his great-great-uncle. Originally, the property had been in 阅读全文
posted @ 2013-04-11 21:48 Jack Ge 阅读(342) 评论(0) 推荐(0) 编辑
摘要:More lumber is requiredTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 280Accepted Submission(s): 78Problem Description“More lumber is required” When the famous warcrafts player Sky wants to build a Central Town, he finds there is not enough lu 阅读全文
posted @ 2013-04-11 14:38 Jack Ge 阅读(525) 评论(0) 推荐(0) 编辑
摘要:Paint The WallTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 120Accepted Submission(s): 22Problem DescriptionAs a amateur artist, Xenocide loves painting the wall. The wall can be considered as a line consisting of n nodes. Each node has its ow 阅读全文
posted @ 2013-04-11 13:40 Jack Ge 阅读(337) 评论(0) 推荐(0) 编辑
摘要:Number SequenceTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 63Accepted Submission(s): 28Problem DescriptionGiven a number sequence b1,b2…bn.Please count how many number sequences a1,a2,...,ansatisfy the condition that a1*a2*...*an=b1*b2*…*bn(a 阅读全文
posted @ 2013-04-11 13:07 Jack Ge 阅读(471) 评论(0) 推荐(0) 编辑
摘要:50 years, 50 colorsTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 12Accepted Submission(s) : 8Problem DescriptionOn Octorber 21st, HDU 50-year-celebration, 50-color balloons floating around the campus, it's so nice, isn't it? To celebrate t 阅读全文
posted @ 2013-04-11 12:20 Jack Ge 阅读(237) 评论(0) 推荐(0) 编辑
摘要:Machine ScheduleTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 30Accepted Submission(s) : 19Problem DescriptionAs we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduli 阅读全文
posted @ 2013-04-10 22:56 Jack Ge 阅读(417) 评论(0) 推荐(0) 编辑
摘要:Drainage DitchesTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 51Accepted Submission(s) : 33Problem DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is cove 阅读全文
posted @ 2013-04-10 13:38 Jack Ge 阅读(1980) 评论(0) 推荐(0) 编辑
摘要:Safe Or UnsafeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 999Accepted Submission(s): 378 Problem DescriptionJavac++ 一天在看计算机的书籍的时候,看到了一个有趣的东西!每一串字符都可以被编码成一些数字来储存信息,但是不同的编码方式得到的储存空间是不一样的!并且当储存空间大于一定的值的时候是不安全的!所以Javac++ 就想是否有一种方式是可以得到字符编码最小的空间值!显 阅读全文
posted @ 2013-04-09 21:15 Jack Ge 阅读(386) 评论(0) 推荐(0) 编辑
摘要:哈夫曼编码简介(转)2010年03月17日|本网站遵守CC版权协议转载请注明出自www.thecodeway.com哈弗曼编码几乎是所有压缩算法的基础,其实这个算法并不复杂,简单的理解就是,如何用更短的bit来编码数据。 我们知道普通的编码都是定长的,比如常用的ASCII编码,每个字符都是8个bit:字符编码A00101001B00101010C00101011……这样,计算机就能很方便的把由0和1组成的数据流解析成原始信息,但我们知道,在很多情况下,数据文件中的字符出现的概率是不均匀的,比如在一篇英语文章中,字母“E”出现的频率最高,“Z”最低,如果我们使用不定长的bit编码,频率高的字母用 阅读全文
posted @ 2013-04-09 15:41 Jack Ge 阅读(925) 评论(0) 推荐(0) 编辑
摘要:Balanced NumberTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 965Accepted Submission(s): 404 Problem DescriptionA balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each 阅读全文
posted @ 2013-04-03 14:39 Jack Ge 阅读(1706) 评论(7) 推荐(0) 编辑
摘要:How many integers can you findTime Limit: 12000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2767Accepted Submission(s): 778 Problem DescriptionNow you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they 阅读全文
posted @ 2013-04-03 08:08 Jack Ge 阅读(2307) 评论(0) 推荐(0) 编辑
摘要:Co-primeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 626Accepted Submission(s): 234 Problem DescriptionGiven a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N. Two integers are s 阅读全文
posted @ 2013-04-02 12:22 Jack Ge 阅读(1871) 评论(1) 推荐(1) 编辑
摘要:Eddy's爱好Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 900Accepted Submission(s): 397 Problem DescriptionIgnatius 喜欢收集蝴蝶标本和邮票,但是Eddy的爱好很特别,他对数字比较感兴趣,他曾经一度沉迷于素数,而现在他对于一些新的特殊数比较有兴趣。 这些特殊数是这样的:这些数都能表示成M^K,M和K是正整数且K>1。 正当他再度沉迷的时候,他发现不知道什么时候才能知 阅读全文
posted @ 2013-04-02 11:16 Jack Ge 阅读(1493) 评论(2) 推荐(0) 编辑
摘要:病毒侵袭持续中Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3920Accepted Submission(s): 1408 Problem Description小t非常感谢大家帮忙解决了他的上一个问题。然而病毒侵袭持续中。在小t的不懈努力下,他发现了网路中的“万恶之源”。这是一个庞大的病毒网站,他有着好多好多的病毒,但是这个网站包含的病毒很奇怪,这些病毒的特征码很短,而且只包含“英文大写字符”。当然小t好想好想为民除害,但是小t从来不打 阅读全文
posted @ 2013-04-01 15:20 Jack Ge 阅读(321) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示