Educational Codeforces Round 88 (Rated for Div. 2)


A. Berland Poker
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
8 3 2
4 2 4
9 6 3
42 0 7
Output
3
0
1
0
----------------------------------------------------------------------------------------------------
B. New Theatre Square
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 1 10 1
.
1 2 10 1
..
2 1 10 1
.
.
3 3 3 7
..*
*..
.*.
Output
10
1
20
18
----------------------------------------------------------------------------------------------------
C. Mixing Water
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
30 10 20
41 15 30
18 13 18
Output
2
7
1
----------------------------------------------------------------------------------------------------
D. Yet Another Yet Another Task
time limit per test: 1.5 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
5
5 -2 10 -1 4
Output
6
Input
8
5 2 5 3 -30 -30 6 9
Output
10
Input
3
-10 6 -15
Output
0
----------------------------------------------------------------------------------------------------
E. Modular Stability
time limit per test: 2 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
7 3
Output
16
Input
3 7
Output
0
Input
1337 42
Output
95147305
Input
1 1
Output
1
Input
500000 1
Output
500000
----------------------------------------------------------------------------------------------------
F. RC Kaboom Show
time limit per test: 6 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
3 -1 -1 1 2
2 3 -3 -2 10
-4 2 1 -2 1
-2 -2 -1 2 4
Output
0.585902082262898
Input
2
-1 1 -1 1 200
1 1 1 5 200
Output
No show :(
----------------------------------------------------------------------------------------------------
