原创 hdu 5147 Sequence II(前綴和,後綴和)

Problem Description Long long ago, there is a sequence A with length n. All numbers in this sequence is no smaller th

原创 POJ 3349 Snowflake Snow Snowflakes (鏈式解決衝突)

Description You may have heard that no two snowflakes are alike. Your task is to write a program to determine whether

原创 HDU 4305 Lightning (判斷點在線段上,生成樹計數)

Problem Description There are N robots standing on the ground (Don't know why. Don't know how).  Suddenly the sky tu

原创 HDU 2187 悼念512汶川大地震遇難同胞——老人是真餓了(貪心)

Problem Description 時間:2008年5月16日(震後第4天) 地點:汶川縣牛腦寨 人物:羌族老奶奶 【轉載整理】牛腦寨是一個全村600多人的羌族寨子,震後幾天,這裏依然能常常聽到隆隆的聲音,那是對面山上石頭不斷滑落

原创 Code[vs] 1083 Cantor表

題目描述 Description 現代數學的著名證明之一是Georg Cantor證明了有理數是可枚舉的。他是用下面這一張表來證明這一命題的: 1/1 1/2 1/3 1/4 1/5 … 2/1 2/2 2/3 2/4 … 3/1

原创 HDU 4991 Ordered Subsequence

Problem Description A numeric sequence of ai is ordered if a1<a2<……<aN. Let the subsequence of the given numeric sequ

原创 POJ 2418 Hardwood Species (trie樹\map)

Description Hardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally g

原创 POJ 1753 Flip Game (BFS)

Description Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One

原创 POJ 3687 Labeling Balls (逆向建邊)

Description Windy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in su

原创 POJ 1321 棋盤問題(DFS)

Description 在一個給定形狀的棋盤(形狀可能是不規則的)上面擺放棋子,棋子沒有區別。要求擺放時任意的兩個棋子不能放在棋盤中的同一行或者同一列,請編程求解對於給定形狀和大小的棋盤,擺放k個棋子的所有可行的擺放方案C。 Input

原创 HDU 1026 Ignatius and the Princess I (BFS)

Problem Description The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pre

原创 HDU 2473 Junk-Mail Filter(刪點)

Problem Description Recognizing junk mails is a tough task. The method used here consists of two steps: 1) Extract th

原创 HDU 5137 How Many Maos Does the Guanxi Worth (最短路徑最大值)

Problem Description "Guanxi" is a very important word in Chinese. It kind of means "relationship" or "contact". Guanx

原创 HDU 4403 A very hard Aoshu problem (DFS)

Problem Description Aoshu is very popular among primary school students. It is mathematics, but much harder than ordi

原创 ZOJ 3816 Generalized Palindromic Number (DFS,暴力枚舉)

A number that will be the same when it is written forwards or backwards is known as a palindromic number. For example,