#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <climits>
using namespace std;
int main()
{
int size;
cin >> size;
long int hB = LONG_MAX;
long int hS = 0;
long int vB = LONG_MAX;
long int vS = 0;
for (int i = 0; i < size; i++)
{
long int next;
cin >> next;
hB = min(hB, next);
hS += next;
}
for (int i = 0; i < size; i++)
{
long int next;
cin >> next;
vB = min(vB, next);
vS += next;
}
cout << (hS < vS ? "Hamilton" : "Verstappen") << "\n";
cout << (hB < vB ? "Hamilton" : "Verstappen") << "\n";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2064 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2312 KiB | ||||
4 | Accepted | 3ms | 2552 KiB | ||||
5 | Accepted | 2ms | 2636 KiB | ||||
6 | Accepted | 2ms | 2560 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 2ms | 2516 KiB | ||||
8 | Accepted | 2ms | 2520 KiB | ||||
9 | Accepted | 3ms | 2756 KiB | ||||
10 | Accepted | 3ms | 2752 KiB | ||||
11 | Accepted | 2ms | 2968 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 2888 KiB | ||||
13 | Accepted | 3ms | 3100 KiB | ||||
14 | Accepted | 3ms | 3396 KiB | ||||
15 | Accepted | 3ms | 3520 KiB | ||||
16 | Accepted | 2ms | 3600 KiB | ||||
17 | Accepted | 3ms | 3852 KiB | ||||
18 | Accepted | 2ms | 3956 KiB | ||||
19 | Accepted | 2ms | 4216 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 2ms | 4272 KiB | ||||
21 | Accepted | 2ms | 4384 KiB | ||||
22 | Accepted | 3ms | 4356 KiB | ||||
23 | Accepted | 3ms | 4364 KiB | ||||
24 | Accepted | 3ms | 4372 KiB | ||||
25 | Accepted | 3ms | 4488 KiB | ||||
26 | Accepted | 3ms | 4488 KiB | ||||
27 | Accepted | 3ms | 4376 KiB | ||||
28 | Accepted | 3ms | 4336 KiB |