從1加到N還有N!兩個(gè)算法實(shí)現(xiàn) N自己設(shè)置大小 沒(méi)有限制 只要內(nèi)存夠大 CPU夠快就行 我算100!用1秒多 結(jié)果我記得好像有300多位呢
上傳時(shí)間: 2016-04-11
上傳用戶:杜瑩12345
Problem D:合唱隊(duì)形 Time Limit:1000MS Memory Limit:65536K Total Submit:1237 Accepted:437 Language: not limited Description N位同學(xué)站成一排,音樂(lè)老師要請(qǐng)其中的(N-K)位同學(xué)出列,使得剩下的K位同學(xué)排成合唱隊(duì)形。 合唱隊(duì)形是指這樣的一種隊(duì)形:設(shè)K位同學(xué)從左到右依次編號(hào)為1,2…,K,他們的身高分別為T(mén)1,T2,…,TK, 則他們的身高滿足T1 < T2 < ...< Ti > Ti+1 > … >TK(1<=i<=K)。 你的任務(wù)是,已知所有N位同學(xué)的身高,計(jì)算最少需要幾位同學(xué)出列,可以使得剩下的同學(xué)排成合唱隊(duì)形。 Input 輸入包含若干個(gè)測(cè)試用例。 對(duì)于每個(gè)測(cè)試用例,輸入第一行是一個(gè)整數(shù)N(2<=N<=100),表示同學(xué)的總數(shù)。第二行有N個(gè)整數(shù),用空格分隔,第i個(gè)整數(shù)Ti(130<=Ti<=230)是第i位同學(xué)的身高(厘米)。當(dāng)輸入同學(xué)總數(shù)N為0時(shí)表示輸入結(jié)束。 Output 對(duì)于每個(gè)測(cè)試案例,輸出包括一行,這一行只包含一個(gè)整數(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
上傳時(shí)間: 2014-01-13
上傳用戶:aappkkee
編程題(15_01.c) 結(jié)構(gòu) struct student { long num char name[20] int score struct student *next } 鏈表練習(xí): (1).編寫(xiě)函數(shù)struct student * creat(int n),創(chuàng)建一個(gè)按學(xué)號(hào)升序排列的新鏈表,每個(gè)鏈表中的結(jié)點(diǎn)中 的學(xué)號(hào)、成績(jī)由鍵盤(pán)輸入,一共n個(gè)節(jié)點(diǎn)。 (2).編寫(xiě)函數(shù)void print(struct student *head),輸出鏈表,格式每行一個(gè)結(jié)點(diǎn),包括學(xué)號(hào),姓名,分?jǐn)?shù)。 (3).編寫(xiě)函數(shù)struct student * merge(struct student *a,struct student *b), 將已知的a,b兩個(gè)鏈表 按學(xué)號(hào)升序合并,若學(xué)號(hào)相同則保留成績(jī)高的結(jié)點(diǎn)。 (4).編寫(xiě)函數(shù)struct student * del(struct student *a,struct student *b),從a鏈表中刪除b鏈表中有 相同學(xué)號(hào)的那些結(jié)點(diǎn)。 (5).編寫(xiě)main函數(shù),調(diào)用函數(shù)creat建立2個(gè)鏈表a,b,用print輸出倆個(gè)鏈表;調(diào)用函數(shù)merge升序合并2個(gè) 鏈表,并輸出結(jié)果;調(diào)用函數(shù)del實(shí)現(xiàn)a-b,并輸出結(jié)果。 a: 20304,xxxx,75, 20311,yyyy,89 20303,zzzz,62 20307,aaaa,87 20320,bbbb,79 b: 20302,dddd,65 20301,cccc,99 20311,yyyy,87 20323,kkkk,88 20307,aaaa,92 20322,pppp,83
標(biāo)簽: student struct score long
上傳時(shí)間: 2016-04-13
上傳用戶:zxc23456789
股票搜索程序,可自動(dòng)搜索符合一定條件的股票。這里的條件主要包括前N天的成交量、價(jià)格等參數(shù)形成的K線特征。
上傳時(shí)間: 2013-12-29
上傳用戶:zjf3110
A new PLL topology and a new simplified linear model are presented. The new fractional-N synthesizer presents no reference spurs and lowers the overall phase noise, thanks to the presence of a SampleJHold block. With a new simulation methodology it is possible to perform very accurate simulations, whose results match closely those obtained with the linear PLL model developed.
標(biāo)簽: new fractional-N synthesizer simplified
上傳時(shí)間: 2016-04-14
上傳用戶:hjshhyy
This paper presents the key circuits of a 1MHz bandwidth, 750kb/s GMSK transmitter. The fractional-N synthesizer forming the basis of the transmitter uses a combined phasefrequency detector (PFD) and digital-to-analog converter (DAC) circuit element to obtain >28dB high frequency noise reduction when compared to classicalfrequency synthesis.
標(biāo)簽: fractional-N transmitter bandwidth circuits
上傳時(shí)間: 2016-04-14
上傳用戶:er1219
某旅館有n個(gè)等級(jí)的房間,第i等級(jí)有a個(gè)房間,每個(gè)等級(jí)有b個(gè)床位(1<=i<=n). 模擬旅館個(gè)管理系統(tǒng)中床位的分配和回收功能,設(shè)計(jì)能為單個(gè)旅客分配床位,在其離店便回收床位(供下次分配)的算法
標(biāo)簽: 房間
上傳時(shí)間: 2016-04-14
上傳用戶:VRMMO
高精度計(jì)算問(wèn)題N!高精度計(jì)算問(wèn)題的基本思想及一些實(shí)例
上傳時(shí)間: 2016-04-15
上傳用戶:zaizaibang
本程序是用于WGS-84向北京1954坐標(biāo)系轉(zhuǎn)換的。要想進(jìn)行轉(zhuǎn)換需要至少3個(gè)控制點(diǎn)。這些控制點(diǎn)要已知他們?cè)赪GS-84和北京1954坐標(biāo)系空間直角三維坐標(biāo)。程序通過(guò)解算,計(jì)算出轉(zhuǎn)換參量進(jìn)行解算。
上傳時(shí)間: 2016-04-15
上傳用戶:獨(dú)孤求源
本程序是用于WGS-84向北京1954坐標(biāo)系轉(zhuǎn)換的。要想進(jìn)行轉(zhuǎn)換需要至少3個(gè)控制點(diǎn)。這些控制點(diǎn)要已知他們?cè)赪GS-84和北京1954坐標(biāo)系空間直角三維坐標(biāo)。
標(biāo)簽: 1954 WGS 84 坐標(biāo)系
上傳時(shí)間: 2013-12-22
上傳用戶:nairui21
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1