Codeforces Round 129 (Div. 2)


A. Little Elephant and Rozdil
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
7 4
Output
2
Input
7
7 4 47 100 4 9 12
Output
Still Rozdil
----------------------------------------------------------------------------------------------------
B. Little Elephant and Sorting
time limit per test: 0.5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 2 3
Output
0
Input
3
3 2 1
Output
2
Input
4
7 4 1 47
Output
6
----------------------------------------------------------------------------------------------------
C. Little Elephant and Interval
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 47
Output
12
Input
47 1024
Output
98
----------------------------------------------------------------------------------------------------
D. Little Elephant and Cards
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
4 7
4 7
7 4
Output
0
Input
5
4 7
7 4
2 11
9 7
1 1
Output
2
----------------------------------------------------------------------------------------------------
E. Little Elephant and Furik and Rubik
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
AB
BA
Output
0.400000000
Input
3
AAB
CAA
Output
0.642857143
----------------------------------------------------------------------------------------------------
