Codeforces Round 194 (Div. 1)


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

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

Examples
Input
3 1
2 2
Output
0
Input
3 0
Output
1
Input
4 3
3 1
3 2
3 3
Output
1
----------------------------------------------------------------------------------------------------
C. Lucky Tickets
time limit per test: 6 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
0 3
Output
00000000
00000001
00000002
Input
7 4
Output
00000007
00000016
00000017
00000018
----------------------------------------------------------------------------------------------------
D. Characteristics of Rectangles
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 2
1 2
3 4
Output
1
Input
3 3
1 0 0
0 1 1
1 0 0
Output
0
----------------------------------------------------------------------------------------------------
E. Summer Earnings
time limit per test: 9 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
0 1
1 0
1 1
Output
0.50000000000000000000
Input
7
2 -3
-2 -3
3 0
-3 -1
1 -2
2 -2
-1 0
Output
1.58113883008418980000
----------------------------------------------------------------------------------------------------
