摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1213How Many TablesDescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner ... 阅读全文
posted @ 2015-06-29 11:27 GadyPu 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2822DogsDescriptionPrairie dog comes again! Someday one little prairie dog Tim wants to visit one of his... 阅读全文
posted @ 2015-06-28 21:09 GadyPu 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1242RescueDescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is des... 阅读全文
posted @ 2015-06-28 13:09 GadyPu 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5101SelectDescriptionOne day, Dudu, the most clever boy, heard of ACM/ICPC, which is a very interesting ... 阅读全文
posted @ 2015-06-28 13:01 GadyPu 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 看病要排队这个是地球人都知道的常识。 不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所以不能根据简单的先来先服务的原则。所以医院对每种病情规定了10种不同的优先级。级别为10的优先权最高,级别为1的优先权最低。医生在看病时,则会在他的队伍里面选择一个优先权最高的人进行诊治。如果遇到两个优先权一样的病人的话,则选择最早来排队的病人。 现在就请你帮助医院模拟这个看病过程。 阅读全文
posted @ 2015-06-27 17:35 GadyPu 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5112A Curious MattDescriptionThere is a curious man called Matt.One day, Matt's best friend Ted is wande... 阅读全文
posted @ 2015-06-27 15:25 GadyPu 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5154Harry and Magical ComputerDescriptionIn reward of being yearly outstanding magic student, Harry gets... 阅读全文
posted @ 2015-06-27 10:52 GadyPu 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1548A strange liftDescriptionThere is a strange lift.The lift can stop can at every floor as you want, a... 阅读全文
posted @ 2015-06-26 19:27 GadyPu 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1872稳定排序Description大家都知道,快速排序是不稳定的排序方法。如果对于数组中出现的任意a[i],a[j](i_ 2 #include 3 #include 4 #include 5 #incl... 阅读全文
posted @ 2015-06-26 19:11 GadyPu 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2579Dating with girls(2)DescriptionIf you have solved the problem Dating with girls(1).I think you can s... 阅读全文
posted @ 2015-06-25 22:01 GadyPu 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2578Dating with girls(1)DescriptionEveryone in the HDU knows that the number of boys is larger than the ... 阅读全文
posted @ 2015-06-25 21:53 GadyPu 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1541StarsDescriptionAstronomers often examine star maps where stars are represented by points on a plane... 阅读全文
posted @ 2015-06-24 21:26 GadyPu 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something happens to this process, such as mouse click, text change, the system will add a message to the queue. Meanwhile, the process will do a loop for getting message from the queue according to the priority value if it is not empty. Note that the less priority value means the higher pr 阅读全文
posted @ 2015-06-23 22:20 GadyPu 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1228A + BDescription读入两个小于100的正整数A和B,计算A+B.需要注意的是:A和B的每一位数字由对应的英文单词给出.Input测试输入包含若干测试用例,每个测试用例占一行,格式为"A ... 阅读全文
posted @ 2015-06-23 16:35 GadyPu 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1196Lowest BitDescriptionGiven an positive integer $A (1 \leq A \leq 100)$, output the lowest bit of $A.... 阅读全文
posted @ 2015-06-22 22:43 GadyPu 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3530SubsequenceDescriptionThere is a sequence of integers. Your task is to find the longest subsequence ... 阅读全文
posted @ 2015-06-22 21:05 GadyPu 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2098分拆素数和Description把一个偶数拆成两个不同素数的和,有几种拆法呢?Input输入包含一些正的偶数,其值不会超过10000,个数不会超过500,若遇0,则结束。Output对应每个偶数,输出... 阅读全文
posted @ 2015-06-21 20:46 GadyPu 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5273Dylans loves sequenceDescriptionDylans is given $N$ numbers $a[1]....a[N]$And there are $Q$ question... 阅读全文
posted @ 2015-06-21 19:19 GadyPu 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5272Dylans loves numbersDescriptionWho is Dylans?You can find his ID in UOJ and Codeforces.His another I... 阅读全文
posted @ 2015-06-21 19:07 GadyPu 阅读(144) 评论(0) 推荐(0) 编辑
摘要: ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(. As a smart ACMer, you want to get ACboy out of the monster's labyrinth.But when you arrive at the gate of the maze, the monste say :" I have heard that you are very clever, but if can't solve my problems, you will die with ACboy." The problems of the monster is sho 阅读全文
posted @ 2015-06-17 18:17 GadyPu 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3282{A} + {B}Description给你两个集合,要求{A} + {B}.注:同一个集合中不会有两个相同的元素.Input每组输入数据分为三行,第一行有两个数字$n,m(0 2 #include... 阅读全文
posted @ 2015-06-17 18:13 GadyPu 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3282Running MedianDescriptionFor this problem, you will write a program that reads in a sequence of 32-b... 阅读全文
posted @ 2015-06-16 18:06 GadyPu 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1316How Many Fibs?DescriptionRecall the definition of the Fibonacci numbers: $f_1 := 1$ $f_2 := 2$ $f_n ... 阅读全文
posted @ 2015-06-15 22:00 GadyPu 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1715大菲波数Description$Fibonacci$数列,定义如下:$f(1)=f(2)=1$$f(n)=f(n-1)+f(n-2) \ \ 3 \leq n$。计算第$n$项$Fibonacci$数... 阅读全文
posted @ 2015-06-15 21:49 GadyPu 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1212Train Problem IIDescriptionAs we all know the Train Problem I, the boss of the Ignatius Train Statio... 阅读全文
posted @ 2015-06-15 19:12 GadyPu 阅读(118) 评论(0) 推荐(0) 编辑
摘要: As part of an arithmetic competency program, your students will be given randomly generated lists of from 2 to 15 unique positive integers and asked to determine how many items in each list are twice some other item in the same list. You will need a program to help you with the grading. This program should be able to scan the lists and output the correct answer for each one. For example, given th 阅读全文
posted @ 2015-06-14 20:18 GadyPu 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1212Big NumberDescriptionAs we know, Big Number is always troublesome. But it's really important in our ... 阅读全文
posted @ 2015-06-14 17:36 GadyPu 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1250Hat's FibonacciDescriptionA Fibonacci sequence is calculated by adding the previous two members the ... 阅读全文
posted @ 2015-06-14 10:58 GadyPu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2203亲和串Description人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了... 阅读全文
posted @ 2015-06-13 18:15 GadyPu 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3999The order of a TreeDescriptionAs we know,the shape of a binary search tree is greatly related to the... 阅读全文
posted @ 2015-06-12 23:21 GadyPu 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://poj.org/problem?id=2299Ultra-QuickSortDescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm process... 阅读全文
posted @ 2015-06-12 19:57 GadyPu 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1908Double QueueDescriptionThe new founded Balkan Investment Group Bank (BIG-Bank) opened a new office i... 阅读全文
posted @ 2015-06-11 16:56 GadyPu 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1556Color the ballDescription$N$个气球排成一排,从左到右依次编号为$1,2,3....N.$每次给定2个整数$a\ b(a \leq b)$,lele便为骑上他的“小飞鸽"牌电... 阅读全文
posted @ 2015-06-10 20:29 GadyPu 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4288CoderDescriptionIn mathematics and computer science, an algorithm describes a set of procedures or i... 阅读全文
posted @ 2015-06-10 17:03 GadyPu 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5265pog loves szh IIDescriptionPog and Szh are playing games.There is a sequence with n numbers, Pog wil... 阅读全文
posted @ 2015-06-09 19:34 GadyPu 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5058So easyDescriptionSmall W gets two files. There are n integers in each file. Small W wants to know w... 阅读全文
posted @ 2015-06-08 21:10 GadyPu 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2091空心三角形Description把一个字符三角形掏空,就能节省材料成本,减轻重量,但关键是为了追求另一种视觉效果。在设计的过程中,需要给出各种花纹的材料和大小尺寸的三角形样板,通过电脑临时做出来,以便... 阅读全文
posted @ 2015-06-08 20:54 GadyPu 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5142NPY and FFTDescriptionA boy named NPY is learning FFT algorithm now.In that algorithm,he needs to do... 阅读全文
posted @ 2015-06-08 18:11 GadyPu 阅读(1387) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5264pog loves szh IDescriptionPog has lots of strings. And he always mixes two equal-length strings. For... 阅读全文
posted @ 2015-06-08 17:30 GadyPu 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1277全文检索Description我们大家经常用google检索信息,但是检索信息的程序是很困难编写的;现在请你编写一个简单的全文检索程序。问题的描述是这样的:给定一个信息流文件,信息完全有数字组成,数字... 阅读全文
posted @ 2015-06-03 22:44 GadyPu 阅读(182) 评论(0) 推荐(0) 编辑