Codeforces Beta Round 70 (Div. 2)


A. Haiku
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
on  codeforces 
beta round is running
   a rustling of keys 
Output
YES
Input
how many gallons
of edo s rain did you drink
                                cuckoo
Output
NO
----------------------------------------------------------------------------------------------------
B. Easter Eggs
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
8
Output
ROYGRBIV
Input
13
Output
ROYGBIVGBIVYG
----------------------------------------------------------------------------------------------------
C. Beaver Game
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 15 4
Output
Timur
Input
4 9 5
Output
Marsel
----------------------------------------------------------------------------------------------------
D. Archer's Shot
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
Output
7
Input
4
Output
13
Input
5
Output
19
----------------------------------------------------------------------------------------------------
E. Evacuation
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3
1YZ
1YY
100
0YZ
0YY
003
Output
2
Input
4 4
Y110
1Y1Z
1Y0Y
0100
Y001
0Y0Z
0Y0Y
0005
Output
3
----------------------------------------------------------------------------------------------------
