Codeforces Round 196 (Div. 2)


A. Puzzles
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 6
10 12 10 7 5 22
Output
5
----------------------------------------------------------------------------------------------------
B. Routine Problem
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 1 3 2
Output
1/3
Input
4 3 2 2
Output
1/4
----------------------------------------------------------------------------------------------------
C. Quiz
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 3 2
Output
3
Input
5 4 2
Output
6
----------------------------------------------------------------------------------------------------
D. Book of Evil
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

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

Examples
Input
2
6 10
Output
7
Input
4
6 72 8 4
Output
12
Input
1
7
Output
1
----------------------------------------------------------------------------------------------------
