Codeforces Round 737 (Div. 2)


A. Ezzat and Two Subsequences
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
3
3 1 2
3
-7 -6 -6
3
2 2 2
4
17 3 5 -3
Output
4.500000000
-12.500000000
4.000000000
18.666666667
----------------------------------------------------------------------------------------------------
B. Moamen and k-subarrays
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
5 4
6 3 4 2 1
4 2
1 -4 0 -2
5 1
1 2 3 4 5
Output
Yes
No
Yes
----------------------------------------------------------------------------------------------------
C. Moamen and XOR
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
3 1
2 1
4 0
Output
5
2
1
----------------------------------------------------------------------------------------------------
D. Ezzat and Grid
time limit per test: 2.5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 6
1 1 1
1 7 8
2 7 7
2 15 15
3 1 1
3 15 15
Output
0
Input
5 4
1 2 3
2 4 6
3 3 5
5 1 1
Output
3
2 4 5
----------------------------------------------------------------------------------------------------
E. Assiut Chess
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
Left
Right
Done
Output
7 5
7 6
7 7
----------------------------------------------------------------------------------------------------
