Codeforces Round 211 (Div. 2)


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

Examples
Input
2
Output
O-|OO-OO
Input
13
Output
O-|OOO-O
O-|O-OOO
Input
720
Output
O-|-OOOO
O-|OO-OO
-O|OO-OO
----------------------------------------------------------------------------------------------------
B. Fence
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
7 3
1 2 6 1 1 7 1
Output
3
----------------------------------------------------------------------------------------------------
C. Fixing Typos
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
helloo
Output
hello
Input
woooooow
Output
woow
----------------------------------------------------------------------------------------------------
D. Renting Bikes
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 2 10
5 5
7 6
Output
2 3
Input
4 5 2
8 1 1 2
6 3 7 5 2
Output
3 8
----------------------------------------------------------------------------------------------------
E. Two Circles
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 2 0
1 2
2 4
Output
6 2
Input
5 6 1
4 2 1 3 2 6
2 3 2 4 7 2
5 2 2 1 1 3
1 4 3 3 6 4
5 1 4 2 3 2
Output
34 3
Input
3 3 1
1 2 3
4 5 6
7 8 9
Output
0 0
----------------------------------------------------------------------------------------------------
