原创 poj2192 Zipper(dp)

Zipper Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17961 Accepted: 6391 Description Give

原创 CodeForces702D. Road to Post Office(二分or數學)

D. Road to Post Office time limit per test 1 second memory limit per test 256 megabytes input standard input output sta

原创 POJ2914 Minimum Cut(最小割模板題)

Minimum Cut Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 9122   Accepted: 3820 Case Time Limit: 5000M

原创 HDU5879 Cure

Cure Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1264    A

原创 HDU5883 The Best Path(歐拉回路)

The Best Path Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission

原创 Codeforces Round #313 (Div. 2)560D. Equivalent Strings

D. Equivalent Strings time limit per test 2 seconds memory limit per test 256 megabytes input standard input o

原创 Codeforces 701D. As Fast As Possible(二分)

D. As Fast As Possible time limit per test 1 second memory limit per test 256 megabytes input standard input output sta

原创 數組分割

有n件物品,第i件物品重wi,現在將n件物品分成2堆,要求2堆的物品數量不超過1,並且使得2堆物品的重量相差最小,最後輸出兩對物品的重量。 這題和編程之美的2.18數組分割差不多。從n件物品中選n/2間放到一堆,使得另一堆和它物品數量差

原创 CodeForces 614C. Peter and Snow Blower

C. Peter and Snow Blower time limit per test 2 seconds memory limit per test 256 megabytes input standard input

原创 codeforces680C

C. Bear and Prime 100 time limit per test 1 second memory limit per test 256 megabytes input standard input output stan

原创 整數劃分

題目: 1.將整數n劃分成若干整數的劃分數 2.將整數n劃分成k個整數的劃分數 3.將整數n劃分成若干不同整數的劃分數 4.將整數n劃分成若干奇正整數的劃分數 思路 1.將整數n劃分成若干整數的劃分數 dp[i][j]表示將整數i劃分成

原创 Codeforces586D. Phillip and Trains(DFS)

D. Phillip and Trains time limit per test 1 second memory limit per test 256 megabytes input standard input ou

原创 Codeforces596C. Wilbur and Points

C. Wilbur and Points time limit per test 2 seconds memory limit per test 256 megabytes input standard input output stan

原创 HDU5877 Weak Pair(樹狀數組+dfs)

Weak Pair Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s

原创 Codeforces670E. Correct Bracket Sequence Editor

E. Correct Bracket Sequence Editor time limit per test 2 seconds memory limit per test 256 megabytes input standard inp