Codeforces Round 133 (Div. 2)


A. Tiling with Hexagons
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 3 4
Output
18
----------------------------------------------------------------------------------------------------
B. Forming Teams
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

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

Examples
Input
4 3 2
Output
4
1 1 4 5
Input
3 3 1
Output
3
1 3 5
----------------------------------------------------------------------------------------------------
D. Spider's Web
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
7
3 1 6 7
4 3 5 2 9
2 8 1
4 3 7 6 4
3 2 5 9
3 6 3 8
3 4 2 9
Output
6
----------------------------------------------------------------------------------------------------
E. Martian Luck
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 5 6
3 2 0 5 6 1
Output
5
Input
7 6 4
3 5 0 4
Output
1
Input
257 0 3
0 0 256
Output
3
----------------------------------------------------------------------------------------------------
