Fake Binary stuff

All submissions for this problem are available.
### Problem Statement The interns of the *Kazukabe Defense Group* were given a set of numbers which they had to manipulate in a specific way. The numbers were *random whole numbers*, and the interns were asked to arrange them in a *binary tree*, in any arrangement of their choice. Then, they were asked to find the branch which had the maximum sum of values held in the nodes of that branch. You are one of the interns, who will be getting shortlisted as a member of the company, if you solve this problem. In other words, you will be given a random set of numbers, and you have to arrange them in a binary tree to maximize the sum in any one branch, you have to find this maximized sum. ###Input format  The first line will contain the number of testcases $T$  Each testcase will have 2 lines, the first line will have the total numbers $N$ given to you, and the second line will contain $N$ different numbers separated by space. ###Output Format Print a single integer for each testcase in a separate line, which has the maximum sum. ### Constraints  $0 \leq T \leq 10^{5}$  $0 \leq N \leq 10^{3}$  $0 \leq A_i \leq 10^{3}$ ###Sample Input 1 2 3 5 ###Sample Output 8 ###Explanation 3 and 5 can be arranged in 2 ways, 3 as root and 5 as child, or 5 as root and 3 as child. Thus, the sum is 8, which is the maximum possible sum.Author:  tambadkar3 
Tags  tambadkar3 
Date Added:  10042019 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, R, COB, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions