#include <bits/stdc++.h>
int main() {
int n = 0;
std::cin >> n;
int ham_sum = 0;
int ver_sum = 0;
int ham_min = INT_MAX;
int ver_min = INT_MAX;
for (int i = 0; i < n; i++) {
int x;
std::cin >> x;
ham_sum += x;
ham_min = x < ham_min ? x : ham_min;
}
for (int i = 0; i < n; i++) {
int x;
std::cin >> x;
ver_sum += x;
ver_min = x < ver_min ? x : ver_min;
}
if (ham_sum < ver_sum) std::cout << "Hamilton\n";
else std::cout << "Verstappen\n";
if (ham_min < ver_min) std::cout << "Hamilton\n";
else std::cout << "Verstappen\n";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2116 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2316 KiB | ||||
4 | Accepted | 2ms | 2396 KiB | ||||
5 | Accepted | 3ms | 2520 KiB | ||||
6 | Accepted | 3ms | 2772 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 2988 KiB | ||||
8 | Accepted | 3ms | 3164 KiB | ||||
9 | Accepted | 3ms | 3400 KiB | ||||
10 | Accepted | 3ms | 3616 KiB | ||||
11 | Accepted | 3ms | 3700 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3948 KiB | ||||
13 | Accepted | 3ms | 3908 KiB | ||||
14 | Accepted | 3ms | 3980 KiB | ||||
15 | Accepted | 3ms | 3960 KiB | ||||
16 | Accepted | 3ms | 3956 KiB | ||||
17 | Accepted | 3ms | 3968 KiB | ||||
18 | Accepted | 3ms | 3972 KiB | ||||
19 | Accepted | 3ms | 3848 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 3976 KiB | ||||
21 | Accepted | 3ms | 4220 KiB | ||||
22 | Accepted | 3ms | 4304 KiB | ||||
23 | Accepted | 3ms | 4428 KiB | ||||
24 | Accepted | 3ms | 4512 KiB | ||||
25 | Accepted | 3ms | 4608 KiB | ||||
26 | Accepted | 3ms | 4604 KiB | ||||
27 | Accepted | 3ms | 4604 KiB | ||||
28 | Accepted | 3ms | 4732 KiB |