Bubble Cup 9 - Finals [Online Mirror]


A. Festival Organization
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 1 2
Output
5
----------------------------------------------------------------------------------------------------
B. R3D3’s Summer Adventure
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 1 2
Output
12
----------------------------------------------------------------------------------------------------
C. Potions Homework
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1
3
Output
6
----------------------------------------------------------------------------------------------------
D. Dexterina’s Lab
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 2
0.500000 0.250000 0.250000
Output
0.62500000
----------------------------------------------------------------------------------------------------
E. Paint it really, really dark gray
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
1
1
-1
1
-1
2 5
4 3
2 4
4 1
Output
1 4 2 5 2 4 3 4 1 4 1
----------------------------------------------------------------------------------------------------
F. Heroes of Making Magic III
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
2 2 2
3
2 0 2
1 1 1 1
2 0 2
Output
0
1
----------------------------------------------------------------------------------------------------
G. Underfail
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6
abacba
2
aba 6
ba 3
3
Output
12
----------------------------------------------------------------------------------------------------
H. Pokermon League challenge
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 3
1 2
2 3
4 1
16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 15
16
2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18
16
2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 19
16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 19
Output
16 15 19 14 
2 2 2 1 1 1 2 1 1 2 1 1 1 2 2 1 1 1 1 
----------------------------------------------------------------------------------------------------
I. Cowboy Beblop at his computer
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
0 0 0
2 0 0
2 2 0
0 2 0
4
1 1 -1
1 1 1
1 3 1
1 3 -1
Output
YES
----------------------------------------------------------------------------------------------------
