Helvetic Coding Contest 2019 online mirror (teams allowed, unrated)


A1. Heidi Learns Hashing (Easy)
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
19
Output
1 8
Input
16
Output
NO
----------------------------------------------------------------------------------------------------
A2. Heidi Learns Hashing (Medium)
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1010
Output
3
----------------------------------------------------------------------------------------------------
A3. Heidi Learns Hashing (Hard)
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 5
bgcbaaaaaa
cccaaaaaaa
Output
5 2
Input
10 100
melodypond
riversongg
Output
118219 79724
----------------------------------------------------------------------------------------------------
B1. The Doctor Meets Vader (Easy)
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 4
1 3 5 2 4
0 1
4 2
2 8
9 4
Output
1 9 11 9 11
----------------------------------------------------------------------------------------------------
B2. The Doctor Meets Vader (Medium)
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6 7
1 2
2 3
3 4
4 6
6 5
4 4
3 6
4 2 7 3
1 10 2
3 8 2
5 1 0
6 5 4
3 7
5 2
Output
12
----------------------------------------------------------------------------------------------------
B3. The Doctor Meets Vader (Hard)
time limit per test: 4 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
6 7
1 2
2 3
3 4
4 6
6 5
4 4
3 6
4 2 2
1 10 2 5
3 8 2 7
5 1 0 2
6 5 4 1
3 7 6
5 2 3
4 2
3 2
Output
2
----------------------------------------------------------------------------------------------------
C1. Heidi and the Turing Test (Easy)
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
0 0
0 1
0 2
1 0
1 1
1 2
2 0
2 1
2 2
Output
1 1
Input
2
0 0
0 1
0 2
0 3
1 0
1 2
2 0
2 1
2 2
Output
0 3
----------------------------------------------------------------------------------------------------
C2. Heidi and the Turing Test (Medium)
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 1
1 1
1 -1
-1 1
-1 -1
2 0
Output
3
Input
5 2
1 1
1 -1
-1 1
-1 -1
2 0
Output
5
----------------------------------------------------------------------------------------------------
C3. Heidi and the Turing Test (Hard)
time limit per test: 15 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

No test samples are available for this problem
----------------------------------------------------------------------------------------------------
D1. Parallel Universes (Easy)
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 2 10 4
0 1
1 1
0 4
1 2
Output
4 1
5 2
4 2
5 3
----------------------------------------------------------------------------------------------------
D2. Parallel Universes (Hard)
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 1 2
Output
2
Input
2 2 10
Output
2
Input
3 2 3
Output
2
Input
3 2 5
Output
941659828
Input
10 4 20
Output
196683114
----------------------------------------------------------------------------------------------------
E1. Daleks' Invasion (easy)
time limit per test: 6 seconds
memory limit per test: 128 megabytes
input: standard input
output: standard output

Examples
Input
3 3
1 2 8
2 3 3
3 1 4
Output
4
----------------------------------------------------------------------------------------------------
E2. Daleks' Invasion (medium)
time limit per test: 15 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3
1 2 8
2 3 3
3 1 4
Output
4
----------------------------------------------------------------------------------------------------
E3. Daleks' Invasion (hard)
time limit per test: 10 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3
1 2 8
2 3 3
3 1 4
Output
4
8
8
----------------------------------------------------------------------------------------------------
