Codeforces Round 231 (Div. 2)


A. Counting Sticks
time limit per test: 0.5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
||+|=|||||
Output
|||+|=||||
Input
|||||+||=||
Output
Impossible
Input
|+|=||||||
Output
Impossible
Input
||||+||=||||||
Output
||||+||=||||||
----------------------------------------------------------------------------------------------------
B. Very Beautiful Number
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6 5
Output
142857
Input
1 2
Output
Impossible
Input
6 4
Output
102564
----------------------------------------------------------------------------------------------------
C. Dominoes
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 3
01 11 00
00 01 11
Output
11 11 10
00 00 01
Input
4 1
11
10
01
00
Output
11
10
01
00
----------------------------------------------------------------------------------------------------
D. Physical Education and Buns
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
-3 -4 -2 -3 3
Output
2
-3 1
Input
5
2 -3 -1 -4 3
Output
1
-4 2
----------------------------------------------------------------------------------------------------
E. Lightbulb for Minister
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
3 2
3 4
5 4
5 2
4
3 3
4 4
5 3
4 2
Output
8.00000000
----------------------------------------------------------------------------------------------------
