Codeforces Beta Round 47


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

Examples
Input
2 4
Output
4
Input
3 3
Output
4
----------------------------------------------------------------------------------------------------
B. Choosing Symbol Pairs
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
great10
Output
7
Input
aaaaaaaaaa
Output
100
----------------------------------------------------------------------------------------------------
C. Happy Farm 5
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 1
5 1
5 3
1 3
Output
16
----------------------------------------------------------------------------------------------------
D. Bombing
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
1 500
5 5
1 2
Output
3.84257761518762740
Input
5
3 100
0 0
3 4
60 70
100 100
10 10
5 12
Output
13.45126176453737600
----------------------------------------------------------------------------------------------------
E. Square Equation Roots
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3
Output
12
Input
1 2
Output
1
----------------------------------------------------------------------------------------------------
