上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 41 下一页

hdu 4079 Happy Telephones

摘要: Happy TelephonesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 199Accepted Submission(s): 159Problem DescriptionIn the land of Eden, all phone conversations are happy ones. People complaining on the phone are immediately put in jail. To enforce th 阅读全文
posted @ 2012-08-06 07:57 江财小子 阅读(492) 评论(0) 推荐(0) 编辑

POJ 4045 Power Station

摘要: // 给你一颗树,求一个点,使树上所有点到该点的距离之和最小。//上次金华邀请赛的题目//当时基本没接触过树形DP,连这么经典的都不会//今天写了下、居然排第4,1A,唉、、、//2次DFS,其中的道理在本子上划划就可以明白其中道理#include #include #include #include #include #define N 50005using namespace std;struct Edge{ int to,next;}ed[N<<1];__int64 sd[N];int vc[N];int node[N];int rc[1000],p;__int64 Min; 阅读全文
posted @ 2012-08-05 12:13 江财小子 阅读(308) 评论(0) 推荐(0) 编辑

ZOJ Problem Set - 3632 Watermelon Full of Water

摘要: ZOJ Problem Set - 3632Watermelon Full of WaterTime Limit: 3 Seconds Memory Limit: 65536 KBWatermelon is very popular in the hot summer. Students in ZJU-ICPC Team also love watermelon very much and they hope that they can have watermelon to eat every day during the summer vacation. Suppose there a... 阅读全文
posted @ 2012-08-05 10:20 江财小子 阅读(477) 评论(0) 推荐(0) 编辑

ZOJ Problem Set - 3623 Battle Ships

摘要: Battle ShipsTime Limit: 2 Seconds Memory Limit: 65536 KBBattle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a defense tower, which has L longevity. The player has a military factory, which can produce N kinds of battle ships. The factory takes ti seconds to p... 阅读全文
posted @ 2012-08-04 20:09 江财小子 阅读(529) 评论(0) 推荐(0) 编辑

ZOJ Problem Set - 3626 Treasure Hunt I

摘要: ZOJ Problem Set - 3626Treasure Hunt ITime Limit: 2 Seconds Memory Limit: 65536 KBAkiba is a dangerous country since a bloodsucker living there. Sometimes the bloodsucker will appear and kill everyone who isn't at his hometown. One day, a brave person named CC finds a treasure map, and he wants t 阅读全文
posted @ 2012-08-04 17:28 江财小子 阅读(265) 评论(0) 推荐(0) 编辑

hdu 1561 The more, The Better

摘要: The more, The BetterTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2850Accepted Submission(s): 1684Problem DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多 阅读全文
posted @ 2012-08-04 12:59 江财小子 阅读(502) 评论(0) 推荐(0) 编辑

POJ 2342 Anniversary party

摘要: // 题意: 每个节点有权值,子节点和父节点不能同时选,问最后能选的最大价值是多少?// 那么每个点就有两种选择 选或不选了//第一道树形DP,虽然1Y了、不过好慢//HDu上这题居然是多组数据、然后我就超时了、表示还要好好研究//我感觉我不怎么会建树、、#include #include #include #include #include #include #define N 6002using namespace std;vector v[N];bool b[N];int dp[N][2],hp[N];void dfs(int k){ int i,len=v[k].size();... 阅读全文
posted @ 2012-08-04 09:50 江财小子 阅读(479) 评论(0) 推荐(0) 编辑

hdu 4339 Query

摘要: QueryTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1009Accepted Submission(s): 302Problem DescriptionYou are given two strings s1[0..l1], s2[0..l2] and Q - number of queries.Your task is to answer next queries:1) 1 a i c - you should set i-th c 阅读全文
posted @ 2012-08-04 09:00 江财小子 阅读(555) 评论(0) 推荐(0) 编辑

hdu 4324 Triangle LOVE

摘要: Triangle LOVETime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 894Accepted Submission(s): 373Problem DescriptionRecently, scientists find that there is love between any of two people. For example, between A and B, if A don’t love B, then B must love 阅读全文
posted @ 2012-08-03 16:29 江财小子 阅读(921) 评论(1) 推荐(0) 编辑

hdu 4320 Arcane Numbers 1

摘要: Arcane Numbers 1Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1468Accepted Submission(s): 466Problem DescriptionVance and Shackler like playing games. One day, they are playing a game called "arcane numbers". The game is pretty simple, 阅读全文
posted @ 2012-08-03 15:34 江财小子 阅读(316) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 41 下一页