| Contests - ACM Student Chapter - PSUT |
|---|
| Private |
| Spectator |
| ZU JCPC Qualification 2026 |
|---|
| Finished |
Jebreel has given you an array, you should do the following operation exactly once
remove all appearances of an integer x , what is the maximum sum of the array after the operation
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The description of the test cases follows.
The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^5$$$) — the size of the array.
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$-10^9 \le a_i \le 10^9$$$) — the elements of the array.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$.
For each test case, output a single integer — the maximum sum of the array after applying the operation exactly once.
451 2 3 -1 -24-5 -5 -5 -5610 10 10 5 5 23-1 2 -3
5 0 42 1
| Name |
|---|

