Codeforces Round 195 (Div. 2)


A. Vasily the Bear and Triangle
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 5
Output
0 15 15 0
Input
-10 5
Output
-15 0 0 15
----------------------------------------------------------------------------------------------------
B. Vasily the Bear and Fly
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 1
Output
2.0000000000
Input
2 2
Output
5.4142135624
----------------------------------------------------------------------------------------------------
C. Vasily the Bear and Sequence
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
1 2 3 4 5
Output
2
4 5
Input
3
1 2 4
Output
1
4
----------------------------------------------------------------------------------------------------
D. Vasily the Bear and Beautiful Strings
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 1 0
Output
2
Input
2 2 0
Output
4
Input
1 1 1
Output
0
----------------------------------------------------------------------------------------------------
E. Vasily the Bear and Painting Square
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
0 0
Output
1
Input
0 1
Output
8
Input
0 2
Output
32
Input
1 1
Output
32
----------------------------------------------------------------------------------------------------
