eolymp
bolt
Try our new interface for solving problems
Problems

Super sum

Super sum

Given \textbf{N} integers. Required for each number to find the number of options to split the sum of two other numbers from the set. \InputFile The first line contains the number \textbf{N} (\textbf{1} ≤ \textbf{N} ≤ \textbf{10000}). Next, set \textbf{N} of natural numbers not exceeding \textbf{1000000000}. For each number of partitions is less than \textbf{2^31}. \OutputFile Print the \textbf{N} numbers (one per line) - the number of partitions in a manner consistent with the original.
Time limit 5 seconds
Memory limit 64 MiB
Input example #1
5
1 1 2 2 3
Output example #1
0
0
1
1
4