Problem 1984 --I think it's hard

1984: I think it's hard

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $3$ 正确数量 $3$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签
Xiao Ming is only seven years old, Now I give him some numbers, and ask him what is the second
largest sum if he can choose a part of them. For example, if I give him 1 、 2 、 3 , then he should tell
me 5 as 6 is the largest and 5 is the second. I think it is too hard for him, isn ’ t it?

Standard input will contain multiple test cases. The first line of the input is a single integer T (1 <= T <=
10) which is the number of test cases. And it will be followed by T consecutive test cases.
Each test case starts with a line containing an integer N (1<N<10) , the number I give Xiao Ming . The
second line contains N Integer numbers ai (-10<ai<10),

For each test case, output the answer.

2
3
1 2 3
4
0 1 2 3
5
5

推荐代码 查看1984 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] sqrjy 607422 2020-07-16 09:38:11
内存最少[$944 $KB] 范晋豪@信息与计算科学142 108893 2017-07-02 23:10:47
第一AC 范晋豪@信息与计算科学142 108893 2017-07-02 23:10:47
第一挑战 范晋豪@信息与计算科学142 108893 2017-07-02 23:10:47

赛题来源/所属竞赛 20100831湖工大校赛 N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛