Croc Champ 2013 - Finals (online version, Div. 1)


A. Morning run
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 5 1
0 2
Output
0.2500000000
Input
3 7 3
0 1 6
Output
1.5000000000
----------------------------------------------------------------------------------------------------
B. Context Advertising
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
9 4 12
this is a sample text for croc final round
Output
this is a
sample text
for croc
final round
Input
9 1 9
this is a sample text for croc final round
Output
this is a
Input
6 2 3
croc a a a croc a
Output
a a
a
Input
2 2 5
first second
Output
first
----------------------------------------------------------------------------------------------------
C. Memory for Arrays
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 3
8 4 3 2 2
3 2 2
Output
2
Input
10 6
1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0
Output
6
----------------------------------------------------------------------------------------------------
D. Tennis Rackets
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 0
Output
9
Input
4 0
Output
24
Input
10 1
Output
210
Input
8 4
Output
0
----------------------------------------------------------------------------------------------------
E. Sheep
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 3
5 7
2 4
Output
1 3 2
Input
5
1 5
2 4
3 6
1 7
2 6
Output
2 1 3 5 4
Input
4
1 3
4 6
5 7
2 3
Output
1 4 2 3
----------------------------------------------------------------------------------------------------
