Codeforces Round 534 (Div. 2)


A. Splitting into digits
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
Output
1
1 
Input
4
Output
2
2 2
Input
27
Output
3
9 9 9
----------------------------------------------------------------------------------------------------
B. Game with string
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
abacaba
Output
No
Input
iiq
Output
Yes
Input
abba
Output
No
----------------------------------------------------------------------------------------------------
C. Grid game
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
010
Output
1 1
1 2
1 4
----------------------------------------------------------------------------------------------------
D. Game with modulo
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
start
x
x
start
x
x
y
start
x
x
y
y
end
Output
? 0 0
? 10 1
! 1
? 0 0
? 3 4
? 2 5
! 2
? 2 4
? 2 5
? 3 10
? 9 1
! 3
----------------------------------------------------------------------------------------------------
E. Johnny Solving
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 6 2
1 2
1 3
1 4
2 3
2 4
3 4
Output
PATH
4
1 2 3 4 
Input
10 18 2
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
2 3
3 4
2 4
5 6
6 7
5 7
8 9
9 10
8 10
Output
CYCLES
4
4 1 2 3 
4
7 1 5 6 
----------------------------------------------------------------------------------------------------
