03 2013 档案
摘要:病毒侵袭Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6515Accepted Submission(s): 1721 Problem Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~ 但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一。小t如此
阅读全文
摘要:Keywords SearchTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 22721Accepted Submission(s): 7553 Problem DescriptionIn the modern time, Search engine came into the life of everybody like Google, Baidu, etc. Wiskey also wants to bring this feature
阅读全文
摘要:What Are You Talking AboutTime Limit : 10000/5000ms (Java/Other)Memory Limit : 102400/204800K (Java/Other)Total Submission(s) : 13Accepted Submission(s) : 8Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he didn't know
阅读全文
摘要:Digital SquareTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 649Accepted Submission(s): 297 Problem DescriptionGiven an integer N,you should come up with the minimumnonnegativeinteger M.M meets the follow condition: M2%10x=N (x=0,1,2,3....)InputT
阅读全文
摘要:The Last Non-zero DigitTime Limit:1000MSMemory Limit:65536KTotal Submissions:4259Accepted:1205DescriptionIn this problem you will be given two decimal integer number N, M. You will have to find the last non-zero digit of theNPM.This means no of permutations of N things taking M at a time.InputThe in
阅读全文
摘要:Legal or NotTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2672Accepted Submission(s): 1191 Problem DescriptionACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many &
阅读全文
摘要:(转)http://www.cnblogs.com/XBWer/archive/2012/06/24/2560532.htmlACM中java的使用这里指的java速成,只限于java语法,包括输入输出,运算处理,字符串和高精度的处理,进制之间的转换等,能解决OJ上的一些高精度题目。1. 输入:格式为:Scanner cin = new Scanner (new BufferedInputStream(System.in));例程:import java.io.*;import java.math.*;import java.util.*;import java.text.*;public c
阅读全文
摘要:A + B Problem IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 149365Accepted Submission(s): 28157 Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line
阅读全文
摘要:Hat's FibonacciTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4547Accepted Submission(s): 1544 Problem DescriptionA Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1. F(1
阅读全文
摘要:N!Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 40204Accepted Submission(s): 11162 Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, process to the end of file.OutputFor each N, output N!
阅读全文
摘要:Children’s QueueTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8194Accepted Submission(s): 2603 Problem DescriptionThere are many students in PHT School. One day, the headmaster whose name is PigHeader wanted all students stand in a line. He pres
阅读全文
摘要:大菲波数Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7677Accepted Submission(s): 2557 Problem DescriptionFibonacci数列,定义如下: f(1)=f(2)=1 f(n)=f(n-1)+f(n-2) n>=3。 计算第n项Fibonacci数值。Input输入第一行为一个整数N,接下来N行为整数Pi(1<=Pi<=1000)。Output输出为N行,每行为对应的f(P
阅读全文
摘要:大明A+BTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5747Accepted Submission(s): 1957 Problem Description话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”。 这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法。现在,给你两个正的小数A和B,你的任务是代表大明计算出A+B的值。Input本题目包含多组测试数据,请处理到文件
阅读全文
摘要:字串数Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2142Accepted Submission(s): 458 Problem Description一个A和两个B一共可以组成三种字符串:"ABB","BAB","BBA". 给定若干字母和它们相应的个数,计算一共可以组成多少个不同的字符串.Input每组测试数据分两行,第一行为n(1<=n<=26),表示不同字母的
阅读全文
摘要:ExponentiationTime Limit: 1000/500 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4973Accepted Submission(s): 1353 Problem DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of t
阅读全文
摘要:%ALLUSERSPROFILE% : 列出所有用户Profile文件位置。%APPDATA% : 列出应用程序数据的默认存放位置。%CD% : 列出当前目录。%CLIENTNAME% : 列出联接到终端服务会话时客户端的NETBIOS名。%CMDCMDLINE% : 列出启动当前cmd.exe所使用的命令行。%CMDEXTVERSION% : 命令出当前命令处理程序扩展版本号。%CommonProgramFiles% : 列出了常用文件的文件夹路径。%COMPUTERNAME% : 列出了计算机名。%COMSPEC% : 列出了可执行命令外壳(命令处理程序)的路径。%DATE% : 列出当前
阅读全文
摘要:RailroadTime Limit : 4000/2000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 16Accepted Submission(s) : 13Problem DescriptionA train yard is a complex series of railroad tracks for storing, sorting, or loading/unloading railroad cars. In this problem, the railroad track
阅读全文
摘要:漫步校园Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 41Accepted Submission(s) : 14Problem DescriptionLL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实验楼处于
阅读全文
摘要:EightTime Limit:1000MSMemory Limit:65536KTotal Submissions:19839Accepted:8834Special JudgeDescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and a
阅读全文
摘要:Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8405Accepted Submission(s): 2499 Special JudgeProblem DescriptionThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Prince
阅读全文
摘要:RescueTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10446Accepted Submission(s): 3828 Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALL
阅读全文
摘要:Advanced FruitsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1083Accepted Submission(s): 526 Special JudgeProblem DescriptionThe company "21st Century Fruits" has specialized in creating new sorts of fruits by transferring genes from o
阅读全文
摘要:WarcraftTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 751Accepted Submission(s): 383 Problem DescriptionHave you ever played the Warcraft?It doesn't matter whether you have played it !We will give you such an experience.There are so many Her
阅读全文
摘要:Fast FoodTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1464Accepted Submission(s): 633 Problem DescriptionThe fastfood chain McBurger owns several restaurants along a highway. Recently, they have decided to build several depots along the highway
阅读全文
摘要:ZipperTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4575Accepted Submission(s): 1629 Problem DescriptionGiven three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The fi
阅读全文
摘要:Free DIY TourTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2218Accepted Submission(s): 717 Problem DescriptionWeiwei is a software engineer of ShiningSoft. He has just excellently fulfilled a software project with his fellow workers. His boss is
阅读全文
摘要:棋盘问题Time Limit : 2000/1000ms (Java/Other)Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 5Accepted Submission(s) : 3Problem Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个
阅读全文
摘要:Lost CowsTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 4Accepted Submission(s) : 1Problem DescriptionN (2 #include#includeusing namespace std;const int N=8010;#define L(rt) (rt>1; build(L,mid,L(rt)); build(mid+1,R,R(rt));}int query(int id,i...
阅读全文
摘要:胜利大逃亡(续)Time Limit : 4000/2000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 5Accepted Submission(s) : 4Problem DescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatiu
阅读全文
摘要:Employment PlanningTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2698Accepted Submission(s): 1061 Problem DescriptionA project manager wants to determine the number of the workers needed in every month. He does know the minimal number of the wor
阅读全文
摘要:龟兔赛跑Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7739Accepted Submission(s): 2977 Problem Description据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭州下沙某农业园卧薪尝胆潜心修炼,终于练成了绝技,能够毫不休息得以恒定的速度(VR m/s)一直跑。兔子一直想找机会好好得教训一下乌龟,以雪前耻。 最近正值HDU举办50周年校庆
阅读全文
摘要:FatMouse and CheeseTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3194Accepted Submission(s): 1253 Problem DescriptionFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is lab
阅读全文
摘要:Constructing Roads In JGShining's KingdomTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10441Accepted Submission(s): 2990 Problem DescriptionJGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in t
阅读全文
摘要:FatMouse's SpeedTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6276Accepted Submission(s): 2735 Special JudgeProblem DescriptionFatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a
阅读全文
摘要:How many waysTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1654Accepted Submission(s): 1016 Problem Description这是一个简单的生存游戏,你控制一个机器人从一个棋盘的起始点(1,1)走到棋盘的终点(n,m)。游戏的规则描述如下: 1.机器人一开始在棋盘的起始点并有起始点所标有的能量。 2.机器人只能向右或者向下走,并且每走一步消耗一单位能量。 3.机器人不能在原地停留。 4.当机
阅读全文
摘要:Problem GTriangle CountingInput:Standard InputOutput:Standard OutputYou are givennrods of length 1, 2…, n. You have to pick any 3 of them & build a triangle. How many distinct triangles can you make? Note that, two triangles will be considered different if they have at least 1 pair of arms with
阅读全文
摘要:Problem AChess QueenInput:Standard InputOutput:Standard OutputYou probably know how the game of chess is played and how chess queen operates. Two chess queens are in attacking position when they are on same row, column or diagonal of a chess board. Suppose two such chess queens (one black and the ot
阅读全文
摘要:Matrix Swapping IITime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 793Accepted Submission(s): 537 Problem DescriptionGiven an N * M matrix with each entry equal to 0 or 1. We can find some rectangles in the matrix whose entries are all 1, and we de
阅读全文
摘要:Largest SubmatrixTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 839Accepted Submission(s): 407 Problem DescriptionNow here is a matrix with letter 'a','b','c','w','x','y','z' and you can cha
阅读全文
摘要:BeansTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1819Accepted Submission(s): 921 Problem DescriptionBean-eating is an interesting game, everyone owns an M*N matrix, which is filled with different qualities beans. Meantime, there is only one be
阅读全文
摘要:CoinsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4071Accepted Submission(s): 1629 Problem DescriptionWhuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He d
阅读全文
摘要:The Number of setTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 889Accepted Submission(s): 550 Problem DescriptionGiven you n sets.All positive integers in sets are not less than 1 and not greater than m.If use these sets to combinate the new set
阅读全文
摘要:Goldbach's ConjectureTime Limit:1000MSMemory Limit:65536KTotal Submissions:9192Accepted:5357DescriptionFor any even number n greater than or equal to 4, there exists at least one pair of prime numbersp1andp2such thatn=p1+p2This conjecture has not been proved nor refused yet. No one is sure wheth
阅读全文
摘要:最大报销额Time Limit : 1000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 29Accepted Submission(s) : 11Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。Input测试输入包含若干测试用例
阅读全文
摘要:X mod f(x)Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1014Accepted Submission(s): 453 Problem DescriptionHere is a function f(x): int f ( int x ) { if ( x == 0 ) return 0; return f ( x / 10 ) + x % 10; } Now, you want to ...
阅读全文
摘要:威威猫系列故事——篮球梦Time Limit: 300/100 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 774Accepted Submission(s): 200 Problem Description 威威猫十分迷恋篮球比赛,是忠实的NBA球迷,他常常幻想自己那肥硕的身躯也能飞起扣篮。另外,他对篮球教练工作也情有独钟,特别是对比赛的战术,投篮选择方面也是很有研究,下面就是威威猫研究过的一个问题: 一场NBA篮球比赛总共48分钟,假如我们现在已经知道当前比分 A:B,...
阅读全文
摘要:Tempter of the BoneTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 3Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he
阅读全文
摘要:变形课Time Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 4Accepted Submission(s) : 3Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,
阅读全文
摘要:Tree RecoveryTime Limit:1000MSMemory Limit:65536KTotal Submissions:8946Accepted:5647DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes. This is an example of one of her creations: .
阅读全文
摘要:Rectangle and CircleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1933Accepted Submission(s): 451 Problem DescriptionGiven a rectangle and a circle in the coordinate system(two edges of the rectangle are parallel with the X-axis, and the other t
阅读全文
摘要:Football ScoreTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14Accepted Submission(s): 3Problem DescriptionFootball is one of the greatest games in the world. Lots of people like to play football. After one season of matches, the header has to ca
阅读全文
摘要:畅通工程Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 19927Accepted Submission(s): 10252 Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?Input测试输入包含若干测试用例。每个测试用例的第1
阅读全文
摘要:More is betterTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 327680/102400 K (Java/Others) Total Submission(s): 8214Accepted Submission(s): 3069 Problem DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex,the more boys come, the better it will be
阅读全文
摘要:小希的迷宫Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 16780Accepted Submission(s): 5133 Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为
阅读全文
摘要:How Many TablesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7776Accepted Submission(s): 3780 Problem DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he ne
阅读全文
摘要:Intersecting LinesTime Limit:1000MSMemory Limit:10000KTotal Submissions:7897Accepted:3613DescriptionWe all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2) intersect
阅读全文
摘要:Number SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 930 Accepted Submission(s): 367Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to c
阅读全文
摘要:Big Event in HDUTime Limit: 1000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1Accepted Submission(s): 1Problem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had ever
阅读全文
摘要:5: DecomposeResultTIME LimitMEMORY LimitRun TimesAC TimesJUDGE3s8192K318182StandardGive you an positive integer N(1<=N<=30), you can decompose n to several positive integers: A1, A2, ... Ak. (1<=k<=N) And A1 + A2 + ... + Ak = N. Now i want to know what's the maximal product of these
阅读全文
摘要:献给杭电五十周年校庆的礼物Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 479 Accepted Submission(s): 301Problem Description或许你曾经牢骚满腹 或许你依然心怀忧伤 或许你近在咫尺 或许你我天各一方对于每一个学子 母校 永远航行在 生命的海洋今年是我们杭电建校五十周年,这是一个值得祝福的日子。我们该送给母校一个怎样的礼物呢?对于目前的大家来说,最好的礼物当然是省赛中的好成绩,我不能参赛,就送给学
阅读全文
摘要:Wolf and RabbitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1289 Accepted Submission(s): 750Problem DescriptionThere is a hill with n holes around. The holes are signed from 0 to n-1.A rabbit must hide in one of the holes. A wolf searches the r
阅读全文
摘要:汉诺塔VIITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 863 Accepted Submission(s): 642Problem Descriptionn个盘子的汉诺塔问题的最少移动次数是2^n-1,即在移动过程中会产生2^n个系列。由于发生错移产生的系列就增加了,这种错误是放错了柱子,并不会把大盘放到小盘上,即各柱子从下往上的大小仍保持如下关系 : n=m+p+q a1>a2>...>am b1>b2>
阅读全文
摘要:1451.字符串的移动http://acm.xmu.edu.cn/JudgeOnline/problem.php?id=1451Time Limit: 1000 MS Memory Limit: 65536 K Total Submissions: 14 (6 users) Accepted: 2 (2 users) [ My Solution ] Description给定非空字符串S和正整数k, 我们定义函数Shift(S, k)表示将字符串S循环右移k位, 例如Shift("abc", 1) = "cab", Shift("abc&quo
阅读全文
摘要:National TreasuresTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 3Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionThe great hall of the national museum has been robbed few times recently. Everyone is now
阅读全文
摘要:棋盘游戏Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 1Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个
阅读全文
摘要:Fire NetTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 1Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n
阅读全文
摘要:The Accomodation of StudentsTime Limit : 5000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 1Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionThere are a group of students. Some of them may know each other, while others d
阅读全文
摘要:SegmentsTime Limit:1000MSMemory Limit:65536KTotal Submissions:7363Accepted:2207DescriptionGivennsegments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments have at least one point in common.In
阅读全文
摘要:[1271] Nth Day is Which Dayhttp://ac.nbutoj.com/Problem/view.xhtml?id=1271时间限制: 1000 ms 内存限制: 65535 K问题描述The first day is 1 year 1 month 1 day, so the Nth day is which day?输入Input until EOF. Input a positive integer N means the Nth day(0#include#includeusing namespace std;int m1[12]={31,28,31,30,31,
阅读全文
摘要:ChessboardTime Limit:2000MSMemory Limit:65536KTotal Submissions:11078Accepted:3449DescriptionAlice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2 to cover the board. However, she thinks it too easy to bob, so
阅读全文
摘要:二叉搜索树Time Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 2Accepted Submission(s) : 2Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description判断两序列是否为同一二叉搜索树序列Input开始一个数n,(1#include#includeusing namespace std;const int N=2010;char str[30];int n
阅读全文
摘要:BillboardTime Limit: 20000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5951Accepted Submission(s): 2707Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the
阅读全文
摘要:Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5950Accepted Submission(s): 3625Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai
阅读全文
摘要:Toy StorageTime Limit:1000MSMemory Limit:65536KTotal Submissions:3024Accepted:1726DescriptionMom and dad have a problem: their child, Reza, never puts his toys away when he is finished playing with them. They gave Reza a rectangular box to put his toys in. Unfortunately, Reza is rebellious and obeys
阅读全文
摘要:TOYSTime Limit:2000MSMemory Limit:65536KTotal Submissions:8275Accepted:3922DescriptionCalculate the number of toys that land in each bin of a partitioned toy box.Mom and dad have a problem - their child John never puts his toys away when he is finished playing with them. They gave John a rectangular
阅读全文
摘要:Help JimmyTime Limit:1000MSMemory Limit:10000KTotal Submissions:7701Accepted:2447Description"Help Jimmy" 是在下图所示的场景上完成的游戏。场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米/秒。当Jimmy跑到平台的边缘时,开始继续下落。Jimmy每次下落的高度不能超过MAX米,不然就会
阅读全文
摘要:Radar InstallationTime Limit:1000MSMemory Limit:10000KTotal Submissions:38000Accepted:8443DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the
阅读全文
摘要:The Pilots Brothers' refrigeratorTime Limit:1000MSMemory Limit:65536KTotal Submissions:14076Accepted:5275Special JudgeDescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator door. Ev
阅读全文
摘要:Flip GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:22492Accepted:9717DescriptionFlip 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 either it's black
阅读全文
摘要:Number SequenceTime Limit:1000MSMemory Limit:10000KTotal Submissions:29413Accepted:8198DescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk. Each group Sk consists of a sequence of positive integer num
阅读全文
摘要:Bookshelf 2http://acm.hdu.edu.cn/webcontest/contest_showproblem.php?pid=1002&ojid=1&cid=2967&hide=0Time Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 76Accepted Submission(s) : 37Problem DescriptionFarmer John recently bought another books
阅读全文