Codeforces Round 269 (Div. 2)


A. MUH and Sticks
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 2 5 4 4 4
Output
Bear
Input
4 4 5 4 4 5
Output
Elephant
Input
1 2 3 4 5 6
Output
Alien
----------------------------------------------------------------------------------------------------
B. MUH and Important Things
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 3 3 1
Output
YES
1 4 2 3 
4 1 2 3 
4 1 3 2 
Input
5
2 4 1 4 8
Output
NO
----------------------------------------------------------------------------------------------------
C. MUH and House of Cards
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
13
Output
1
Input
6
Output
0
----------------------------------------------------------------------------------------------------
D. MUH and Cube Walls
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
13 5
2 4 5 5 4 3 2 2 2 3 3 2 1
3 4 4 3 2
Output
2
----------------------------------------------------------------------------------------------------
E. MUH and Lots and Lots of Segments
time limit per test: 2 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
2
0 0 0 1
1 0 1 1
Output
1
Input
4
0 0 1 0
0 0 0 1
1 -1 1 2
0 1 1 1
Output
5
----------------------------------------------------------------------------------------------------
