
搜索
文章平均质量分 78
ACM_Ted
正在加油的火箭。
展开
-
【BFS+hash】The Social Network
The Social NetworkTime Limit: 3000/2000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1795 Accepted Submission(s): 555Problem DescriptionThe soci原创 2012-04-03 23:24:27 · 913 阅读 · 0 评论 -
【DFS】hdu2451 Simple Addition Expression
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2451题意: 问在所有小于n的i中,有多少个i计算表达式(i) + (i+1) + (i+2), i>=0的时候不会产生任何进位。题解:对于个位,当个位为0,1,2时不会产生进位;对于非个位,为0,1,2,3时不会产生进位(题意表明没有低位向高位的进位)。因此我们可以根据n 的每位数字进行推算,比如原创 2012-10-10 22:39:31 · 759 阅读 · 0 评论 -
【二分搜索】 hdu4282 A very hard mathematic problem
A very hard mathematic problem题目:http://acm.hdu.edu.cn/showproblem.php?pid=4282题意: X^Z + Y^Z + XYZ = K, (X 1)。告诉你最后K(0 的值,问符合这个等式的X,Y,Z的组合有多少种题解:因为幂次的增长速度比较快,我们可以枚举X和Z,然后二分搜索是否存在对应的Y。对于A的B次方我原创 2012-09-09 17:35:18 · 3150 阅读 · 0 评论 -
【DFS】 hdu4277 USACO ORZ
USACO ORZ题目:http://acm.hdu.edu.cn/showproblem.php?pid=4277题意:给你n个有长度的线段,问如果用上所有的线段来拼1个三角形,最多能拼出多少种不同的?题解:暴力搜索,可以用set判重。开始搜索时也可以先把第1个线段固定在一个边上,因为它放哪个边对后面搜索都是一样的。代码:#include#include#includ原创 2012-09-09 17:43:30 · 1563 阅读 · 0 评论 -
【DFS】 hdu1547 Bubble Shooter
Bubble Shooterhttp://acm.hdu.edu.cn/showproblem.php?pid=1547Problem DescriptionBubble shooter is a popular game. You can find a lot of versions from the Internet.The goal of th原创 2012-08-05 19:52:36 · 1168 阅读 · 0 评论 -
【DFS】 hdu2782 The Worm Turns
The Worm Turnshttp://acm.hdu.edu.cn/showproblem.php?pid=2782Problem DescriptionWinston the Worm just woke up in a fresh rectangular patch of earth. The rectangular patch is divided int原创 2012-08-05 23:17:59 · 1610 阅读 · 0 评论 -
【DFS】 hdu3260 Facer is learning to swim
Facer is learning to swimhttp://acm.hdu.edu.cn/showproblem.php?pid=3260Problem DescriptionFacer is addicted to a game called “Tidy is learning to swim”. But he finds it too easy. So he dev原创 2012-08-14 17:39:59 · 1458 阅读 · 0 评论 -
【BFS】Knight Moves
Knight MovesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2898 Accepted Submission(s): 1822Problem DescriptionA friend of y原创 2012-04-04 21:56:44 · 635 阅读 · 0 评论 -
【BFS】Prime Path
Prime PathTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 147 Accepted Submission(s): 94Problem DescriptionThe ministers of原创 2012-04-04 00:13:56 · 646 阅读 · 0 评论 -
【记忆化搜索】 hdu2452 Navy maneuvers
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2452题意:题解:dp[i][0]表示从i点出发可以取得的最小值,dp[i][1]则表示最大值,即dp[[i][1]=max{ dp[j][0] } + value[i],dp[i][0]=min{ dp[j][1] } + value[i],其中i到j有边。代码:#include原创 2012-10-10 23:18:29 · 1161 阅读 · 0 评论