Codeforces Round 432 (Div. 2, based on IndiaHacks Final Round 2017)


A. Arpa and a research in Mexican wave
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 5 3
Output
3
Input
10 5 7
Output
5
Input
10 5 12
Output
3
----------------------------------------------------------------------------------------------------
B. Arpa and an exam about geometry
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
0 1 1 1 1 0
Output
Yes
Input
1 1 0 0 1000 1000
Output
No
----------------------------------------------------------------------------------------------------
C. Five Dimensional Points
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6
0 0 0 0 0
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
Output
1
1
Input
3
0 0 1 2 0
0 0 9 2 0
0 0 5 9 0
Output
0
----------------------------------------------------------------------------------------------------
D. Arpa and a list of numbers
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 23 17
1 17 17 16
Output
40
Input
10 6 2
100 49 71 73 66 96 8 60 41 63
Output
10
----------------------------------------------------------------------------------------------------
E. Arpa and a game with Mojtaba
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 1 1 1
Output
Arpa
Input
4
1 1 17 17
Output
Mojtaba
Input
4
1 1 17 289
Output
Arpa
Input
5
1 2 3 4 5
Output
Arpa
----------------------------------------------------------------------------------------------------
