自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ACM!荣耀之路!

【已退役】

  • 博客(71)
  • 资源 (15)
  • 收藏
  • 关注

原创 HDU2566:统计硬币

Problem Description假设一堆由1分、2分、5分组成的n个硬币总面值为m分,求一共有多少种可能的组合方式(某种面值的硬币可以数量可以为0)。 Input输入数据第一行有一个正整数T,表示有T组测试数据;接下来的T行,每行有两个数n,m,n和m的含义同上。 Output对于每组测试数据,请输出可能的组合方式数;每组输出占一行。

2013-03-30 21:13:50 3074 1

原创 HDU2115:I Love This Game

Problem DescriptionDo you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basketball skills . It include several parts , such as passing , sho

2013-03-30 20:54:39 1399

原创 HDU1237:简单计算器

Problem Description读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 Input测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。 Output对每个测试用例输出1行,即该表达式的值,精确到小数

2013-03-30 16:52:40 1409

原创 HDU1022:Train Problem I

Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is t

2013-03-30 15:34:16 1051

原创 HDU1702:ACboy needs your help again!

Problem DescriptionACboy 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 ACb

2013-03-30 13:25:34 2222

原创 HDU2136:Largest prime factor

Problem DescriptionEverybody knows any number can be combined by the prime number.Now, your task is telling me what position of the largest prime factor.The position of prime 2 is 1, prime 3 is

2013-03-29 20:34:33 1467

原创 HDU2716:Message Decowding

Problem DescriptionThe cows are thrilled because they've just learned about encrypting messages. They think they will be able to use secret messages to plot meetings with cows on other farms.Cow

2013-03-28 21:30:07 1500

原创 HDU1395:2^x mod n = 1

Problem DescriptionGive a number n, find the minimum x(x>0) that satisfies 2^x mod n = 1. InputOne positive integer on each line, the value of n. OutputIf the minimum x exists, p

2013-03-28 20:42:39 1631

原创 HDU1128:Self Numbers

Problem DescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the digits of n.

2013-03-28 19:36:01 1882 1

原创 HDU1325:Is It A Tree?

Problem Description A 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 follo

2013-03-27 20:34:50 1541

原创 HDU2818:Building Block

Problem DescriptionJohn are playing with blocks. There are N blocks (1 M X Y : Put the whole pile containing block X up to the pile containing Y. If X and Y are in the same pile, just ignore thi

2013-03-26 20:53:45 1791

原创 HDU1272:小希的迷宫

Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。

2013-03-26 16:56:46 1485

原创 HDU1856:More is better

Problem DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements.

2013-03-26 14:53:31 1470

原创 HDU1213:How Many Tables

Problem DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the frien

2013-03-24 23:07:37 1538

原创 HDU4520:小Q系列故事——最佳裁判

Problem Description  过去的2012年对小Q来说是很悲催的一年,失恋了12次,每次都要郁闷1个来月。  好在小Q是个体育迷,在最痛苦的时候,他常常用观看各种体育节目来麻醉自己,比如伦敦奥运会期间,小Q就常常在周末邀上一群单身同事聚在自己的蜗居,一边畅饮啤酒,一边吹牛。  小Q最喜欢看的是跳水,主要原因也是因为这个项目有中国人参加,而且中国队员获胜的几率很大,一般不会

2013-03-24 22:35:02 1292

原创 POJ2305:Basic remains

DescriptionGiven a base b and two non-negative base b integers p and m, compute p mod m and print the result as a base b integer. p mod m is defined as the smallest non-negative integer k such that

2013-03-24 20:49:24 1081

转载 强大的进制转换strtol

转自http://hi.baidu.com/qwpsmile/blog/item/9bc44efa4f41018a9f514637.html+----------------+|      strtol             |+----------------+i.e. string to longlong int strtol(const char *nptr, char

2013-03-24 14:39:57 2242

原创 HDU4519:郑厂长系列故事——体检

Problem Description  郑厂长不是正厂长  也不是副厂长  他根本就不是厂长  只是公司的一个码农    郑厂长所在的腾讯公司每一年都要组织员工体检,比如量身高体重、测血压之类的,今年也不例外。  这次总共有N位员工接受体检,并且每个员工都需要做K个项目的检查才算完成整个体检的流程。现在来了M个医生为员工做身体检查,并且每一位医生都带齐了检查这K个项目

2013-03-24 14:06:20 1769

原创 HDU4515:小Q系列故事——世界上最遥远的距离

Problem Description  世界上最遥远的距离  不是生与死  而是我就站在你面前  你却不知道我爱你  世界上最遥远的距离  不是我就站在你面前你却不知道我爱你  而是明明知道彼此相爱  却不能在一起  世界上最遥远的距离  不是明明知道彼此相爱却不能在一起  而是相约好了私奔的时间  我穿越到了未来 你却回去了古代

2013-03-24 13:56:46 1690 1

原创 HDU4500:小Q系列故事——屌丝的逆袭

Problem Description  毕业于普通本科的小Q一直自称是资深屌丝,不仅学校不知名,甚至他自己在这个普通学校也是默默无闻——直到临近毕业的时候,班里5朵金花中的2位甚至从没和他说过话!  谁又能想到,如此不起眼的小Q在历经重重面试环节后,竟然如愿以偿加入了心仪已久的腾讯公司!消息刚刚传开的那几天,这在他们班甚至整个学院都是讨论的热门话题,如果这时候你还表示不知道小Q是谁,你都

2013-03-23 13:13:57 1103

原创 HDU4510:小Q系列故事——为什么时光不能倒流

Problem Description  我以为我会是最坚强的那一个 我还是高估了自己  我以为你会是最无情的那一个 还是我贬低了自己  就算不能够在一起 我还是为你担心  就算你可能听不清 也代表我的心意  那北极星的眼泪 闪过你曾经的眼角迷离  那玫瑰花的葬礼 埋葬的却是关于你的回忆  如果时光可以倒流 我希望不要和你分离  如果注定分离 我希望

2013-03-23 12:01:19 1315

原创 HDU4506:小明系列故事——师兄帮帮忙

Problem Description  小明自从告别了ACM/ICPC之后,就开始潜心研究数学问题了,一则可以为接下来的考研做准备,再者可以借此机会帮助一些同学,尤其是漂亮的师妹。这不,班里唯一的女生又拿一道数学题来请教小明,小明当然很高兴的就接受了。不过等他仔细读题以后,发现自己也不会做,这下小明囧了:如果回复说自己不懂,岂不是很没面子?  所以,他现在私下求你帮忙解决这道题目,题目是

2013-03-22 17:40:53 1957

原创 HDU4509:湫湫系列故事——减肥记II

Problem Description  虽然制定了减肥食谱,但是湫湫显然克制不住吃货的本能,根本没有按照食谱行动!于是,结果显而易见…  但是没有什么能难倒高智商美女湫湫的,她决定另寻对策——吃没关系,咱吃进去再运动运动消耗掉不就好了?  湫湫在内心咆哮:“我真是天才啊~\(≧▽≦)/~”  可是,大家要知道,过年回家多忙啊——帮忙家里做大扫除,看电影,看小说,高中同学聚

2013-03-22 16:52:18 1542 1

原创 HDU4505:小Q系列故事——电梯里的爱情

Problem Description  细心的同事发现,小Q最近喜欢乘电梯上上下下,究其原因,也许只有小Q自己知道:在电梯里经常可以遇到他心中的女神HR。  电梯其实是个很暧昧的地方,只有在电梯里,小Q才有勇气如此近距离接近女神,虽然觉得有点不自在,但次数多了,女神也习惯了小Q的存在,甚至熟悉到仿佛不说上句话自己也都觉得不合适了。可是,他们的谈话也仅仅限于今天天气不错啊或是你吃了吗之类的

2013-03-21 23:03:55 2194

原创 POJ2371:Questions and answers

DescriptionThe database of the Pentagon contains a top-secret information. We don't know what the information is — you know, it's top-secret, — but we know the format of its representation. It is ex

2013-03-21 19:05:51 2170

原创 HDU2545:树上战争

Problem Description给一棵树,如果树上的某个节点被某个人占据,则它的所有儿子都被占据,lxh和pfz初始时分别站在两个节点上,谁当前所在的点被另一个人占据,他就输了比赛,问谁能获胜 Input输入包含多组数据每组第一行包含两个数N,M(N,M接下来N-1行,每行2个整数A,B(1接下来M行,每行有2个数,表示lxh和pfz的初始位置的编号X,Y

2013-03-21 17:52:57 1644

原创 HDU1232:畅通工程

Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?  Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N (  注意:

2013-03-21 16:22:13 1420

原创 POJ1611:The Suspects

DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best str

2013-03-20 23:03:22 1396

原创 POJ2524:Ubiquitous Religions

DescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your un

2013-03-20 21:13:49 1120

原创 POJ2140:Herd Sums

DescriptionThe cows in farmer John's herd are numbered and branded with consecutive integers from 1 to N (1 Farmer John, who majored in mathematics in college and loves numbers, often looks for

2013-03-20 17:04:57 1444

原创 POJ2590:Steps

DescriptionOne steps through integer points of the straight line. The length of a step must be nonnegative and can be by one bigger than, equal to, or by one smaller than the length of the previous

2013-03-20 16:46:26 829

原创 POJ3982:序列

Description数列A满足An = An-1 + An-2 + An-3, n >= 3 编写程序,给定A0, A1 和 A2, 计算A99Input输入包含多行数据 每行数据包含3个整数A0, A1, A2 (0 数据以EOF结束Output对于输入的每一行输出A99的值Sample Input1 1 1Sample Output69

2013-03-19 16:32:35 1748

原创 POJ2389:Bull Math

DescriptionBulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... or so they say. Farmer John wonders if their answers are cor

2013-03-19 16:10:32 1735

原创 POJ3006:Dirichlet's Theorem on Arithmetic Progressions

DescriptionIf a and d are relatively prime positive integers, the arithmetic sequence beginning witha and increasing byd, i.e., a, a + d,a + 2d, a + 3d, a + 4d, ..., contains infinitely many p

2013-03-18 15:10:51 1870

原创 HDU2734:Quicksum

Problem DescriptionA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum will also change, so checksums are ofte

2013-03-17 22:38:14 1939

原创 POJ2178:猜数字

Problem DescriptionA有1数m,B来猜.B每猜一次,A就说"太大","太小"或"对了" 。 问B猜n次可以猜到的最大数。  Input第1行是整数T,表示有T组数据,下面有T行 每行一个整数n (1 ≤ n ≤ 30)  Output猜n次可以猜到的最大数 Sample Input213

2013-03-17 22:08:07 2270

原创 HDU1715:大菲波数

Problem DescriptionFibonacci数列,定义如下:f(1)=f(2)=1f(n)=f(n-1)+f(n-2) n>=3。计算第n项Fibonacci数值。 Input输入第一行为一个整数N,接下来N行为整数Pi(1 Output输出为N行,每行为对应的f(Pi)。 Sample Input51

2013-03-17 21:51:39 1599

原创 HDU1316:How Many Fibs?

Problem DescriptionRecall the definition of the Fibonacci numbers: f1 := 1 f2 := 2 fn := fn-1 + fn-2 (n >= 3) Given two numbers a and b, calculate how many Fibonacci numbers are in the ran

2013-03-17 21:45:35 2171

原创 HDU1257:最少拦截系统

Problem Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求

2013-03-17 10:48:58 2084

原创 POJ3641:Pseudoprime numbers

DescriptionFermat's theorem states that for any prime number p and for any integera > 1,ap = a (mod p). That is, if we raisea to thepth power and divide by p, the remainder isa. Some (but not

2013-03-16 13:31:13 2033

《数值分析》课后答案

《数值分析》课后答案

2015-07-02

离散数学第四版_课后答案

离散数学第四版_课后答案

2015-07-02

JSP毕业设计

完整的毕业设计,代码+文档

2015-06-29

动态规划32讲

动态规划32讲

2013-12-29

最全的C++函数库

C++函数库

2013-12-29

编译原理

编译原理

2013-12-29

《数据结构》课程设计公园导游图

《数据结构》课程设计公园导游图

2013-12-29

代码行统计工具

代码行统计工具

2013-06-08

《数据结构》 严蔚敏的全部代码实现(C语言)

《数据结构》 严蔚敏的全部代码实现

2013-06-08

ACM必做50题

ACM必做50题的解题

2013-06-08

C/C++函数大全

函数大全

2013-06-08

背包九讲(背包)

背包九讲

2013-06-08

叶核亚 java程序设计实用教程 第三版课后答案

Java程序设计实用教程(第3版) (叶核亚) 电子工业出版社 案例及素材

2013-03-09

计算机程序设计艺术

非常有用的专业书籍! 很有用!

2012-10-20

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除