Codeforces Round 100


A. New Year Table
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 10 4
Output
YES
Input
5 10 4
Output
NO
Input
1 10 10
Output
YES
----------------------------------------------------------------------------------------------------
B. New Year Cards
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 2 3 4
4 1 3 2
4 3 1 2
3 4 2 1
3 1 2 4
Output
2 1 1 4
----------------------------------------------------------------------------------------------------
C. New Year Snowmen
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
7
1 2 3 4 5 6 7
Output
2
3 2 1
6 5 4
Input
3
2 2 3
Output
0
----------------------------------------------------------------------------------------------------
D. New Year Contest
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
30 330 720
Output
2 10
----------------------------------------------------------------------------------------------------
E. New Year Garland
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 2 1000
3 1 2
Output
8
Input
2 3 1000
2 2
Output
24
Input
1 1 1000
5
Output
0
----------------------------------------------------------------------------------------------------
F. New Year Snowflake
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 0
0 0
0 1
1 0
1 1
Output
1
0.5 0.5
Input
4 2
0 0
0 1
1 0
1 1
Output
5
0.0 0.5
0.5 0.0
0.5 0.5
0.5 1.0
1.0 0.5
Input
4 4
0 0
0 1
1 0
1 1
Output
-1
----------------------------------------------------------------------------------------------------
