HDU 1548 A strange lift

Problem DescriptionThere is a strange lift.Thelift can stop can at every floor as you want, and there is a number Ki(0 <=Ki <= N) on every floor.The lift have just two buttons: up and down.When youat floor i,if you press the button "UP" , you

zoj 1654 Place the Robots

Place the RobotsTime Limit: 5 Seconds      Memory Limit: 32768 KB Robert is a famous engineer. One day he was given a task by his boss. The background of the task was the following:Given a map consisting of square blocks. There were three kinds of

POJ 2168 Popular Cows

DescriptionEvery cow's dream is to becomethe most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows,you are given up to M (1 <= M <= 50,000) ordered pairs of the form (A, B)that tell you that cow A thinks that cow B is

HDU 3613Best Reward(擴充KMP解法)

Best RewardTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 406    Accepted Submission(s): 167Problem DescriptionAfter an uphill battle, General Li won a great victory. Now the head of state

POJ 2168 Joke with Turtles

Description (Special Judge)There is a famous joke-riddlefor children: Three turtles are crawlingalong a road. One turtle says: "There are two turtles ahead of me."The other turtle says: "There are two turtles behind me." The thirdturtle says: "There

HDU 2594Simpsons’ Hidden Talents(KMP運用)

Simpsons’ Hidden TalentsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1716    Accepted Submission(s): 619Problem DescriptionHomer: Marge, I just figured out a way to discover some of the

HDU 1257最少攔截系統(簡單貪心,每次遇到這個題都會糾結)

最少攔截系統Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12958    Accepted Submission(s): 5155Problem

POJ 1042 Gone Fishing

DescriptionJohn is going on a fishingtrip. He has h hours available (1 <= h <= 16), and there are n lakes inthe area (2 <= n <= 25) all reachable along a single, one-way road. Johnstarts at lake 1, but he can finish at any lake he wants.

HDU 1358Period(KMP周期串)

PeriodTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1993    Accepted Submission(s): 978Problem DescriptionFor each prefix of a given string S with N characters (each character has an ASCII

HDU 3294Girls’ research最長迴文子串(暴力和manacher 兩種解法)

Girls' researchTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 444    Accepted Submission(s): 148Problem DescriptionOne day, sailormoon girls are so delighted that they intend to research about

HDU 1114 Piggy-Bank

Problem DescriptionBefore ACM can do anything, abudget must be prepared and the necessary financial support obtained. The mainincome for this action comes from Irreversibly Bound Money (IBM). The ideabehind is simple. Whenever some ACM member has

POJ 3461 Oulipo(簡單KMP)

OulipoTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17128 Accepted: 6892DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from

POJ2371:Questions and answers

DescriptionThe database of the Pentagon contains a top-secret information. We don't know what the information is — you know, it's top-secret, — but we know the format of its representation. It is extremely simple. We don't know why, but all the data

HDU 1520 Anniversary party

Problem DescriptionThere is going to be a partyto celebrate the 80-th Anniversary of the Ural State University. The Universityhas a hierarchical structure of employees. It means that the supervisorrelation forms a tree rooted at the rector V. E.

POJ 2406 Power Strings(最小迴圈節的應用)

Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 27359 Accepted: 11450DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of

HDU1257:最少攔截系統

Problem Description某國為了防禦敵國的飛彈襲擊,發展出一種飛彈攔截系統.但是這種飛彈攔截系統有一個缺陷:雖然它的第一發炮彈能夠到達任意的高度,但是以後每一發炮彈都不能超過前一發的高度.某天,雷達捕捉到敵國的飛彈來襲.由於該系統還在試用階段,所以只有一套系統,因此有可能不能攔截所有的飛彈.怎麼辦呢?多搞幾套系統唄!你說說倒蠻容易,成本呢?成本是個大問題啊.所以俺就到這裡來求救了,請協助計算一下最少需要多少套攔截系統. Input輸入若干組資料.每組資料包括:飛彈總個數(正整數),

HDU 1561 The more, The Better

Problem DescriptionACboy很喜歡玩一種戰略遊戲,在一個地圖上,有N座城堡,每座城堡都有一定的寶物,在每次遊戲中ACboy允許攻克M個城堡並獲得裡面的寶物。但由於地理位置原因,有些城堡不能直接攻克,要攻克這些城堡必須先攻克其他某一個特定的城堡。你能幫ACboy算出要獲得盡量多的寶物應該攻克哪M個城堡嗎?  Input每個測試執行個體首先包括2個整數,N,M.(1 <= M <= N <=200);在接下來的N行裡,每行包括2個整數,a,b. 在第 i

POJ 2185 Milking Grid(最小覆蓋子矩陣面積KMP)

Milking GridTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 4901 Accepted: 2043DescriptionEvery morning when they are milked, the Farmer John's cows form a rectangular grid that is R (1 <= R <= 10,000) rows by C (1 <= C <= 75)

HDU1856:More is better

Problem DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements.Mr Wang selected a room big enough to hold the boys.

POJ 1442 Black Box

DescriptionOur Black Box represents aprimitive database. It can save an integer array and has a special i variable.At the initial moment Black Box is empty and i equals 0. This Black Boxprocesses a sequence of commands (transactions). There are two

總頁數: 61357 1 .... 17458 17459 17460 17461 17462 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.