Codeforces Round 618 (Div. 1)


A. 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 
----------------------------------------------------------------------------------------------------
B. 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
----------------------------------------------------------------------------------------------------
C. 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
----------------------------------------------------------------------------------------------------
D. Around the World
time limit per test: 2 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
6 8
1 2 0
2 3 1
2 4 3
2 6 2
3 4 8
3 5 4
5 4 5
5 6 6
Output
2
Input
7 9
1 2 0
1 3 1
2 3 9
2 4 3
2 5 4
4 5 7
3 6 6
3 7 7
6 7 8
Output
1
Input
4 4
1 2 27
1 3 1
1 4 1
3 4 0
Output
6
----------------------------------------------------------------------------------------------------
E. So Mean
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 2
Output
? 1 2
? 1 1
! 1 2 
----------------------------------------------------------------------------------------------------
