Codeforces Round 124 (Div. 2)


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

Examples
Input
5 5 2
Output
First
Input
6 7 4
Output
Second
----------------------------------------------------------------------------------------------------
B. Limit
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 1
1 1 1
2 5
Output
Infinity
Input
1 0
-1 3
2
Output
-Infinity
Input
0 1
1
1 0
Output
0/1
Input
2 2
2 1 6
4 5 -7
Output
1/2
Input
1 1
9 0
-5 2
Output
-9/5
----------------------------------------------------------------------------------------------------
C. Lexicographically Maximum Subsequence
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
ababba
Output
bbba
Input
abbcbccacbbcbaaba
Output
cccccbba
----------------------------------------------------------------------------------------------------
D. Infinite Maze
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 4
##.#
##S#
#..#
#.##
#..#
Output
Yes
Input
5 4
##.#
##S#
#..#
..#.
#.##
Output
No
----------------------------------------------------------------------------------------------------
E. Paint Tree
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

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