原创 UVA-10163 Storage Keepers (DP多次)

Randy Company has N (1 ≤ N ≤ 100) storages. Company wants some men to keep them safe. Nowthere are M (1 ≤ M ≤ 30) m

原创 UVa-1220 Party at Hali-Bula (最大獨立集)

Party at Hali-Bula Time Limit: 3000MS   Memory Limit: Unknown   64bit IO Format: %lld & %llu Submit Status Descr

原创 UVA-1632 Alibaba (區間DP)

Alibaba the famous character of our childhood stories would like to be immortal in order to keepbringing happiness

原创 UVa-1252 Twenty Questions (位運算)

Twenty Questions Time Limit: 3000MS   Memory Limit: Unknown   64bit IO Format: %lld & %llu Submit Status Descript

原创 Codeforces Round #308 (Div. 2) D. Vanya and Triangles (判斷三角形數量)

D. Vanya and Triangles time limit per test 4 seconds memory limit per test 512 megabytes input standard inp

原创 HDU-1251 統計難題(字典樹)

統計難題 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131070/65535 K (Java/Others) Total Submission(s): 28454 

原创 UVA-1630 Folding (KMP、區間dp)

Folding Time Limit: 3000MS   Memory Limit: Unknown   64bit IO Format: %lld & %llu Submit Status Description B

原创 UVA-1631 Locker(DP)

A password locker withN digits, each digit can be rotated to 0-9 circularly.You can rotate 1-3 consecutive digits up

原创 HDU-1561 The more,The Better

The more, The Better Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submis

原创 UVa-10817 Headmaster's Headache (位運算)

#include <algorithm> #include <iostream> #include <sstream> #include <cstring> #include <cstdlib> #include <string> #in

原创 UVa-1228 Perfect Service

Perfect Service Time Limit: 3000MS   Memory Limit: Unknown   64bit IO Format: %lld & %llu Submit Status Descript

原创 UVA10723 Cyborg genes (LCS)

http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=19469 題意:給你兩個字符串,問你最短的能將這兩個字符串作爲子序列的序列的長度與數量。 分析:標準的LCS

原创 HDU-5652 India and China Origins(並查集)

借鑑自:http://www.cnblogs.com/shuguangzw/p/5324207.html India and China Origins Time Limit: 2000/2000 MS (Java/Others)  

原创 UVa-10618 Tango Tango Insurrection&& UVa-1627 Team them up!

10618 題意繁複,見紫書P291 本題條件比較複雜,是情況比較多的多維dp,個人認爲難點在處理各階段關係上。 看了紫書詳細的解釋,將各狀態下的決策結果通過構造函數計算出來即可。記錄一下,以後溫習直接翻書。#include <algor

原创 ZOJ Problem Set - 3946 Highway Project

Highway Project Time Limit: 2 Seconds      Memory Limit: 65536 KB Edward, the emperor of the Marjar Empire, wants to