原创 UVALive 4302 Toll Road

http://livearchive.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2303 dp[u]: as

原创 Ural 1519 Formula 1

  1519. Formula 1 Time Limit: 1.0 second Memory Limit: 16 MB Background Re

原创 hdu 4366 Successor

Interesting, I haven't seen this kind of transform before(it proves that i am remain a newbie). I try to slove it by us

原创 HDU 1370 Biorhythms

Biorhythms Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 669Accep

原创 UVALive 4236 Text Messaging Improvement?

http://livearchive.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2237 dp[i as i

原创 HDU 1370 Biorhythms

  Biorhythms Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536

原创 2142 HDU box

box Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3730Accepted Su

原创 UVALive 4361 Tobo or not Tobo

/* As it's only 9^9 status at most(in fact, it's not that much), We can calculate all the status, which can be

原创 最潮最短路算法:SPFA

首先理解單源最短路一滴概念(以下概念不作證明,證明自行baidu):   V:點集   E:邊集   s:源點   u:當前起始定點   v:當前目標頂點   u->v:表示頂點u直接到達頂點v(經過邊數==1)   u~>v:表示頂點u

原创 hdu 3397 Sequence operation

a disgusting seg-tree problem i have to maintain 6 varible for each node cc: cover color rv: reverse tag lc[i]: longges

原创 Hdu 4302 Holedox Eating

Binary-index-array + binary search and slight simulation. (of course seg-tree would be more effcient) For the simulatio

原创 HDU 1075 What Are You Talking About

What Are You Talking About Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 102400/204800 K (Java/Others)Total Subm

原创 hdu 4340 Capturing a country

f for A f[u][0] as the min-time to conquer subtree u, u-th city is conquered by A and the start node of all the most ne

原创 UVALive 4614 Moving to Nuremberg

http://livearchive.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2615 DFS twice

原创 hdu 4031 Divide Chocolate

Dynamic Programming again! There are a lot of state, so, the main point is how to classify them clearly. dp[i][j][0]: a