Tug of War(A tug of war is to be arranged at the local office picnic. For the tug of war, the picnickers must be divided into two teams. Each person must be on one team or the other the number of people on the two teams must not differ by more than 1 the total weight of the people on each team should be as nearly equal as possible. The first line of input contains n the number of people at the picnic. n lines follow. The first line gives the weight of person 1 the second the weight of person 2 and so on. Each weight is an integer between 1 and 450. There are at most 100 people at the picnic. Your output will be a single line containing 2 numbers: the total weight of the people on one team, and the total weight of the people on the other team. If these numbers differ, give the lesser first. )
上傳時間: 2014-01-07
上傳用戶:離殤
This is a package to calculate Discrete Fourier/Cosine/Sine Transforms of 1-dimensional sequences of length 2^N. This package contains C and Fortran FFT codes.
標簽: dimensional Transforms calculate sequences
上傳時間: 2014-01-14
上傳用戶:LIKE
一個基于NHibernate的N層開發基礎框架(可以,馬上應用到你的項目中),使用.NET(C#)開發。基本操作CRUD完全實現,數據間的關系(one-to-many,many-to-many)均有實現!
標簽: NHibernate 開發基礎
上傳時間: 2013-12-20
上傳用戶:gaojiao1999
.數據結構 假設有M個進程N類資源,則有如下數據結構: MAX[M*N] M個進程對N類資源的最大需求量 AVAILABLE[N] 系統可用資源數 ALLOCATION[M*N] M個進程已經得到N類資源的資源量 NEED[M*N] M個進程還需要N類資源的資源量 2.銀行家算法 設進程I提出請求Request[N],則銀行家算法按如下規則進行判斷。 (1)如果Request[N]<=NEED[I,N],則轉(2);否則,出錯。 (2)如果Request[N]<=AVAILABLE,則轉(3);否則,出錯。 (3)系統試探分配資源,修改相關數據: AVAILABLE=AVAILABLE-REQUEST ALLOCATION=ALLOCATION+REQUEST NEED=NEED-REQUEST (4)系統執行安全性檢查,如安全,則分配成立;否則試探險性分配作廢,系統恢復原狀,進程等待。 3.安全性檢查 (1)設置兩個工作向量WORK=AVAILABLE;FINISH[M]=FALSE (2)從進程集合中找到一個滿足下述條件的進程, FINISH[i]=FALSE NEED<=WORK 如找到,執行(3);否則,執行(4) (3)設進程獲得資源,可順利執行,直至完成,從而釋放資源。 WORK=WORK+ALLOCATION FINISH=TRUE GO TO 2 (4)如所有的進程Finish[M]=true,則表示安全;否則系統不安全。
上傳時間: 2014-01-05
上傳用戶:moshushi0009
數據結構 假設有M個進程N類資源,則有如下數據結構: MAX[M*N] M個進程對N類資源的最大需求量 AVAILABLE[N] 系統可用資源數 ALLOCATION[M*N] M個進程已經得到N類資源的資源量 NEED[M*N] M個進程還需要N類資源的資源量 2.銀行家算法 設進程I提出請求Request[N],則銀行家算法按如下規則進行判斷。 (1)如果Request[N]<=NEED[I,N],則轉(2);否則,出錯。 (2)如果Request[N]<=AVAILABLE,則轉(3);否則,出錯。 (3)系統試探分配資源,修改相關數據: AVAILABLE=AVAILABLE-REQUEST ALLOCATION=ALLOCATION+REQUEST NEED=NEED-REQUEST (4)系統執行安全性檢查,如安全,則分配成立;否則試探險性分配作廢,系統恢復原狀,進程等待。 3.安全性檢查 (1)設置兩個工作向量WORK=AVAILABLE;FINISH[M]=FALSE (2)從進程集合中找到一個滿足下述條件的進程, FINISH[i]=FALSE NEED<=WORK 如找到,執行(3);否則,執行(4) (3)設進程獲得資源,可順利執行,直至完成,從而釋放資源。 WORK=WORK+ALLOCATION FINISH=TRUE GO TO 2 (4)如所有的進程Finish[M]=true,則表示安全;否則系統不安全。
上傳時間: 2013-12-24
上傳用戶:alan-ee
ENGLISH RESUME Dear sir/madam In answer to your advertisement in present interview for your need. I wish to tender my service. With reference to your advertisement in present interview for your need, I respectfully offer myself for the position.
標簽: your advertisement interview ENGLISH
上傳時間: 2014-09-08
上傳用戶:chenbhdt
Rotating shafts experience a an elliptical motion called whirl. It is important to decompose this motion into a forward and backward whil orbits. The current function makes use of two sensors to generate a bi-directional spectrogram. The method can be extended to any time-frequency distribution % % compute the forward/backward Campbell/specgtrogram % % INPUT: % y (n x 2) each column is measured from a different sensor % /////// % __ % |s1| y(:,1) % |__| % __ % / \ ________|/ % | | | s2 |/ y(:,2) % \____/ --------|/ % % Fs Sampling frequnecy % % OUTPUT: % B spectrogram/Campbel diagram % x x-axis coordinate vector (time or Speed) % y y-axis coordinate vector (frequency [Hz])
標簽: experience elliptical decompose important
上傳時間: 2015-06-23
上傳用戶:372825274
contain many examples code for I2c,UART,string ,digital convert, read/write to EEprom in microchip PIC16xx series. and the default compiler is hitech PIC16.
標簽: microchip examples contain digital
上傳時間: 2014-01-04
上傳用戶:xmsmh
/* * EULER S ALGORITHM 5.1 * * TO APPROXIMATE THE SOLUTION OF THE INITIAL VALUE PROBLEM: * Y = F(T,Y), A<=T<=B, Y(A) = ALPHA, * AT N+1 EQUALLY SPACED POINTS IN THE INTERVAL [A,B]. * * INPUT: ENDPOINTS A,B INITIAL CONDITION ALPHA INTEGER N. * * OUTPUT: APPROXIMATION W TO Y AT THE (N+1) VALUES OF T. */
標簽: APPROXIMATE ALGORITHM THE SOLUTION
上傳時間: 2015-08-20
上傳用戶:zhangliming420
American Gladiator,You are consulting for a game show in which n contestants are pitted against n gladiators in order to see which contestants are the best. The game show aims to rank the contestants in order of strength this is done via a series of 1-on-1 matches between contestants and gladiators. If the contestant is stronger than the gladiator, then the contestant wins the match otherwise, the gladiator wins the match. If the contestant and gladiator have equal strength, then they are “perfect equals” and a tie is declared. We assume that each contestant is the perfect equal of exactly one gladiator, and each gladiator is the perfect equal of exactly one contestant. However, as the gladiators sometimes change from one show to another, we do not know the ordering of strength among the gladiators.
標簽: contestants consulting Gladiator are
上傳時間: 2013-12-18
上傳用戶:windwolf2000