Codeforces Round 182 (Div. 1)


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

Examples
Input
2
50 50 50
Output
150
Input
2
-1 -100 -1
Output
100
----------------------------------------------------------------------------------------------------
B. Yaroslav and Time
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 1000
1000
0 0
0 1
0 3
Output
2000
Input
3 1000
1000
1 0
1 1
1 2
Output
1000
----------------------------------------------------------------------------------------------------
C. Yaroslav and Algorithm
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
10
79
Output
10<>11
79<>80
----------------------------------------------------------------------------------------------------
D. Yaroslav and Divisors
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 1
1
1 1
Output
1
Input
10 9
1 2 3 4 5 6 7 8 9 10
1 10
2 9
3 8
4 7
5 6
2 2
9 10
5 10
4 10
Output
27
14
8
4
2
1
2
7
9
----------------------------------------------------------------------------------------------------
E. Yaroslav and Arrangements
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

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