8VC Venture Cup 2016 - Elimination Round


A. Robot Sequence
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6
URLLDR
Output
2
Input
4
DLUU
Output
0
Input
7
RLRLRLR
Output
12
----------------------------------------------------------------------------------------------------
B. Cards
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
RB
Output
G
Input
3
GRG
Output
BR
Input
5
BBBBB
Output
B
----------------------------------------------------------------------------------------------------
C. Block Towers
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 3
Output
9
Input
3 2
Output
8
Input
5 0
Output
10
----------------------------------------------------------------------------------------------------
D. Jerry's Protest
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 2
Output
0.0000000000
Input
3
1 2 10
Output
0.0740740741
----------------------------------------------------------------------------------------------------
E. Simple Skewness
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 2 3 12
Output
3
1 2 12 
Input
4
1 1 2 2
Output
3
1 1 2 
Input
2
1 2
Output
2
1 2
----------------------------------------------------------------------------------------------------
F. Group Projects
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 2
2 4 5
Output
3
Input
4 3
7 8 9 10
Output
13
Input
4 0
5 10 20 21
Output
1
----------------------------------------------------------------------------------------------------
G. Raffles
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 1 3
4 5
1 2
1 1
1 2
2 1
Output
1.666666667
1.333333333
2.000000000
Input
3 20 5
6 8 10
6 6 6
1 1
1 2
1 3
2 3
2 3
Output
12.000000000
12.000000000
11.769230769
12.000000000
12.000000000
----------------------------------------------------------------------------------------------------
