#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 | 2360 KiB | ||||
4 | Accepted | 3ms | 2608 KiB | ||||
5 | Accepted | 3ms | 2628 KiB | ||||
6 | Accepted | 3ms | 2604 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 2ms | 2672 KiB | ||||
8 | Accepted | 2ms | 2672 KiB | ||||
9 | Accepted | 3ms | 2920 KiB | ||||
10 | Accepted | 3ms | 3132 KiB | ||||
11 | Accepted | 3ms | 3228 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3440 KiB | ||||
13 | Accepted | 2ms | 3520 KiB | ||||
14 | Accepted | 2ms | 3648 KiB | ||||
15 | Accepted | 3ms | 3768 KiB | ||||
16 | Accepted | 3ms | 3896 KiB | ||||
17 | Accepted | 2ms | 3984 KiB | ||||
18 | Accepted | 2ms | 3948 KiB | ||||
19 | Accepted | 3ms | 4192 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 4212 KiB | ||||
21 | Accepted | 2ms | 4212 KiB | ||||
22 | Accepted | 3ms | 4212 KiB | ||||
23 | Accepted | 3ms | 4340 KiB | ||||
24 | Accepted | 3ms | 4212 KiB | ||||
25 | Accepted | 3ms | 4280 KiB | ||||
26 | Accepted | 3ms | 4172 KiB | ||||
27 | Accepted | 3ms | 4172 KiB | ||||
28 | Accepted | 2ms | 4172 KiB |