Input The first line of the input contains a single integer T (1 <= T <= 20), the number of test cases. Then T cases follow. The first line of each case contains N, and the second line contains N integers giving the time for each people to cross the river. Each case is preceded by a blank line. There won t be more than 1000 people and nobody takes more than 100 seconds to cross. Output For each test case, print a line containing the total number of seconds required for all the N people to cross the river. Sample Input 1 4 1 2 5 10 Sample Output 17
標簽: the contains integer number
上傳時間: 2015-10-27
上傳用戶:plsee
Input The input contains blocks of 2 lines. The first line contains the number of sticks parts after cutting, there are at most 64 sticks. The second line contains the lengths of those parts separated by the space. The last line of the file contains zero. Output The output should contains the smallest possible length of original sticks, one per line. Sample Input 9 5 2 1 5 2 1 5 2 1 4 1 2 3 4 0 Sample Output 6 5
標簽: contains The blocks number
上傳時間: 2015-10-27
上傳用戶:lepoke
Input The input consists of two lines. The first line contains two integers n and k which are the lengths of the array and the sliding window. There are n integers in the second line. Output There are two lines in the output. The first line gives the minimum values in the window at each position, from left to right, respectively. The second line gives the maximum values. Sample Input 8 3 1 3 -1 -3 5 3 6 7 Sample Output -1 -3 -3 -3 3 3 3 3 5 5 6 7
上傳時間: 2014-12-21
上傳用戶:hongmo
Solutions are obtained for Poissson, diffusion, or wave PDEs homogeneous or nonhomogeneous equations and/or boundary conditions rectangular, cylindrical, or spherical coordinates time, Laplace, or frequency domains Dirichlet, Neumann, Robin, singular, periodic, or incoming/outgoing boundary conditions. Output is suitable for pasting into LaTeX documents.
標簽: nonhomogeneous homogeneous Solutions diffusion
上傳時間: 2015-10-30
上傳用戶:JasonC
design LP,HP,B S digital Butterworth and Chebyshev filter. All array has been specified internally,so user only need to input f1,f2,f3,f4,fs(in hz), alpha1,alpha2(in db) and iband (to specify the type of to design). This program output hk(z)=bk(z)/ak(z),k=1,2,..., ksection and the freq.
標簽: Butterworth internally Chebyshev specified
上傳時間: 2015-11-08
上傳用戶:253189838
% 文件名:randlsbget.m % 程序員:余波 % 編寫時間:2007.6.25 % 函數功能: 本函數將完成提取隱秘于上的秘密信息 % 輸入格式舉例:result=( scover.jpg ,56, secret.txt ,2001) % 參數說明: % output是信息隱藏后的圖象 % len_total是秘密信息的長度 % goalfile是提取出的秘密信息文件 % key是隨機間隔函數的密鑰 % result是提取的信息 function result=randlsbget(output,len_total,goalfile,key) ste_cover=imread(output) ste_cover=double(ste_cover) % 判斷嵌入信息量是否過大 [m,n]=size(ste_cover) frr=fopen(goalfile, a ) % p作為信息嵌入位計數器將信息序列寫回文本文件 p=1 % 調用隨機間隔函數選取像素點 [row,col]=randinterval(ste_cover,len_toal,key) for i=:len_toal if bitand(ste_cover(row(i),col(i)),1)==1 fwrite(frr,1, bit1 ) result(p,1) else fwrite(frr,0, bit1 ) result(p,1)=0 end if p==len_total break end p=p+1 end fclose(frr)
標簽: randlsbget result scover 2007
上傳時間: 2015-11-10
上傳用戶:yzhl1988
Mobile phones are constantly decreasing in size, thereby complicating the acoustical functionality. Signal processing methods can be used to partially mitigate this problem. In this paper we suggest a method which uses multiple spectral subtraction functions and two microphones, introducing only a short signal delay.
標簽: functionality complicating acoustical constantly
上傳時間: 2015-11-15
上傳用戶:youth25
These two classes show an extremely simple example of java.net socket programming. They implement the Unix daytime protocol, an extremely simple protocol that consists entirely of the server sending its current local time and date to the client as an ASCII string. The server, to keep it very simple, does not use multiple threads. This code requires JDK 1.1 or later, but can easily be adapted to JDK 1.0.
標簽: programming extremely implement classes
上傳時間: 2015-11-16
上傳用戶:jennyzai
本裝置是一個以HT46R71D 為主芯片,配合傳感器組成的汽車輪胎氣壓檢測裝 置,最終取高三位有效值于LCD 顯示,有四種顯示單位供切換(Psi、Bar、Kpa、 Kgf/cm2)。本裝置僅為參考范例,使用時,為提高準確度,建議多量測些組數 據來構建Sensor Output Voltage - Discharge Time (V-T)表格,并作相應校準。
上傳時間: 2015-11-19
上傳用戶:shinesyh
的問題.派爾高協議,控制左轉右轉時,出現問題.其他功能好用.我用DELPHI寫的程序,在MOUSEDOWN中, str := chr($FF)+chr($01)+chr($00)+chr($04)+chr($0F)+chr($00)+chr($14) MSComm1.output := str 在CLICK事件中: str := chr($FF)+chr($01)+chr($00)+chr($00)+chr($00)+chr($00)+chr($01) MSComm1.output := str
上傳時間: 2015-11-20
上傳用戶:Thuan