Submit | All submissions | Best solutions | Back to list |
EIPAIR - Buy gifts |
Vietnamese Women's Day is coming, Phuc wants to buy two gifts of the same price for his mother and sister. There are n items in the store. How many ways are there for Phuc to choose gifts?
Input
+ The first line is the number of testcases T (1 ≤ T ≤ 10^2)
+ Each test case consists of one line, the first number is the number of gifts n (0 n ≤ 10^5), and followed by n numbers ai - the price of each gift.
Output
For each test case, print a line that is the number of ways to choose gifts
Example
Input: 2 5 3 4 3 4 3 3 1 1 1 Output: 4 3
Added by: | Ha Minh Ngoc |
Date: | 2015-01-04 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: NCSHARP GOSU JULIA PYPY3 |