Codeforces Round 573 (Div. 2)


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

Examples
Input
33
Output
0 A
Input
98
Output
1 B
----------------------------------------------------------------------------------------------------
B. Tokitsukaze and Mahjong
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1s 2s 3s
Output
0
Input
9m 9m 9m
Output
0
Input
3p 9m 2p
Output
1
----------------------------------------------------------------------------------------------------
C. Tokitsukaze and Discard Items
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 4 5
3 5 7 10
Output
3
Input
13 4 5
7 8 9 10
Output
1
----------------------------------------------------------------------------------------------------
D. Tokitsukaze, CSL and Stone Game
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
0
Output
cslnb
Input
2
1 0
Output
cslnb
Input
2
2 2
Output
sjfnb
Input
3
2 3 1
Output
sjfnb
----------------------------------------------------------------------------------------------------
E. Tokitsukaze and Duel
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 2
0101
Output
quailty
Input
6 1
010101
Output
once again
Input
6 5
010101
Output
tokitsukaze
Input
4 1
0011
Output
once again
----------------------------------------------------------------------------------------------------
F. Tokitsukaze and Strange Rectangle
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 1
1 2
1 3
Output
3
Input
3
1 1
2 1
3 1
Output
6
Input
4
2 1
2 2
3 1
3 2
Output
6
----------------------------------------------------------------------------------------------------
