原创 HDU2519

新生晚會 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13920    

原创 HDU2535

Vote Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5904    A

原创 數塔 (dp水題)

在講述DP算法的時候,一個經典的例子就是數塔問題,它是這樣描述的: 有如下所示的數塔,要求從頂層走到底層,若每一步只能走到相鄰的結點,則經過的結點的數字之和最大是多少? 已經告訴你了,這是個DP的題目,你能AC嗎?   Input 輸入數

原创 動態規劃攔截導彈(基礎dp)

某國爲了防禦敵國的導彈襲擊,發展中一種導彈攔截系統。但是這種導彈攔截系統有一個缺陷:雖然它的第一發炮彈能夠到達任意的高度,但是以後每一發炮彈都不能高於前一發的高度。某天,雷達捕捉到敵國導彈來襲。由於該系統還在試用階段,所以只用一套系統,

原创 poj to the max(最大子矩陣和) 1050(dp大法)

Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-arr

原创 Bone Collector hdu2602(經典dp)01揹包

Bone Collector Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s):

原创 洗牌問題

設2n張牌分別標記爲1, 2, ..., n, n+1, ..., 2n,初始時這2n張牌按其標號從小到大排列。經一次洗牌後,原來的排列順序變成n+1, 1, n+2, 2, ..., 2n, n。即前n張牌被放到偶數位置2, 4, .

原创 Dertouzos (結論賽高)

A positive proper divisor is a positive divisor of a number nn, excluding nn itself. For example, 1, 2, and 3 are pos

原创 POJ 1163 The Triangle(數塔模型dp)

Description 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a

原创 (完全揹包)hdu 1114

Piggy-Bank Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s

原创 Shape Number HDU - 4162(最小表示法)

Problem Description In computer vision, a chain code is a sequence of numbers representing directions when following th

原创 Hidden Password ZOJ - 1729(最小表示法)模板題

Some time the programmers have very strange ways to hide their passwords. See for example how Billy "Hacker" Geits hide

原创 HAUTOJ奇數最大子段和

題目描述 一個大小爲n的數組a1到an(−10^4≤ai≤10^4)。請你找出一個連續子段,使子段長度爲奇數,且子段和最大。 輸入 第一行爲T(1≤T≤5),代表數據組數。 之後每組數據,第一行爲n(1≤n≤10^5),代表數組長

原创 Heavy Transportation(Dijkstra)

Heavy Transportation Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 33893   Accepted: 8965 Description

原创 (尚學杯)C.Collection Game

Description POI and POJ are pair of sisters, one is a master in “Kantai Collection”, another is an excellent competito