Codeforces Round 173 (Div. 2)


A. Bit++
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
++X
Output
1
Input
2
X++
--X
Output
0
----------------------------------------------------------------------------------------------------
B. Painting Eggs
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 999
999 1
Output
AG
Input
3
400 600
400 600
400 600
Output
AGA
----------------------------------------------------------------------------------------------------
C. XOR and OR
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
11
10
Output
YES
Input
1
01
Output
NO
Input
000
101
Output
NO
----------------------------------------------------------------------------------------------------
D. Yet Another Number Game
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 1
Output
BitLGM
Input
2
1 2
Output
BitAryo
Input
3
1 2 1
Output
BitLGM
----------------------------------------------------------------------------------------------------
E. Sausage Maximization
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 2
Output
3
Input
3
1 2 3
Output
3
Input
2
1000 1000
Output
1000
----------------------------------------------------------------------------------------------------
