Ecnerwala vs Errichto Kotlin Match


A. Elections
time limit per test: 2.0 s
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
5
0 0 0
10 75 15
13 13 17
1000 0 0
0 1000000000 0
Output
1 1 1
66 0 61
5 5 0
0 1001 1001
1000000001 0 1000000001
----------------------------------------------------------------------------------------------------
B. Make it Divisible by 25
time limit per test: 2.0 s
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
5
100
71345
3259
50555
2050047
Output
0
3
1
3
2
----------------------------------------------------------------------------------------------------
C. Save More Mice
time limit per test: 4 seconds
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
3
10 6
8 7 5 4 9 4
2 8
1 1 1 1 1 1 1 1
12 11
1 2 3 4 5 6 7 8 9 10 11
Output
3
1
4
----------------------------------------------------------------------------------------------------
D. Gardener and Tree
time limit per test: 5.0 s
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
6
14 1
1 2
2 3
2 4
4 5
4 6
2 7
7 8
8 9
8 10
3 11
3 12
1 13
13 14
2 200000
1 2
3 2
1 2
2 3
5 1
5 1
3 2
2 1
5 4
6 2
5 1
2 5
5 6
4 2
3 4
7 1
4 3
5 1
1 3
6 1
1 7
2 1
Output
7
0
0
3
1
2
----------------------------------------------------------------------------------------------------
E. Sleeping Schedule
time limit per test: 2 seconds
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
7 24 21 23
16 17 14 20 20 11 22
Output
3
----------------------------------------------------------------------------------------------------
F. Half of Same
time limit per test: 2 seconds
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
4
6
48 13 22 -15 16 35
8
-1 0 1 -1 0 1 -1 0
4
100 -1000 -1000 -1000
4
1 1 1 1
Output
13
2
-1
-1
----------------------------------------------------------------------------------------------------
