杭电
你是人间四月天lemon
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj 3211 Washing Clothes
Description Dearboy was so busy recently that now he has piles of clothes to wash. Luckily, he has a beautiful and hard-working girlfriend to help him. The clothes are in varieties of colors but each ...原创 2019-04-15 16:49:43 · 180 阅读 · 0 评论 -
hdu1297 Children’s Queue
Problem Description There are many students in PHT School. One day, the headmaster whose name is PigHeader wanted all students stand in a line. He prescribed that girl can not be in single. In other w...原创 2019-04-17 15:42:48 · 196 阅读 · 0 评论 -
hdu 2069 Coin Change
Problem Description Suppose 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 amount of money. For example, if we have 11 ...原创 2019-04-17 19:17:53 · 163 阅读 · 0 评论 -
hdu1406 完数
Problem Description 完数的定义:如果一个大于1的正整数的所有因子之和等于它的本身,则称这个数是完数,比如6,28都是完数:6=1+2+3;28=1+2+4+7+14。 本题的任务是判断两个正整数之间完数的个数。 Input 输入数据包含多行,第一行是一个正整数n,表示测试实例的个数,然后就是n个测试实例,每个实例占一行,由两个正整数num1和num2组成,(1<num1,...原创 2019-04-17 21:00:13 · 149 阅读 · 0 评论 -
hdu 1712 ACboy needs your help
Problem Description ACboy 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 depending on the days he spend on it.How to arr...原创 2019-04-15 14:51:58 · 147 阅读 · 0 评论 -
hdu 1241 Oil Deposits
Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a ...原创 2019-04-22 20:26:56 · 181 阅读 · 0 评论 -
hdu 3177 Crixalis's Equipment
Problem Description Crixalis - Sand King used to be a giant scorpion(蝎子) in the deserts of Kalimdor. Though he’s a guardian of Lich King now, he keeps the living habit of a scorpion like living underg...原创 2019-04-18 19:34:19 · 204 阅读 · 0 评论 -
hdu 1284 钱币兑换问题
Problem Description 在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。 Input 每行只有一个正整数N,N小于32768。 Output 对应每个输入,输出兑换方法数。 Sample Input 2934 12553 Sample Output 718831 13137761 典型母函数应用,第一次做的时候没有打表,TLE了。...原创 2019-04-18 19:38:19 · 203 阅读 · 0 评论 -
hdu1061 Rightmost Digit
Problem Description Given a positive integer N, you should output the most right digit of N^N. Input The input contains several test cases. The first line of the input is a single integer T which is t...原创 2019-04-18 20:08:35 · 207 阅读 · 0 评论 -
hdu 1114 Piggy-Bank
Problem Description Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The i...原创 2019-04-19 10:36:23 · 156 阅读 · 0 评论 -
hdu1711 Number Sequence
Problem Description Given two sequences of numbers : a[1], a[2], … , a[N], and b[1], b[2], … , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = ...原创 2019-04-25 10:31:53 · 242 阅读 · 0 评论 -
hdu 3068 最长回文
Problem Description 给出一个只由小写英文字符a,b,c…y,z组成的字符串S,求S中最长回文串的长度. 回文就是正反读都是一样的字符串,如aba, abba等 Input 输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c…y,z组成的字符串S 两组case之间由空行隔开(该空行不用处理) 字符串长度len <= 110000 Output 每一行一...原创 2019-04-25 15:49:23 · 193 阅读 · 0 评论 -
杭电 2191 悼念512汶川大地震遇难同胞——珍惜现在,感恩生活
Problem Description 急!灾区的食物依然短缺! 为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。 请问:你用有限的资金最多能采购多少公斤粮食呢? 后记: 人生是一个充满了变数的生命过程,天灾、人祸、病痛是我们生命历程中不可预知的威胁。 月有阴晴圆缺,人有旦夕祸福,...原创 2019-04-14 16:12:58 · 151 阅读 · 0 评论 -
hdu1290 献给杭电五十周年校庆的礼物
Problem Description 或许你曾经牢骚满腹 或许你依然心怀忧伤 或许你近在咫尺 或许你我天各一方 对于每一个学子 母校 永远航行在 生命的海洋 今年是我们杭电建校五十周年,这是一个值得祝福的日子。我们该送给母校一个怎样的礼物呢?对于目前的大家来说,最好的礼物当然是省赛中的好成绩,我不能参赛,就送给学校一个DOOM III球形大蛋糕吧,这可是名牌,估计要花掉我半年的银子呢。 想象着正...原创 2019-04-17 11:18:14 · 156 阅读 · 0 评论 -
hdu 1176 免费馅饼
Problem Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身...原创 2019-04-21 22:09:05 · 133 阅读 · 0 评论 -
杭电1019 Least Common Multiple
Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15...原创 2019-04-16 09:51:45 · 131 阅读 · 0 评论 -
杭电 1028 Ignatius and the Princess III
Problem Description “Well, it seems the first problem is too easy. I will let you know how foolish you are later.” feng5166 says. “The second problem is, given an positive integer N, we define an equa...原创 2019-04-16 11:21:38 · 231 阅读 · 0 评论 -
hdu 1058 Holding Bin-Laden Captive!
Problem Description We all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reported that he hides in Hang Zhou of China! “Oh, God! How terribl...原创 2019-04-16 16:03:21 · 238 阅读 · 0 评论 -
hdu1069 Monkey and Banana
Problem Description A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some...原创 2019-04-20 20:46:47 · 184 阅读 · 0 评论 -
hdu1159 Common Subsequence
Problem Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, …, xm> another sequence Z = <z1, z2, …, ...原创 2019-04-20 21:22:43 · 152 阅读 · 0 评论 -
杭电 1164 Eddy's research I
Problem Description Eddy’s interest is very extensive, recently he is interested in prime number. Eddy discover the all number owned can be divided into the multiply of prime number, but he can’t writ...原创 2019-04-16 17:31:50 · 193 阅读 · 0 评论 -
杭电 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 is...原创 2019-04-13 19:51:50 · 119 阅读 · 0 评论 -
杭电 1196 Lowest Bit
Problem Description Given an positive integer A (1 <= A <= 100), output the lowest bit of A. For example, given A = 26, we can write A in binary form as 11010, so the lowest bit of A is 10, so t...原创 2019-04-16 19:52:18 · 168 阅读 · 0 评论 -
hdu1205 吃糖果
Problem Description HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。 Input 第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数N(0<N...原创 2019-04-16 20:36:15 · 309 阅读 · 0 评论 -
hdu1087 Super Jumping! Jumping! Jumping!
Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you...原创 2019-04-21 14:55:45 · 151 阅读 · 0 评论 -
杭电 2007平方和与立方和
Problem Description 给定一段连续的整数,求出他们中所有偶数的平方和以及所有奇数的立方和。 Input 输入数据包含多组测试实例,每组测试实例包含一行,由两个整数m和n组成。 Output 对于每组输入数据,输出一行,应包括两个整数x和y,分别表示该段连续的整数中所有偶数的平方和以及所有奇数的立方和。 你可以认为32位整数足以保存结果。 Sample Input 1 3 2 5 ...原创 2019-04-13 21:52:49 · 197 阅读 · 0 评论 -
hdu 2041 超级楼梯
Problem Description 有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Input 输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(1<=M<=40),表示楼梯的级数。 Output 对于每个测试实例,请输出不同走法的数量 Sample Input 2 2 3 Sample Output ...原创 2019-04-21 17:20:35 · 132 阅读 · 0 评论 -
hdu 1212 Big Number
Problem Description As we know, Big Number is always troublesome. But it’s really important in our ACM. And today, your task is to write a program to calculate A mod B. To make the problem easier, I p...原创 2019-04-16 21:26:37 · 135 阅读 · 0 评论 -
hdu1286 找新朋友
Problem Description 新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。 Input 第一行是测试数据的组数CN(Case number,1<CN<10000),接着有CN行正...原创 2019-04-17 09:29:21 · 155 阅读 · 0 评论
分享