随笔分类 -  HDU报告

摘要:Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14578Accepted Submission(s): 7203Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecu 阅读全文
posted @ 2014-03-02 22:15 偶尔会寂寞 阅读(205) 评论(0) 推荐(0)
摘要:BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8663 Accepted Submission(s): 3862Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The boar... 阅读全文
posted @ 2014-03-01 20:32 偶尔会寂寞 阅读(221) 评论(0) 推荐(0)
摘要:Color the BallTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4028 Accepted Submission(s): 999Problem DescriptionThere are infinite balls in a line (numbered 1 2 3 ....), and initially all of them are paint black. Now Jim use a brush paint t... 阅读全文
posted @ 2014-02-26 18:49 偶尔会寂寞 阅读(292) 评论(0) 推荐(0)
摘要:Color the ballTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7117 Accepted Submission(s): 3688Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a #include#include#include#define MAX 100002#define MAXN 400005using namespace std;str... 阅读全文
posted @ 2014-02-26 10:41 偶尔会寂寞 阅读(195) 评论(0) 推荐(0)
摘要:Anniversary partyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3861Accepted Submission(s): 1800Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical stru 阅读全文
posted @ 2014-02-23 13:49 偶尔会寂寞 阅读(166) 评论(0) 推荐(0)
摘要:Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 60673Accepted Submission(s): 16589Problem 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, 阅读全文
posted @ 2014-02-22 09:08 偶尔会寂寞 阅读(256) 评论(0) 推荐(0)
摘要:Can you solve this equation?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6753Accepted Submission(s): 3151Problem 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 yo 阅读全文
posted @ 2014-02-21 21:59 偶尔会寂寞 阅读(200) 评论(0) 推荐(0)
摘要:小希的迷宫Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22191Accepted Submission(s): 6791Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提 阅读全文
posted @ 2014-02-21 21:09 偶尔会寂寞 阅读(523) 评论(0) 推荐(0)
摘要:hdu1232#define _CRT_SECURE_NO_DEPRECATE#include#define MAX 1100int par[MAX], n;int find(int x){ if (par[x] == x){ return x; } return par[x] = find(par[x]);}void united(int x, int y){ int a = find(x), b = find(y); if (a != b){ par[a] = b; }}int main(){ int m, a, b, i, res; ... 阅读全文
posted @ 2014-02-21 20:06 偶尔会寂寞 阅读(151) 评论(0) 推荐(0)
摘要:悼念512汶川大地震遇难同胞——珍惜现在,感恩生活Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12417 Accepted Submission(s): 5250Problem Description急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮... 阅读全文
posted @ 2014-02-21 18:18 偶尔会寂寞 阅读(699) 评论(0) 推荐(0)
摘要:Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22702 Accepted Submission(s): 10108Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the ... 阅读全文
posted @ 2014-02-19 08:10 偶尔会寂寞 阅读(210) 评论(0) 推荐(0)
摘要:SafecrackerTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7305 Accepted Submission(s): 3680Problem Description=== Op tech briefing, 2002/11/02 06:42 CST === "The item is locked in a Klein safe behind a painting in the second-floor library. . 阅读全文
posted @ 2014-02-18 21:50 偶尔会寂寞 阅读(208) 评论(0) 推荐(0)
摘要:A Walk Through the ForestTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5071 Accepted Submission(s): 1846Problem DescriptionJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax... 阅读全文
posted @ 2014-02-18 15:49 偶尔会寂寞 阅读(363) 评论(0) 推荐(0)
摘要:一个人的旅行Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16100 Accepted Submission(s): 5521Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽的风景……草儿想去很多地方,她想要去东京铁塔看夜景,去威尼斯看电影,去阳明山上看海... 阅读全文
posted @ 2014-02-18 14:31 偶尔会寂寞 阅读(1119) 评论(0) 推荐(0)
摘要:最短路径问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9819 Accepted Submission(s): 2987Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。 Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花... 阅读全文
posted @ 2014-02-18 13:18 偶尔会寂寞 阅读(431) 评论(0) 推荐(0)
摘要:find the safest roadTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5628 Accepted Submission(s): 2005Problem DescriptionXX星球有很多城市,每个城市之间有一条或多条飞行通道,但是并不是所有的路都是很安全的,每一条路有一个安全系数s,s是在 0 和 1 间的实数(包括0,1),一条从u 到 v 的通道P 的安全度为Safe(P) = s(e1)*s(e2)…*... 阅读全文
posted @ 2014-02-18 08:56 偶尔会寂寞 阅读(236) 评论(0) 推荐(0)
摘要:畅通工程续Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22889 Accepted Submission(s): 8035Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 In... 阅读全文
posted @ 2014-02-17 21:50 偶尔会寂寞 阅读(344) 评论(2) 推荐(0)
摘要:FatMouse's SpeedTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8025 Accepted Submission(s): 3556Special JudgeProblem DescriptionFatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on.. 阅读全文
posted @ 2014-02-17 17:49 偶尔会寂寞 阅读(315) 评论(0) 推荐(0)
摘要:Children’s QueueTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9545 Accepted Submission(s): 3049Problem DescriptionThere are many students in PHT School. One day, the headmaster whose name is PigHeader wanted all students stand in a line. H... 阅读全文
posted @ 2014-02-16 15:40 偶尔会寂寞 阅读(257) 评论(0) 推荐(0)
摘要:Greatest Common Increasing SubsequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3362 Accepted Submission(s): 1060Problem DescriptionThis is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence. I... 阅读全文
posted @ 2014-02-16 13:43 偶尔会寂寞 阅读(198) 评论(0) 推荐(0)