Testing Round 6


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

Examples
Input
12 3
Output
4 4 4 
Input
15 4
Output
3 4 4 4 
Input
18 7
Output
2 2 2 3 3 3 3 
----------------------------------------------------------------------------------------------------
B. Optimizer
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 4
3 3
3 1
4 1
9 2
Output
2
2 3 
Input
1 1
1 1
Output
0
----------------------------------------------------------------------------------------------------
C. White, Black and White Again
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 2 1
Output
2
Input
4 2 2
Output
4
Input
3 2 2
Output
4
----------------------------------------------------------------------------------------------------
D. Polygon
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
8
Output
1.000 0.000
7.000 0.000
9.000 2.000
9.000 3.000
5.000 7.000
3.000 7.000
0.000 4.000
0.000 1.000
----------------------------------------------------------------------------------------------------
