POJ2389:Bull Math

DescriptionBulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... or so they say. Farmer John wonders if their answers are correct. Help him check the bulls' answers. Read in

POJ1611:The Suspects

DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to separate the suspects from others.In

HDU2037:今年暑假不AC

Problem

POJ2178:猜數字

Problem DescriptionA有1數m,B來猜.B每猜一次,A就說"太大","太小"或"對了" 。 問B猜n次可以猜到的最大數。  Input第1行是整數T,表示有T組資料,下面有T行 每行一個整數n (1 ≤ n ≤ 30)  Output猜n次可以猜到的最大數 Sample Input213 Sample Output17   //公式 #include <iostream>#include <cmath>using namespace std;int

HDU3336:Count the string

Problem DescriptionIt is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example:s: "abab"The prefixes are: "a", "ab",

HDU3785:尋找大富翁

Problem Description浙江桐鄉烏鎮共有n個人,請找出該鎮上的前m個大富翁. Input輸入包含多組測試案例.每個用例首先包含2個整數n(0<n<=100000)和m(0<m<=10),其中: n為鎮上的人數,m為需要找出的大富翁數, 接下來一行輸入鎮上n個人的財富值.n和m同時為0時表示輸入結束. Output請輸出烏鎮前m個大富翁的財產數,財產多的排前面,如果大富翁不足m個,則全部輸出,每組輸出佔一行. Sample Input3 12 5 -15 31

HDU1157:Who’s in the Middle

Problem DescriptionFJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as much or more than the median; half give as much or less. Given an odd number of cows N (1 <=

POJ2305:Basic remains

DescriptionGiven a base b and two non-negative base b integers p and m, compute p mod m and print the result as a base b integer. p mod m is defined as the smallest non-negative integer k such that p = a*m + k for some integer a.InputInput consists

hdu 3018 Ant Trip (歐拉迴路之一筆畫問題)

Ant TripTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 819    Accepted Submission(s): 312Problem DescriptionAnt Country consist of N towns.There are M roads connecting the towns.Ant

HDU1379:DNA Sorting

Problem DescriptionOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this measure is 5, since D is greater than four

POJ2533:Longest Ordered Subsequence

DescriptionA numeric sequence of ai is ordered ifa1 <a2 < ... < aN. Let the subsequence of the given numeric sequence (a1,a2, ...,aN) be any sequence (ai1,ai2, ...,aiK), where 1 <=i1 < i2 < ... <iK <=N. For example, sequence (

HDU1047:Integer Inquiry

Problem DescriptionOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers. ``This supercomputer is great,'' remarked Chip.

HDU2561:第二小整數

Problem Description求n個整數中倒數第二小的數。每一個整數都獨立看成一個數,比如,有三個數分別是1,1,3,那麼,第二小的數就是1。 Input輸入包含多組測試資料。輸入的第一行是一個整數C,表示有C測試資料;每組測試資料的第一行是一個整數n,表示本組測試資料有n個整數(2<=n<=10),接著一行是 n個整數 (每個數均小於100); Output請為每組測試資料輸出第二小的整數,每組輸出佔一行。 Sample Input221 231 1 3 Sample

HDU3613:Best Reward(拓展KMP)

Problem DescriptionAfter an uphill battle, General Li won a great victory. Now the head of state decide to reward him with honor and treasures for his great exploit. One of these treasures is a necklace made up of 26 different kinds of gemstones,

POJ1163:The Triangle

Description73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top and ends somewhere on the base. Each step can go

HDU2535:Vote

Problem

HDU2523:SORT AGAIN

Problem Description給你N個整數,x1,x2...xn,任取兩個整數組合得到|xi-xj|,(0<i,j<=N,i!=j)。現在請你計算第K大的組合數是哪個(一個組合數為第K大是指有K-1個不同的組合數小於它)。 Input輸入資料首先包含一個正整數C,表示包含C組測試案例.每組測試資料的第一行包含兩個整數N,K。(1<N<=1000,0<K<=2000)接下去一行包含N個整數,代表x1,x2..xn。(0<=xi<=2000) 

HDU1394:Minimum Inversion Number

Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj.For a given sequence of numbers a1, a2, ..., an, if we move the first m >= 0 numbers to the

HDU3746:Cyclic Nacklace

Problem DescriptionCC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thinking about how to tide over the last days.

POJ3982:序列

Description數列A滿足An = An-1 + An-2 + An-3, n >= 3 編寫程式,給定A0, A1 和 A2, 計算A99Input輸入包含多行資料 每行資料包含3個整數A0, A1, A2 (0 <= A0, A1, A2 <= 32767) 資料以EOF結束Output對於輸入的每一行輸出A99的值Sample Input1 1 1Sample Output69087442470169316923566147 #include

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