Codeforces Beta Round 27 (Codeforces format, Div. 2)


A. Next Test
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 7 2
Output
3
----------------------------------------------------------------------------------------------------
B. Tournament
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
4 2
4 1
2 3
2 1
3 1
Output
4 3
----------------------------------------------------------------------------------------------------
C. Unordered Subsequence
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
67 499 600 42 23
Output
3
1 3 5
Input
3
1 2 3
Output
0
Input
3
2 3 1
Output
3
1 2 3
----------------------------------------------------------------------------------------------------
D. Ring Road 2
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 2
1 3
2 4
Output
io
Input
6 3
1 3
3 5
5 1
Output
ooo
----------------------------------------------------------------------------------------------------
E. Number With The Given Amount Of Divisors
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
Output
6
Input
6
Output
12
----------------------------------------------------------------------------------------------------
