Codeforces Round 201 (Div. 1)


A. Alice and Bob
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
2 3
Output
Alice
Input
2
5 3
Output
Alice
Input
3
5 6 7
Output
Bob
----------------------------------------------------------------------------------------------------
B. Lucky Common Subsequence
time limit per test: 3 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
AJKEQSLOBSROFGZ
OVGURWZLWVLUXTH
OZ
Output
ORZ
Input
AA
A
A
Output
0
----------------------------------------------------------------------------------------------------
C. Number Transformation II
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
3 4 5
30 17
Output
6
Input
3
5 6 7
1000 200
Output
206
----------------------------------------------------------------------------------------------------
D. Robot Control
time limit per test: 6 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 6
1 2
2 1
1 3
3 1
2 4
3 4
1 4
Output
1
Input
4 5
1 2
2 1
1 3
2 4
3 4
1 4
Output
1
----------------------------------------------------------------------------------------------------
E. Doodle Jump
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
7 4 12 2
7 1 9 4
7 4 12 3
Output
NO
NO
YES
----------------------------------------------------------------------------------------------------
