Codeforces Beta Round 76 (Div. 1 Only)


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

Examples
Input
11 4 3 9
Output
3
Input
20 5 2 20
Output
2
----------------------------------------------------------------------------------------------------
B. End of Exams
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 500 3
Output
YES
1 333.333333
2 333.333333
2 166.666667 1 166.666667
Input
4 100 5
Output
YES
3 20.000000 4 60.000000
1 80.000000
4 40.000000 2 40.000000
3 80.000000
2 60.000000 1 20.000000
Input
4 100 7
Output
NO
Input
5 500 2
Output
YES
4 250.000000 5 500.000000 2 500.000000
3 500.000000 1 500.000000 4 250.000000
----------------------------------------------------------------------------------------------------
C. Azembler
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
41
Output
2
lea ebx, [eax + 4*eax]
lea ecx, [eax + 8*ebx]
Input
2
Output
1
lea ebx, [eax + eax]
Input
4
Output
1
lea ebx, [4*eax]
----------------------------------------------------------------------------------------------------
D. Flags
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 4
Output
23
Input
5 6
Output
64
----------------------------------------------------------------------------------------------------
E. Lostborn
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
20 3
2 3 5
Output
6
Input
50 2
15 8
Output
41
----------------------------------------------------------------------------------------------------
