Codeforces Round 352 (Div. 2)


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

Examples
Input
3
Output
3
Input
11
Output
0
----------------------------------------------------------------------------------------------------
B. Different is Good
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
aa
Output
1
Input
4
koko
Output
2
Input
5
murat
Output
0
----------------------------------------------------------------------------------------------------
C. Recycling Bottles
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 1 1 2 0 0
3
1 1
2 1
2 3
Output
11.084259940083
Input
5 0 4 2 2 0
5
5 2
3 0
5 5
3 5
3 3
Output
33.121375178000
----------------------------------------------------------------------------------------------------
D. Robin Hood
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 1
1 1 4 2
Output
2
Input
3 1
2 2 2
Output
0
----------------------------------------------------------------------------------------------------
E. Ultimate Weirdness of an Array
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
2 6 3
Output
6
----------------------------------------------------------------------------------------------------
