Codeforces Round 618 (Div. 2)


A. Non-zero
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
3
2 -1 -1
4
-1 0 0 1
2
-1 2
3
0 -2 1
Output
1
2
0
2
----------------------------------------------------------------------------------------------------
B. Assigning to Classes
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1
1 1
3
6 5 4 1 2 3
5
13 4 20 13 2 5 8 3 17 16
Output
0
1
5
----------------------------------------------------------------------------------------------------
C. Anu Has a Function
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
4 0 11 6
Output
11 6 4 0
Input
1
13
Output
13 
----------------------------------------------------------------------------------------------------
D. Aerodynamic
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 0
4 1
3 4
0 3
Output
YES
Input
3
100 86
50 0
150 0
Output
nO
Input
8
0 0
1 0
2 1
3 3
4 6
3 6
2 5
1 3
Output
YES
----------------------------------------------------------------------------------------------------
E. Water Balance
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
7 5 5 7
Output
5.666666667
5.666666667
5.666666667
7.000000000
Input
5
7 8 8 10 12
Output
7.000000000
8.000000000
8.000000000
10.000000000
12.000000000
Input
10
3 9 5 5 1 7 5 3 8 7
Output
3.000000000
5.000000000
5.000000000
5.000000000
5.000000000
5.000000000
5.000000000
5.000000000
7.500000000
7.500000000
----------------------------------------------------------------------------------------------------
