原创 NYOJ93【漢諾塔(三)】

描述 在印度,有這麼一個古老的傳說:在世界中心貝拿勒斯(在印度北部)的聖廟裏,一塊黃銅板上插着三根寶石針。印度教的主神梵天在創造世界的時候,在其

原创 NYOJ1100【WAJUEJI which home strong!】BFS+優先隊列

描述 在一個山溝裏,姐弟倆同時考上了大學。但由於家裏拮据,所以這並不是什麼好消息。父親對孩子說:我就是砸鍋賣鐵也要把你們姐倆供出來。 當時的姐姐

原创 POJ 1159【Palindrome】

Description A palindrome is a symmetrical string, that is, a string read identically from left to right as well as

原创 NYOJ 1118【藍翔校長的難題】

描述 南陽理工學院雖然不算太大, 但是學校裏有很多的池塘和樹林, 所以學校的風景很不錯, 但是校長還是對學校的綠化不滿意, 爲了給學生帶來更好的

原创 CodeForces 520B【Two Buttons】

Description Vasya has found a strange device. On the front panel of a device there are: a red button, a blue button

原创 POJ 2312 NYOJ284 【坦克大戰】優先隊列BFS

Description Many of us had played the game "Battle city" in our childhood, and some people (like me) even often pla

原创 【第七屆河南省賽】F.Turing equation

Description The fight goes on, whether to store  numbers starting with their most significant digit or their least  s

原创 FZU 2112【Tickets】

Description You have won a collection of tickets on luxury cruisers. Each ticket can be used only once, but can be u

原创 HDU 1213【】How Many Tables(並查集)

Problem Description Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to

原创 【 ZOJ 3607】Lazier Salesgirl

Description Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling. Sh

原创 FZU 2111【 Min Number】

Description Now you are given one non-negative integer n in 10-base notation, it will only contain digits ('0'-'9').

原创 藍橋杯 歷屆試題【高僧鬥法】

問題描述   古時喪葬活動中經常請高僧做法事。儀式結束後,有時會有“高僧鬥法”的趣味節目,以舒緩壓抑的氣氛。   節目大略步驟爲:先用糧食(一般是稻米)在地上“畫”出若干級臺階(表示N級浮屠)。又有若干小和尚隨機地“站”在某個臺階

原创 ZOJ 3600【Taxi Fare】模擬

Description Last September, Hangzhou raised the taxi fares. The original flag-down fare in Hangzhou was 10 yuan, plu

原创 HDU 4715 Difference Between Primes

Problem Description All you know Goldbach conjecture.That is to say, Every even integer greater than 2 can be express

原创 FZU2184【逆序數還原】

Description 有一段時間Eric對逆序數充滿了興趣,於是他開始求解許多數列的逆序數(對於由1...n構成的一種排列數組a,逆序數即爲滿足i<j,ai>aj的數字對數),但是某天他發現自己遺失了原來的數列,只留下之前計算過程