Good Bye 2021: 2022 is NEAR
A
Integer Diversity
Codeforces
800
原题
←B →
翻译中…

You are given $n$ integers $a_1, a_2, \ldots, a_n$. You choose any subset of the given numbers (possibly, none or all numbers) and negate these numbers (i. e. change $x \to (-x)$). What is the maximum number of different values in the array you can achieve?

翻译中…

Input

翻译中…

The first line of input contains one integer $t$ ($1 \leq t \leq 100$): the number of test cases.

翻译中…

The next lines contain the description of the $t$ test cases, two lines per a test case.

翻译中…

In the first line you are given one integer $n$ ($1 \leq n \leq 100$): the number of integers in the array.

翻译中…

The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($-100 \leq a_i \leq 100$).

翻译中…

Output

翻译中…

For each test case, print one integer: the maximum number of different elements in the array that you can achieve negating numbers in the array.

翻译中…

Note

翻译中…

In the first example we can, for example, negate the first and the last numbers, achieving the array $[-1, 1, 2, -2]$ with four different values.

翻译中…

In the second example all three numbers are already different.

翻译中…

In the third example negation does not change anything.

翻译中…

样例

Input #1
3
4
1 1 2 2
3
1 2 3
2
0 0
Output #1
4
3
1
InputCopy OutputCopy
题目信息
题号
1616A
时间限制
1 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。