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
的问题.派尔高协议,控制左转右转时,出现问题.其他功能好用.我用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
STK500_2下载器 M8 支持bootloader(带bootloader源码) 使用STK500_2 协议的ISP下载器,监控芯片 M8,数据通讯RS232.使用 ATMEL AVRStudio 4.xx STK500工具的进行软件升级。可通过ATMEL AVRStudio 4.xx STK500工具升级固件程序。升级方法:通过设定电压 即按“write voltage”按钮进入bootloader程序。
标签: bootloader STK 500 ISP
上传时间: 2014-08-27
上传用户:haoxiyizhong
已知:Sn= 1+1/2+1/3+…+1/n。显然对于任意一个整数K,当n足够大的时候,Sn大于K。 现给出一个整数K(1<=k<=15),要求计算出一个最小的n;使得Sn>K。 Input 键盘输入 k Output 屏幕输出 n Sample Input 1 Sample Output 2 Source
上传时间: 2014-01-25
上传用户:ruixue198909
这是一个ACM中的题请大家看以下哈 如果有问题请多多指教 n个猴子围坐一圈并按照顺时针方向从1到n编号,从第s个猴子开始进行1到m的报数,报数到第m的猴子 退出报数,从紧挨它的下一个猴子重新开始1到m的报数,如此进行下去知道所有的猴子都退出为止。 求给出这n个猴子的退出的顺序表。 Input 有做组测试数据.每一组数据有两行,第一行输入n(表示猴子的总数)第二行输入数据s(从第s 个猴子开 始报数)和数据m(第m个猴子退出报数).当输入0 0 0时表示程序结束. Output 输出中,每组数据的输出结果为一行,中间用逗号间隔。
上传时间: 2014-01-01
上传用户:脚趾头