Codeforces Round 120 (Div. 2)


A. Vasya and the Bus
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 2
Output
2 2
Input
0 5
Output
Impossible
Input
2 2
Output
2 3
----------------------------------------------------------------------------------------------------
B. Surrounded
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
0 0 1
6 0 3
Output
1.000000000000000
Input
-10 10 3
10 -10 3
Output
11.142135623730951
----------------------------------------------------------------------------------------------------
C. STL
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
pair pair int int int
Output
pair<pair<int,int>,int>
Input
1
pair int
Output
Error occurred
----------------------------------------------------------------------------------------------------
D. Non-Secret Cypher
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

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

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