摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2066一个人的旅行Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己... 阅读全文
posted @ 2015-07-16 22:32 GadyPu 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1181变形课Description呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如... 阅读全文
posted @ 2015-07-15 20:49 GadyPu 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2112HDU TodayDescription经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD... 阅读全文
posted @ 2015-07-15 19:29 GadyPu 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1874畅通工程续Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离... 阅读全文
posted @ 2015-07-14 22:12 GadyPu 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2544最短路Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从... 阅读全文
posted @ 2015-07-14 19:42 GadyPu 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1878欧拉回路Description欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个图,问是否存在欧拉回路?Input测试输入包含若干测试用例。每个测试用例的第1行给... 阅读全文
posted @ 2015-07-13 17:49 GadyPu 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5281Senior's GunDescriptionXuejiejie is a beautiful and charming sharpshooter.She often carries $n$ guns... 阅读全文
posted @ 2015-07-12 22:33 GadyPu 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5280 Senior's Array Description One day, Xuejiejie gets an array $A$. Among all non-empty intervals of $A$, she wants to find the most beautiful one. She defines the beauty as the sum of the interval. The beauty of the interval---$[L,R]$ is calculated by this formula : beauty$(L,R) = A[L]+A[L+1]+……+A[R]$. The most beautiful interval is th 阅读全文
posted @ 2015-07-12 22:33 GadyPu 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1285确定比赛名次Description有$N$个比赛队$(1 \leq N \leq 500)$,编号依次为$1,2,3,...$ $N$进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,... 阅读全文
posted @ 2015-07-12 12:59 GadyPu 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1429胜利大逃亡(续)DescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的... 阅读全文
posted @ 2015-07-11 15:06 GadyPu 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1885Key TaskDescriptionThe Czech Technical University is rather old — you already know that it celebrate... 阅读全文
posted @ 2015-07-11 14:54 GadyPu 阅读(210) 评论(1) 推荐(1) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3342Legal or NotDescriptionACM-DIY is a large QQ group where many excellent acmers get together. It is s... 阅读全文
posted @ 2015-07-11 10:47 GadyPu 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2094产生冠军Description有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如... 阅读全文
posted @ 2015-07-10 21:20 GadyPu 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2647RewardDescriptionDandelion's uncle is a boss of a factory. As the spring festival is coming , he wan... 阅读全文
posted @ 2015-07-10 19:19 GadyPu 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1195Open the LockDescriptionNow an emergent task for you is to open a password lock. The password is con... 阅读全文
posted @ 2015-07-10 10:47 GadyPu 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 一批幸福的列车即将从杭州驶向幸福的终点站——温州,身为总列车长的linle有一些奇怪的癖好。 他会记录下全部乘客的名字(name)和他们的人品值(RP),根据这些将他们排序,并不时地从某辆列车里踢出人品最不好(RP值最低)的一个人,当两个人人品一样不好时,他就会踢出名字难听的人(linle认为按字典顺序,排在越在后面的人名字越难听)。 当然出于列车行驶需要,他还会不时的发布一些命令,比如让某个乘客上车,合并某两辆列车等。 linle的上一任秘书***因为不能高效地执行他的这些命令而被炒鱿鱼,他现在正在寻觅新的秘书人选,你能不能胜任呢?(谢绝男士,待遇丰厚~~~) 阅读全文
posted @ 2015-07-09 10:36 GadyPu 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1010Tempter of the BoneDescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot... 阅读全文
posted @ 2015-07-08 13:22 GadyPu 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4198Quick out of the HarbourDescriptionCaptain Clearbeard decided to go to the harbour for a few days so... 阅读全文
posted @ 2015-07-07 19:24 GadyPu 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1867A + B for you againDescriptionGenerally speaking, there are a lot of problems about strings processi... 阅读全文
posted @ 2015-07-06 20:24 GadyPu 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4150Powerful IncantationDescriptionSome dangerous Witches invaded the garden city! As a righteous magici... 阅读全文
posted @ 2015-07-06 12:26 GadyPu 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1381Crazy SearchDescriptionMany people like to solve hard puzzles some of which may lead them to madness... 阅读全文
posted @ 2015-07-06 10:35 GadyPu 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5131Song Jiang's rank listDescription《Shui Hu Zhuan》,also 《Water Margin》was written by Shi Nai'an -- an ... 阅读全文
posted @ 2015-07-05 13:26 GadyPu 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://poj.org/problem?id=2251Dungeon MasterDescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is compo... 阅读全文
posted @ 2015-07-05 11:24 GadyPu 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4941Magical ForestDescriptionThere is a forest can be seen as $N * M$ grid. In this forest, there is som... 阅读全文
posted @ 2015-07-04 18:24 GadyPu 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,不能转太多弯了,否则她会晕倒的。我们假定给定的两个位置都是空地,初始时,gloria所面向的方向未定,她可以选择4个方向的任何一个出发,而不算成一次转弯。gloria能从一个位置走到另外一个位置吗? 阅读全文
posted @ 2015-07-04 14:07 GadyPu 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2612Find a wayDescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. ... 阅读全文
posted @ 2015-07-03 20:59 GadyPu 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3288Resource AllocationDescriptionHDU-Sailormoon is made up of three girls~~~wj, xq, lff, usually they w... 阅读全文
posted @ 2015-07-03 17:55 GadyPu 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1272小希的迷宫Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连... 阅读全文
posted @ 2015-07-02 20:53 GadyPu 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5224Tom and paperDescriptionThere is a piece of paper in front of Tom, its length and width are integer.... 阅读全文
posted @ 2015-07-02 19:40 GadyPu 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5104Primes ProblemDescriptionGiven a number n, please count how many tuple$(p_1, p_2, p_3)$ satisfied th... 阅读全文
posted @ 2015-07-02 17:32 GadyPu 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2102A计划Description可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈... 阅读全文
posted @ 2015-07-02 15:56 GadyPu 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2952Counting SheepDescriptionA while ago I had trouble sleeping. I used to lie awake, staring at the cei... 阅读全文
posted @ 2015-07-01 22:03 GadyPu 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1495非常可乐Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的... 阅读全文
posted @ 2015-07-01 19:42 GadyPu 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1026Ignatius and the Princess IDescriptionThe Princess has been abducted by the BEelzebub feng5166, our ... 阅读全文
posted @ 2015-07-01 11:47 GadyPu 阅读(120) 评论(0) 推荐(0) 编辑
摘要: A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part of the problem is determining the smallest number of knight moves between two given squares and that, once you have accomplished this, finding the tour 阅读全文
posted @ 2015-06-30 22:21 GadyPu 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2645find the nearest stationDescriptionSince dandelion has left the hometown so long,she finds it's diff... 阅读全文
posted @ 2015-06-30 16:04 GadyPu 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2425Hiking TripDescriptionHiking in the mountains is seldom an easy task for most people, as it is extre... 阅读全文
posted @ 2015-06-29 21:59 GadyPu 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1973Prime PathDescriptionThe ministers of the cabinet were quite upset by the message from the Chief of ... 阅读全文
posted @ 2015-06-29 20:00 GadyPu 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5146SequenceDescriptionToday we have a number sequence A includes n elements.Nero thinks a number sequen... 阅读全文
posted @ 2015-06-29 18:07 GadyPu 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( 1000 )和道路数目M;随后的M行对应M条道路,每行给出一对正整数,分别是该条道路直接连通的两个城镇的编号。为简单起见,城镇从1到N编号。 注意:两个城市之间可以有多条道路相通,也就是说 阅读全文
posted @ 2015-06-29 12:40 GadyPu 阅读(136) 评论(0) 推荐(0) 编辑