
HDU OJ
老虞面馆
这个作者很懒,什么都没留下…
展开
-
HDUOJ入门
首先呢,这个分类主要用于ACM的学习,所在OJ为杭州电子科技大学所属。网址为http://acm.hdu.edu.cn/。国内相关的OJ也有很多,如POJ,ZOJ,俄罗斯的Codeforces也是相当不错的。注册好账号。进入Problem Archive即可开始ACM之旅。当然了解ACM的输入输出规则是必须的。新手可以通过ACM Steps进行练习。各大OJ具体规则不同。HDUOJ的规则可原创 2015-07-13 20:39:19 · 1800 阅读 · 0 评论 -
2199 Can you solve this equation?
Problem 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 your lucky. InputThe first line of the inp原创 2015-09-16 21:23:27 · 488 阅读 · 0 评论 -
HDOJ 1010 Tempter of the Bone
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He原创 2016-01-01 21:27:00 · 302 阅读 · 0 评论 -
hdu 3787 A+B(简单字符串处理)
Problem Description给定两个整数A和B,其表示形式是:从个位开始,每三位数用逗号","隔开。现在请计算A+B的结果,并以正常形式输出。Input输入包含多组数据数据,每组数据占一行,由两个整数A和B组成(-10^9 < A,B < 10^9)。Output请计算A+B的结果,并以正常形式输出,每组数据占一行。Sample Input-234,567,890 123,456,原创 2016-03-20 22:19:16 · 400 阅读 · 0 评论 -
BestCoder #80 1001 HDU5665
Problem Description Chaos August likes to study the lucky numbers. For a set of numbers S,we set the minimum non-negative integer,which can’t be gotten by adding the number in S,as the lucky num原创 2016-04-16 22:50:08 · 410 阅读 · 0 评论 -
hdu 1800 Flying to the Mars(map简单题)
Problem DescriptionIn the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF decides to attack Kscinow who ruling原创 2016-03-21 09:40:55 · 388 阅读 · 0 评论 -
HDU 1029 Ignatius and the Princess IV
Problem Description “OK, you are not too bad, em… But you can never pass the next test.” feng5166 says. “I will tell you an odd number N, and then N integers. There will be a special integer amo原创 2016-07-07 23:19:53 · 406 阅读 · 0 评论 -
HDU 2064 汉诺塔III
Problem Description 约19世纪末,在欧州的商店中出售一种智力玩具,在一块铜板上有三根杆,最左边的杆上自上而下、由小到大顺序串着由64个圆盘构成的塔。目的是将最左边杆上的盘全部移到右边的杆上,条件是一次只能移动一个盘,且不允许大盘放在小盘的上面。 现在我们改变游戏的玩法,不允许直接从最左(右)边移到最右(左)边(每次移动一定是移到中间杆或从中间移出),也不允许大盘放到下盘原创 2016-07-08 23:31:44 · 360 阅读 · 0 评论 -
HDOJ 1004 Let the Balloon Rise
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges’ favorite time is guessing the most popular problem. When the contest i原创 2016-08-10 13:01:00 · 500 阅读 · 0 评论 -
2049 不容易系列之(4)——考新郎
Problem Description国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做"考新郎",具体的操作是这样的:首先,给每位新娘打扮得几乎一模一样,并盖上大大的红盖头随机坐成一排;然后,让各位新郎寻找自己的新娘.每人只准找一个,并且不允许多人找一个.最后,揭开盖头,如果找错了对象就要当众跪搓衣板...原创 2015-09-16 22:44:30 · 369 阅读 · 0 评论 -
2064 汉诺塔III
Problem Description约19世纪末,在欧州的商店中出售一种智力玩具,在一块铜板上有三根杆,最左边的杆上自上而下、由小到大顺序串着由64个圆盘构成的塔。目的是将最左边杆上的盘全部移到右边的杆上,条件是一次只能移动一个盘,且不允许大盘放在小盘的上面。现在我们改变游戏的玩法,不允许直接从最左(右)边移到最右(左)边(每次移动一定是移到中间杆或从中间移出),也不允许大盘放到下盘原创 2015-09-16 22:41:12 · 396 阅读 · 0 评论 -
1029 Ignatius and the Princess IV
Problem Description"OK, you are not too bad, em... But you can never pass the next test." feng5166 says."I will tell you an odd number N, and then N integers. There will be a special integer a原创 2015-09-16 22:38:24 · 525 阅读 · 0 评论 -
4540 威威猫系列故事——打地鼠
Problem Description 威威猫最近不务正业,每天沉迷于游戏“打地鼠”。 每当朋友们劝他别太着迷游戏,应该好好工作的时候,他总是说,我是威威猫,猫打老鼠就是我的工作! 无话可说... 我们知道,打地鼠是一款经典小游戏,规则很简单:每隔一个时间段就会从地下冒出一只或多只地鼠,玩游戏的人要做的就是打地鼠。 假设: 1、每一个时刻我们只能原创 2015-08-24 21:30:39 · 746 阅读 · 0 评论 -
1001 A + B Problem
Problem DescriptionCalculate A + B. InputEach line will contain two integers A and B. Process to end of file. OutputFor each case, output A + B in one line.原创 2015-08-24 22:20:17 · 445 阅读 · 0 评论 -
1002 A + B Problem II
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 of the input contains an integer原创 2015-08-28 19:55:48 · 453 阅读 · 0 评论 -
1005 Number Sequence
Problem 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 calculate the value of f(n).原创 2015-08-28 20:10:32 · 469 阅读 · 0 评论 -
1159 Common Subsequence
Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there e原创 2015-08-06 23:53:25 · 593 阅读 · 0 评论 -
筛选法求素数
题目描述给定一个N(1Sample Input10Sample Output2 3 5 7求素数方法有很多种,最常见的是朴素解法,用2到sqrt(N)去除N这个数,若都不能除尽,则表明该数是个素数。在这里我们采用了另一种叫做删选法的方法。基于一个基本原理:素数的整数倍不是素数。具体实现:我们采用了一个数组来储存原创 2015-09-14 21:02:39 · 1421 阅读 · 0 评论 -
1325 Is It A Tree?
Problem DescriptionA 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 follow原创 2015-09-15 20:00:40 · 318 阅读 · 0 评论 -
1215 七夕节
Problem Description七夕节那天,月老来到数字王国,他在城门上贴了一张告示,并且和数字王国的人们说:"你们想知道你们的另一半是谁吗?那就按照告示上的方法去找吧!"人们纷纷来到告示前,都想知道谁才是自己的另一半.告示如下:数字N的因子就是所有比N小又能被N整除的所有正整数,如12的因子有1,2,3,4,6.你想知道你的另一半吗?原创 2015-09-15 19:42:26 · 591 阅读 · 0 评论 -
HDOJ 1005 Number Sequence
Problem Description A 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 calculate the value of f(n).Input The input原创 2016-08-11 13:46:58 · 244 阅读 · 0 评论