1176: Electrical Outlets
内存限制:64 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:1
解决:1
题目描述

输入
Input will start with a single integer 1 <= N <= 20, indicating the number of test cases to follow. Then follow N lines, each describing a test case. Each test case starts with an integer 1 <= K <= 10, indicating the number of power strips in the test case. Then follow, on the same line, K integers separated by single spaces, O1 O2 . . . OK, where 2 <= Oi <= 10, indicating the number of outlets in each power strip.
输出
Output one line per test case, with the maximum number of appliances that can be powered.
样例输入 复制
3
3 2 3 4
10 4 4 4 4 4 4 4 4 4 4
4 10 10 10 10
样例输出 复制
7
31
37