URAL 1244 Gentlement DP +记录路径 好题
摘要:1244. GentlemenTime limit: 0.5 secondMemory limit: 64 MBLet's remember one old joke:Once a gentleman said to another gentleman:— What if we play cards...
阅读全文
posted @
2015-05-31 22:05
_fukua
阅读(432)
推荐(0)
POJ 3494 Largest Submatrix of All 1's 栈的运用 好题
摘要:Language:Largest Submatrix of All 1’sTime Limit:5000MSMemory Limit:131072KTotal Submissions:5185Accepted:1950Case Time Limit:2000MSDescriptionGiven am...
阅读全文
posted @
2015-05-30 10:55
_fukua
阅读(842)
推荐(0)
POJ 3250 Bad Hair Day 简单DP 好题
摘要:DescriptionSome of Farmer John'sNcows (1 ≤N≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants t...
阅读全文
posted @
2015-05-29 22:48
_fukua
阅读(237)
推荐(0)
Ping Pong,Beijing 2008,LA4329 树状数组 好题
摘要:N (3 2 #include 3 #include 4 5 using namespace std; 6 7 const int maxn=20000+10; 8 9 int ls[maxn]; //第i个人左边技能值小于a[i]的人数10 int rs[maxn]; ...
阅读全文
posted @
2015-05-28 18:14
_fukua
阅读(316)
推荐(0)
HDU 1019 数论 GCD和MCM 水题
摘要:Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 37595Accepted Submission(s): 14143Problem Descript...
阅读全文
posted @
2015-05-23 00:12
_fukua
阅读(231)
推荐(0)
POJ 3744 Scout YYF I 概率DP+矩阵快速幂 好题
摘要:Scout YYF ITime Limit:1000MSMemory Limit:65536KTotal Submissions:5731Accepted:1617DescriptionYYF is a couragous scout. Now he is on a dangerous missio...
阅读全文
posted @
2015-05-22 21:46
_fukua
阅读(267)
推荐(0)
LIGHTOJ 1104 Birthday Paradox 概率题 好玩的题
摘要:DescriptionSometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party whe...
阅读全文
posted @
2015-05-22 00:22
_fukua
阅读(313)
推荐(0)
LightOJ1030 Discovering Gold 概率DP 水题
摘要:Time Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluDescriptionYou are in a cave, a long cave! The cave can be represented by a1 x Ngrid. ...
阅读全文
posted @
2015-05-21 23:21
_fukua
阅读(268)
推荐(0)
HDU 3853 LOOPS 概率第一题 水题,还是被坑了很久
摘要:Problem DescriptionAkemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl).Homura wants to help her friend Madoka save the world. But because of the...
阅读全文
posted @
2015-05-19 13:59
_fukua
阅读(256)
推荐(0)
POJ 2234 Matches Game 博弈论水题 Nim模型
摘要:DescriptionHere is a simple game. In this game, there are several piles of matches and two players. The two player play in turn. In each turn, one can...
阅读全文
posted @
2015-05-18 00:16
_fukua
阅读(252)
推荐(0)
POJ1740 A New Stone Game 博弈论基础题 男人8题
摘要:DescriptionAlice and Bob decide to play a new stone game.At the beginning of the game they pick n(1a2-a1,所以可以从a3中拿出a3-a0的石子给a1,使得a1=a2,剩下的扔掉,这样操作后就有a3...
阅读全文
posted @
2015-05-17 23:59
_fukua
阅读(632)
推荐(0)
HDU1847 博弈论 水题
摘要:Problem Description大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此。当然,作为在考场浸润了十几载的当代大学生,Kiki和Cici更懂得考前的放松,所谓“张弛有道”就是这个意思。这不,Kiki和Cic...
阅读全文
posted @
2015-05-17 13:45
_fukua
阅读(282)
推荐(0)
POJ 2763 Housewife Wind LCA基础题
摘要:Time Limit:4000MSMemory Limit:65536KTotal Submissions:7047Accepted:1784DescriptionAfter their royal wedding, Jiajia and Wind hid away in XX Village, t...
阅读全文
posted @
2015-05-13 21:03
_fukua
阅读(530)
推荐(0)
HDU 3078 Network LCA水题
摘要:Problem DescriptionThe ALPC company is now working on his own network system, which is connecting all N ALPC department. To economize on spending, the...
阅读全文
posted @
2015-05-13 18:24
_fukua
阅读(294)
推荐(0)
HDU 2874 Connections between cities LCA水题 注意是森林,不是树
摘要:Problem DescriptionAfter World War X, a lot of cities have been seriously damaged, and we need to rebuild those cities. However, some materials needed...
阅读全文
posted @
2015-05-13 13:28
_fukua
阅读(240)
推荐(0)
HDU 2586 How Far Away? LCA水题
摘要:Problem DescriptionThere are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How f...
阅读全文
posted @
2015-05-13 01:11
_fukua
阅读(309)
推荐(0)
Codeforces Round #294 (Div. 2) 题解
摘要:A题:给出一个8*8的棋盘,棋盘上是一些字符,大写字母代表white的分数,小写代表black的分数,问最后谁的分数多,直接扫一遍就好了。 1 #include 2 int update(char str) 3 { 4 if(str=='.') 5 return 0; 6 ...
阅读全文
posted @
2015-05-12 23:53
_fukua
阅读(274)
推荐(0)
HDU 2094 产生冠军 hash 水题
摘要:Problem Description有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。根据这个...
阅读全文
posted @
2015-05-10 22:47
_fukua
阅读(272)
推荐(0)
HDU 2966 Aragorn's Story 树链剖分第一题 基础题
摘要:Problem DescriptionOur protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn finds a lot of enemies who w...
阅读全文
posted @
2015-05-10 20:05
_fukua
阅读(320)
推荐(0)
HDU 4857 逃生 拓扑排序好题 第一次做CLJ出的题
摘要:逃生Problem Description糟糕的事情发生啦,现在大家都忙着逃命。但是逃命的通道很窄,大家只能排成一行。现在有n个人,从1标号到n。同时有一些奇怪的约束条件,每个都形如:a必须在b之前。同时,社会是不平等的,这些人有的穷有的富。1号最富,2号第二富,以此类推。有钱人...
阅读全文
posted @
2015-05-10 14:26
_fukua
阅读(386)
推荐(0)
HDU 1285 确定比赛名次 拓扑排序水题
摘要:Problem Description有N个比赛队(1节点数,说明不是拓扑序。 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 const int maxn=505;10 11...
阅读全文
posted @
2015-05-10 10:57
_fukua
阅读(288)
推荐(0)
Crazy Rows 2009 Round 2 A
摘要:2015-05-0822:45:28地址:http://code.google.com/codejam/contest/204113/dashboard题意:给出一个n,然后是n*n的矩阵,题目保证这个矩阵可以转化为下三角矩阵,问最少的操作数,使它成为下三角矩阵。其实对于矩阵的每一行,我们只需保留它...
阅读全文
posted @
2015-05-08 22:55
_fukua
阅读(274)
推荐(0)
Codeforces Round #302 (Div. 2) 补题
摘要:不得不说,真的是渣,只做出了一道题。 A. Set of StringsYou are given a stringq. A sequence ofkstringss1, s2, ..., skis calledbeautiful, if the concatenation of ...
阅读全文
posted @
2015-05-08 16:29
_fukua
阅读(321)
推荐(0)
Timus 1303 Minimal Coverage DP或贪心
摘要:1303. Minimal CoverageGiven set of line segments [Li, Ri] with integer coordinates of their end points. Your task is to find the minimal s...
阅读全文
posted @
2015-05-06 23:36
_fukua
阅读(453)
推荐(0)
TImus 1167. Bicolored Horses DP
摘要:1167. Bicolored HorsesTime limit: 1.0 secondMemory limit: 64 MBEvery day, farmer Ion (this is a Romanian name) takes out all his horses, so th...
阅读全文
posted @
2015-05-06 18:11
_fukua
阅读(323)
推荐(0)
TImus 1073 Square Country DP
摘要:题意:给出一个数n(1 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 const int maxn=60000+3; 9 const int inf=0x3f3f3f3f;10 11 int dp[maxn];12 1...
阅读全文
posted @
2015-05-06 15:01
_fukua
阅读(218)
推荐(0)
HDU 4027 Can you answer these queries? 线段树,区间修改
摘要:Can you answer these queries?Problem DescriptionA lot of battleships of evil are arranged in a line before the battle. Our commander decid...
阅读全文
posted @
2015-05-05 14:38
_fukua
阅读(210)
推荐(0)
POJ 3669 Meteor shower 简单BFS, 有坑点
摘要:Meteor ShowerDescriptionBessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into ear...
阅读全文
posted @
2015-05-03 23:49
_fukua
阅读(532)
推荐(0)
POJ 3009 Curling 2.0 简单DFS 好题
摘要:DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different fr...
阅读全文
posted @
2015-05-03 22:43
_fukua
阅读(263)
推荐(0)
POJ 3253 Fence Repair 贪心
摘要:Fence RepairDescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds t...
阅读全文
posted @
2015-05-01 13:29
_fukua
阅读(248)
推荐(0)
POJ 3069 Saruman's Army 贪心
摘要:Saruman's ArmyDescriptionSaruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track of his f...
阅读全文
posted @
2015-05-01 12:17
_fukua
阅读(227)
推荐(0)
POJ3617 Best Cow line 简单题
摘要:Best Cow LineDescriptionFJ is about to take hisN(1 ≤N≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest ev...
阅读全文
posted @
2015-05-01 11:43
_fukua
阅读(240)
推荐(0)
POJ 1852 Ants 思维题 简单题
摘要:AntsDescriptionAn army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant re...
阅读全文
posted @
2015-05-01 09:46
_fukua
阅读(245)
推荐(0)