Codeforces Round 473 (Div. 2)


A. Mahmoud and Ehab and the even-odd game
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
Output
Ehab
Input
2
Output
Mahmoud
----------------------------------------------------------------------------------------------------
B. Mahmoud and Ehab and the message
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 4 4
i loser am the second
100 1 1 5 10
1 1
1 3
2 2 5
1 4
i am the second
Output
107
Input
5 4 4
i loser am the second
100 20 1 5 10
1 1
1 3
2 2 5
1 4
i am the second
Output
116
----------------------------------------------------------------------------------------------------
C. Mahmoud and Ehab and the wrong algorithm
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
Output
-1
1 2
Input
8
Output
1 2
1 3
2 4
2 5
3 6
4 7
4 8
1 2
1 3
2 4
2 5
2 6
3 7
6 8
----------------------------------------------------------------------------------------------------
D. Mahmoud and Ehab and another array construction task
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
2 3 5 4 13
Output
2 3 5 7 11 
Input
3
10 3 7
Output
10 3 7 
----------------------------------------------------------------------------------------------------
E. Mahmoud and Ehab and the xor-MST
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
Output
4
----------------------------------------------------------------------------------------------------
F. Mahmoud and Ehab and yet another xor task
time limit per test: 1 second
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
5 5
0 1 2 3 4
4 3
2 0
3 7
5 7
5 8
Output
4
2
0
4
0
Input
3 2
1 1 1
3 1
2 0
Output
4
2
----------------------------------------------------------------------------------------------------
