HDU
_Programmer_
这个作者很懒,什么都没留下…
展开
-
HDU#1286:找新朋友
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮原创 2016-10-09 11:18:55 · 219 阅读 · 0 评论 -
HDU#2504:又见GCD
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 有三个正整数a,b,c(a>0,b,c<10^6),其中c不等于b。若a和c的最大公约数为b,现已知a和b,求满足条件的最小的c。Input 第一行输入一个n,表示有n组测试数据,接下来的n行,每行输入两个正整数a,b。Outp原创 2016-10-13 07:37:10 · 227 阅读 · 0 评论 -
HDU#1008:Elevator
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numb原创 2016-10-04 17:43:41 · 253 阅读 · 0 评论 -
HDU#1019:Least Common Multiple
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible b原创 2016-10-04 17:49:37 · 227 阅读 · 0 评论 -
HDU#1021:Fibonacci Again
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).Input Input consis原创 2016-10-06 18:46:14 · 276 阅读 · 0 评论 -
HDU#1040:As Easy As A+B
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription These days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do s原创 2016-10-06 18:51:03 · 333 阅读 · 0 评论 -
HDU#1049:Climbing Worm
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription An inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but the原创 2016-10-07 09:09:52 · 199 阅读 · 0 评论 -
HDU#1062:Text Reverse
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription Ignatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should原创 2016-10-07 09:12:50 · 242 阅读 · 0 评论 -
HDU#1076:An Easy Task
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription Ignatius was born in a leap year, so he want to know when he could hold his birthday party. Can you tell him?Given原创 2016-10-07 09:15:33 · 294 阅读 · 0 评论 -
HDU#1205:吃糖果
Time Limit: 3000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u Description HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果原创 2016-10-08 15:57:01 · 412 阅读 · 0 评论 -
HDU#1215:七夕节
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:”你们想知道你们的另一半是谁吗?那就按照告示上的方法去找吧!” 人们纷纷来到告示前,都想知道谁才是自己的另一半.告示如下:数字N的因子就是所有比N小又原创 2016-10-08 16:01:06 · 179 阅读 · 0 评论 -
HDU#2304:Electrical Outlets
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription Roy has just moved into a new apartment. Well, actually the apartment itself is not very new, even dating back to t原创 2016-10-13 07:35:08 · 324 阅读 · 0 评论 -
HDU#2199:Can you solve this equation?
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription Now,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 pleas原创 2016-10-12 16:31:20 · 246 阅读 · 0 评论 -
HDU#1527:取石子游戏
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 有两堆石子,数量任意,可以不同。游戏开始由两个人轮流取石子。游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子;二是可以在两堆中同时取走相同数量的石子。最后把石子全部取完者为胜者。现在给出初始的两堆石子的数目,原创 2016-10-09 11:21:13 · 436 阅读 · 0 评论 -
HDU#1846:Brave Game
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试,就是一种勇敢(brave)的选原创 2016-10-09 11:23:13 · 203 阅读 · 0 评论 -
HDU#2035:人见人爱A^B
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方”Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0,则表示输入数据的结束,不做处原创 2016-10-10 09:28:41 · 217 阅读 · 0 评论 -
HDU#2069: Coin Change
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with the原创 2016-10-10 09:30:18 · 195 阅读 · 0 评论 -
HDU#2084:数塔
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗?Input 输入数原创 2016-10-10 12:35:20 · 225 阅读 · 0 评论 -
HDU#2088: Box of Bricks
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different原创 2016-10-11 15:41:11 · 279 阅读 · 0 评论 -
HDU#2097: Sky数
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription Sky从小喜欢奇特的东西,而且天生对数字特别敏感,一次偶然的机会,他发现了一个有趣的四位数2992,这个数,它的十进制数表示,其四位数字之和为2+9+9+2=22,它的十六进制数BB0,其四位数字之和也为22,同时它的十二进制数表原创 2016-10-11 15:43:03 · 323 阅读 · 0 评论 -
HDU#2140: Michael Scofield's letter
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription I believe many people are the fans of prison break. How clever Michael is!! In order that the message won’t be foun原创 2016-10-11 15:45:15 · 325 阅读 · 0 评论 -
HDU#2148: Score
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 转眼又到了一年的年末,Lele又一次迎来了期末考试。虽然说每年都要考试,不过今年的这场考试对Lele来说却意义重大。因为经济原因,如果今年没有排在班级前几名,而拿不到奖学金的话,家里便无力再供他继续读书。而且家里帮他都想好出路了―原创 2016-10-12 16:28:22 · 233 阅读 · 0 评论 -
HDU#2156:分数矩阵
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 我们定义如下矩阵: 1/1 1/2 1/3 1/2 1/1 1/2 1/3 1/2 1/1 矩阵对角线上的元素始终是1/1,对角线两边分数的分母逐个递增。 请求出这个矩阵的总和。Input 每行给定整数N (N<500原创 2016-10-12 16:29:43 · 266 阅读 · 0 评论 -
HDU#1231:最大连续子序列
Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64uDescription 给定K个整数的序列{ N1, N2, …, NK },其任意连续子序列可表示为{ Ni, Ni+1, …, Nj },其中 1 <= i <= j <= K。最大连续子序列是所有连续子序列中元素和最大的一个, 例如给定序列{原创 2016-10-08 16:11:48 · 275 阅读 · 0 评论