Problem D:合唱隊形 Time Limit:1000MS Memory Limit:65536K Total Submit:1237 Accepted:437 Language: not limited Description N位同學(xué)站成一排,音樂老師要請其中的(N-K)位同學(xué)出列,使得剩下的K位同學(xué)排成合唱隊形。 合唱隊形是指這樣的一種隊形:設(shè)K位同學(xué)從左到右依次編號為1,2…,K,他們的身高分別為T1,T2,…,TK, 則他們的身高滿足T1 < T2 < ...< Ti > Ti+1 > … >TK(1<=i<=K)。 你的任務(wù)是,已知所有N位同學(xué)的身高,計算最少需要幾位同學(xué)出列,可以使得剩下的同學(xué)排成合唱隊形。 Input 輸入包含若干個測試用例。 對于每個測試用例,輸入第一行是一個整數(shù)N(2<=N<=100),表示同學(xué)的總數(shù)。第二行有N個整數(shù),用空格分隔,第i個整數(shù)Ti(130<=Ti<=230)是第i位同學(xué)的身高(厘米)。當(dāng)輸入同學(xué)總數(shù)N為0時表示輸入結(jié)束。 Output 對于每個測試案例,輸出包括一行,這一行只包含一個整數(shù),就是最少需要幾位同學(xué)出列。 Sample Input 8 186 186 150 200 160 130 197 220 3 150 130 140 0 Sample Output 4 1
標(biāo)簽: Limit Accepted Language Problem
上傳時間: 2014-01-13
上傳用戶:aappkkee
Problem F:汽車加油 Time Limit:1000MS Memory Limit:65536K Total Submit:1400 Accepted:404 Language: not limited Description 一輛汽車加滿油后可行駛n公里。旅途中有若干個加油站。設(shè)計一個有效算法,指出應(yīng)在哪些加油站停靠加油,使沿途加油次數(shù)最少。 編程任務(wù): 對于給定的n和k(k <= 10000)個加油站位置,編程計算最少加油次數(shù)。 Input 第一行有2 個正整數(shù)n和k,表示汽車加滿油后可行駛n公里,且旅途中有k個加油站。接下來的1 行中,有k+1 個整數(shù),表示第k個加油站與第 k-1 個加油站之間的距離。第0 個加油站表示出發(fā)地,汽車已加滿油。第k+1 個加油站表示目的地。 Output 輸出最少加油次數(shù)。如果無法到達(dá)目的地,則輸出”No Solution”。 Sample Input 7 7 1 2 3 4 5 1 6 6 Sample Output 4
標(biāo)簽: Limit Accepted Language Problem
上傳時間: 2016-04-12
上傳用戶:youth25
Fast settling-time added to the already conflicting requirements of narrow channel spacing and low phase noise lead to Fractional4 divider techniques for PLL synthesizers. We analyze discrete "beat-note spurious levels from arbitrary modulus divide sequences including those from classic accumulator methods.
標(biāo)簽: settling-time requirements conflicting already
上傳時間: 2016-04-14
上傳用戶:liansi
Discrete Fourier Transform and Power Spectrum Calculates Power Spectrum from a Time Series
標(biāo)簽: Spectrum Power Calculates Transform
上傳時間: 2014-01-21
上傳用戶:woshini123456
Real Time OS 教學(xué)資料
上傳時間: 2016-04-25
上傳用戶:ryb
Develop Zigbee network real-time Os
標(biāo)簽: real-time Develop network Zigbee
上傳時間: 2014-11-27
上傳用戶:whenfly
A Novel Coded Layered Space-Time- Frequency Architecture: Convolutional Codes
標(biāo)簽: Convolutional Architecture Space-Time Frequency
上傳時間: 2014-01-21
上傳用戶:zsjzc
Determine the settling time of the response.
標(biāo)簽: Determine the settling response
上傳時間: 2016-05-03
上傳用戶:zhliu007
Compute the overshoot of the time response.
標(biāo)簽: the overshoot response Compute
上傳時間: 2013-12-21
上傳用戶:zhangjinzj
simulates coin tossing. Let the program toss a coin each time the user chooses the “Toss Coin” menu option. Count the number of times each side of the coin appears. Display the results. The program should call a separate method flip that takes no arguments and returns false for tails and true for heads. [ Note: If the program realistically simulates coin tossing, each side of the coin should appear approximately half the time.]
標(biāo)簽: the coin simulates chooses
上傳時間: 2014-08-30
上傳用戶:pompey
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1