HDU1587:Flowers

Problem DescriptionAs you know, Gardon trid hard for his love-letter, and now he's spending too much time on choosing flowers for Angel.When Gardon entered the flower shop, he was frightened and dazed by thousands kinds of flowers. "How can I choose!

HDU2710:Max Factor

Problem DescriptionTo improve the organization of his farm, Farmer John labels each of his N (1 <= N <= 5,000) cows with a distinct serial number in the range 1..20,000. Unfortunately, he is unaware that the cows interpret some serial numbers

HDU2700:Parity

Problem DescriptionA bit string has odd parity if the number of 1's is odd. A bit string has even parity if the number of 1's is even.Zero is considered to be an even number, so a bit string with no 1's has even parity. Note that the number of0's

POJ1936:All in All

DescriptionYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss in detail how the strings are

POJ2260:Error Correction

DescriptionA boolean matrix has the parity property when each row and each column has an even sum, i.e. contains an even number of bits which are set. Here's a 4 x 4 matrix which has the parity property:1 0 1 00 0 0 01 1 1 10 1 0 1The sums of the

POJ2524:Ubiquitous Religions

DescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your university believe in.You know that there are n

POJ2027:No Brainer

DescriptionZombies love to eat brains. Yum.InputThe first line contains a single integer n indicating the number of data sets.The following n lines each represent a data set. Each data set will be formatted according to the following description:A

HDU3782:xxx定律

Problem Description對於一個數n,如果是偶數,就把n砍掉一半;如果是奇數,把n變成 3*n+ 1後砍掉一半,直到該數變為1為止。請計算需要經過幾步才能將n變到1,具體可見範例。 Input測試包含多個用例,每個用例包含一個整數n,當n為0 時表示輸入結束。(1<=n<=10000) Output對於每組測試案例請輸出一個數,表示需要經過的步數,每組輸出佔一行。 Sample Input310 Sample Output50  #include

強大的進位轉換strtol

轉自http://hi.baidu.com/qwpsmile/blog/item/9bc44efa4f41018a9f514637.html+----------------+|      strtol             |+----------------+i.e. string to longlong int strtol(const char *nptr, char **endptr, int base)strtol()會將nptr指向的字串,根據參數base,按權轉化為long

HDU1859:最小長方形

Problem Description給定一系列2維平面點的座標(x, y),其中x和y均為整數,要求用一個最小的長方形框將所有點框在內。長方形框的邊分別平行於x和y座標軸,點落在邊上也算是被框在內。 Input測試輸入包含若干測試案例,每個測試案例由一系列座標組成,每對座標佔一行,其中|x|和|y|小於 231;一對0 座標標誌著一個測試案例的結束。注意(0,

HDU1228:A + B

Problem Description讀入兩個小於100的正整數A和B,計算A+B.需要注意的是:A和B的每一位元字由對應的英文單詞給出. Input測試輸入包含若干測試案例,每個測試案例佔一行,格式為"A + B =",相鄰兩字串有一個空格間隔.當A和B同時為0時輸入結束,相應的結果不要輸出.  Output對每個測試案例輸出1行,即A+B的值. Sample Inputone + two =three four + five six =zero seven + eight nine

HDU1686:Oulipo

Problem DescriptionThe 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 the book:Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fair

HDU3783:ZOJ

 Problem Description 讀入一個字串,字串中包含ZOJ三個字元,個數不一定相等,按ZOJ的順序輸出,當某個字元用完時,剩下的仍然按照ZOJ的順序輸出。  Input 題目包含多組用例,每組用例佔一行,包含ZOJ三個字元,當輸入“E”時表示輸入結束。1<=length<=100。  Output 對於每組輸入,請輸出一行,表示按照要求處理後的字串。具體可見範例。  Sample Input ZZOOOJJJZZZZOOOOOJJJZOOOJJE  Sample

HDU2054:A == B ?

Problem DescriptionGive you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Inputeach test case contains two numbers A and B. Outputfor each case, if A is equal to B, you should print "YES", or print "NO". Sample

HDU2568:前進

Problem Description輕鬆通過墓碑,進入古墓後,才發現裡面別有洞天。突然,Yifenfei發現自己周圍是黑壓壓的一群蝙蝠,個個扇動翅膀正準備一起向他發起進攻!形勢十分危急!好在此時的yifenfei已經不是以前那個經常被lemon搶走MM的菜鳥了!面對眾多蝙蝠的嗜血狂攻,只見yifenfei使出輕靈的劍法,刷,刷,刷,瞬間搞定……現已知yifenfei使用了2招(劍招A和劍招B):劍招A,一招能殺死一半的蝙蝠。但是如果當前的蝙蝠數為奇數,那麼就必須先出一招劍招B殺死其中任意一個,

HDU1407:測試你是否和LTC水平一樣高

Problem Description大家提到LTC都佩服的不行,不過,如果競賽只有這一個題目,我敢保證你和他絕對在一個水平線上!你的任務是:計算方程x^2+y^2+z^2= num的一個正整數解。 Input輸入資料包含多個測試執行個體,每個執行個體佔一行,僅僅包含一個小於等於10000的正整數num。 Output對於每組測試資料,請按照x,y,z遞增的順序輸出它的一個最小正整數解,每個執行個體的輸出佔一行,題目保證所有測試資料都有解。 Sample Input3 Sample

HDU1029:Ignatius and the Princess IV

Problem Description"OK, you are not too bad, em... But you can never pass the next test." feng5166 says."I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to tell me which integer is the

POJ2262:Goldbach’s Conjecture

DescriptionIn 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture:Every even number greater than 4 can be written as the sum of two odd prime numbers. For example: 8 = 3

HDU2206:IP的計算

Problem

POJ1306:Combinations

DescriptionComputing the exact number of ways that N things can be taken M at a time can be a great challenge when N and/or M become very large. Challenges are the stuff of contests. Therefore, you are to make just such a computation given the

總頁數: 61357 1 .... 17456 17457 17458 17459 17460 .... 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.