hdu
文章平均质量分 79
Scarlett在努力
互联网爱好者
展开
-
zoj 1113 u Calculate e(小数点精度保留)
Background A simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.Output Out原创 2015-08-07 18:37:35 · 785 阅读 · 0 评论 -
Factorial
You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For example, 5! = 120, 120 contains one zero on the tra原创 2015-08-21 18:24:57 · 404 阅读 · 0 评论 -
Online Judge
Ignatius is building an Online Judge, now he has worked out all the problems except the Judge System. The system has to read data from correct output file and user's result file, then the system compa原创 2015-08-07 14:02:59 · 582 阅读 · 0 评论 -
杭电1061 Rightmost Digit
Given a positive integer N, you should output the most right digit of N^N.InputThe input contains several test cases. The first line of the input is a single integer T which is the number of原创 2015-08-07 13:45:11 · 620 阅读 · 0 评论 -
大菲薄那次数
Fibonacci数列,定义如下:f(1)=f(2)=1f(n)=f(n-1)+f(n-2) n>=3。计算第n项Fibonacci数值。Input输入第一行为一个整数N,接下来N行为整数Pi(1Output输出为N行,每行为对应的f(Pi)。Sample Input512345Sample Output原创 2015-08-06 23:35:41 · 507 阅读 · 0 评论 -
大明A+B
话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”。这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法。现在,给你两个正的小数A和B,你的任务是代表大明计算出A+B的值。Input本题目包含多组测试数据,请处理到文件结束。每一组测试数据在一行里面包含两个长度不大于400的正小数A和B。原创 2015-08-06 18:07:11 · 1205 阅读 · 0 评论 -
A very hard mathematic problem(二分)
题目描述: Haoren is very good at solving mathematic problems. Today he is working a problem like this: Find three positive integers X, Y and Z (X 1) that holds X^Z + Y^Z + XYZ = K wher原创 2015-08-06 18:04:57 · 635 阅读 · 0 评论 -
hdu1257最少拦截系统(dp)
某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系统原创 2015-08-18 11:25:21 · 514 阅读 · 0 评论 -
HDU 2111 Saving HDU(贪心,01背包)
Problem Description话说上回讲到海东集团面临内外交困,公司的元老也只剩下XHD夫妇二人了。显然,作为多年拼搏的商人,XHD不会坐以待毙的。 一天,当他正在苦思冥想解困良策的时候,突然想到了自己的传家宝,那是公司成立的时候,父亲作为贺礼送来的一个锦囊,徐父当时交代,不到万不得已的时候,不要打开它。“现在不正是最需要的时候吗?”,一边想,XHD一边找到了这个精心保管的锦原创 2015-08-16 12:01:11 · 611 阅读 · 0 评论 -
Oil Deposits(dfs深搜)
Problem DescriptionThe 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原创 2015-08-13 02:25:42 · 658 阅读 · 0 评论 -
hdu2095 find your present (2)(异或)
Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them wil原创 2015-08-26 01:00:40 · 478 阅读 · 0 评论 -
欧拉回路
Problem Description欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个图,问是否存在欧拉回路? Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是节点数N ( 1 束。 Output每个测试用例的输出占一行,若欧拉回路存在则输出1,否则输出0。原创 2015-08-11 12:33:56 · 365 阅读 · 0 评论 -
hdu2089 不要62(暴力打表计数,数位DP)
Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。不吉利的数字为所有含有4或62的号码。例如:62315 73418 88914都属于不吉利号码。但是,61152虽然含有原创 2015-08-23 22:37:40 · 481 阅读 · 0 评论 -
hdu1465 不容易系列之一
Problem Description大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了!做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一个神奇的女生,在英语考试的时候,竟然把40个单项选择题全部做错了!大家都学过概率论,应该原创 2015-08-22 22:21:23 · 511 阅读 · 0 评论 -
hdu1576 A/B
Problem Description要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Input数据的第一行是一个T,表示有T组数据。每组数据有两个数n(0 Output对应每组数据输出(A/B)%9973。 Sampl原创 2015-08-22 20:12:36 · 424 阅读 · 0 评论 -
uva408 Uniform Generator
Computer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed(x+1) = [seed(x) + STEP] % MODwhere '%' is the modulus operator.原创 2015-08-07 18:24:41 · 444 阅读 · 0 评论 -
杭电1133 Buy the Ticket(大数,递推)
The "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the cinema and have the first sight, won’t you?Suppose the cinema onl原创 2015-08-07 18:11:55 · 671 阅读 · 0 评论 -
杭电1251 统计难题(字典树)
Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串的提问,每行一个提问,每个提问都是一个字符原创 2015-08-07 16:16:07 · 579 阅读 · 0 评论 -
hdu1212 Big Number
Problem DescriptionAs 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 easie原创 2015-08-22 23:05:36 · 807 阅读 · 0 评论