原创 hdu 2124 Repair the Wall

Problem Description Long time ago , Kitty lived in a small village. The air was fresh and the scenery was very beauti

原创 hdu 2209 翻紙牌遊戲

Problem Description 有一種紙牌遊戲,很有意思,給你N張紙牌,一字排開,紙牌有正反兩面,開始的紙牌可能是一種亂的狀態(有些朝正,有些朝反),現在你需要整理這些紙牌。但是麻煩的是,每當你翻一張紙牌(由正翻到反,或者有反

原创 hdu 1671 Phone List

Problem Description Given a list of phone numbers, determine if it is consistent in the sense that no number is the p

原创 hdu 1251 統計難題

Problem Description Ignatius最近遇到一個難題,老師交給他很多單詞(只有小寫字母組成,不會有重複的單詞出現),現在老師要他統計出以某個字符串爲前綴的單詞數量(單詞本身也是自己的前綴). Input 輸入數

原创 hdu 2955 Robberies

Problem Description The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usuall

原创 hdu 1166 敵兵佈陣

C國的死對頭A國這段時間正在進行軍事演習,所以C國間諜頭子Derek和他手下Tidy又開始忙乎了。A國在海岸線沿直線佈置了N個工兵營地,Derek和Tidy的任務就是要監視這些工兵營地的活動情況。由於採取了某種先進的監測手段,所以每個工

原创 hdu 2546 飯卡

Problem Description 電子科大本部食堂的飯卡有一種很詭異的設計,即在購買之前判斷餘額。如果購買一個商品之前,卡上的剩餘金額大於或等於5元,就一定可以購買成功(即使購買後卡上餘額爲負),否則無法購買(即使金額足夠)。所

原创 hdu 1394 Minimum Inversion Number(樹狀數組)

Minimum Inversion Number Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Subm

原创 hdu 2037 今年暑假不AC

Problem Description “今年暑假不AC?” “是的。” “那你幹什麼呢?” “看世界盃呀,笨蛋!” “@#$%^&*%...” 確實如此,世界盃來了,球迷的節日也來了,估計很多ACMer也會拋開電腦,奔向電視了。 作

原创 hdu 3074 Multiply game

Problem Description Tired of playing computer games, alpc23 is planning to play a game on numbers. Because plus and s

原创 hdu 3999 The order of a Tree

The order of a Tree Problem Description As we know,the shape of a binary search tree is greatly related to the order

原创 hdu 1892 See you~

See you~ Problem Description Now I am leaving hust acm. In the past two and half years, I learned so many knowledge

原创 二叉搜索樹 hdu 3791

二叉搜索樹 Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 17   Ac

原创 計算器的製作

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; u

原创 hdu 2852 KiKi's K-Number

For the k-th number, we all should be very familiar with it. Of course,to kiki it is also simple. Now Kiki meets a v