#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int n, i;
cin >> n;
vector<int> hamilton(n);
vector<int> verstappen(n);
for (i = 0; i < n; i++) {
cin >> hamilton[i];
}
for (i = 0; i < n; i++) {
cin >> verstappen[i];
}
int ham = 0, ver = 0;
for (i = 0; i < n; i++) {
ham += hamilton[i];
ver += verstappen[i];
}
sort(hamilton.begin(), hamilton.end());
sort(verstappen.begin(), verstappen.end());
if (ham < ver) {
cout << "Hamilton" << endl;
}
else {
cout << "Verstappen" << endl;
}
if (hamilton[0] < verstappen[0]) {
cout << "Hamilton";
}
else {
cout << "Verstappen";
}
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1812 KiB | ||||
2 | Accepted | 3ms | 2004 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 2ms | 2244 KiB | ||||
4 | Accepted | 2ms | 2300 KiB | ||||
5 | Accepted | 3ms | 2544 KiB | ||||
6 | Accepted | 2ms | 2656 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 2884 KiB | ||||
8 | Accepted | 3ms | 3096 KiB | ||||
9 | Accepted | 3ms | 3304 KiB | ||||
10 | Accepted | 3ms | 3416 KiB | ||||
11 | Accepted | 3ms | 3628 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 2ms | 3604 KiB | ||||
13 | Accepted | 3ms | 3836 KiB | ||||
14 | Accepted | 2ms | 3808 KiB | ||||
15 | Accepted | 2ms | 3816 KiB | ||||
16 | Accepted | 2ms | 3808 KiB | ||||
17 | Accepted | 2ms | 3936 KiB | ||||
18 | Accepted | 3ms | 4052 KiB | ||||
19 | Accepted | 2ms | 4140 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 2ms | 4148 KiB | ||||
21 | Accepted | 3ms | 3992 KiB | ||||
22 | Accepted | 3ms | 3996 KiB | ||||
23 | Accepted | 3ms | 4024 KiB | ||||
24 | Accepted | 2ms | 4100 KiB | ||||
25 | Accepted | 2ms | 4220 KiB | ||||
26 | Accepted | 3ms | 4240 KiB | ||||
27 | Accepted | 3ms | 4228 KiB | ||||
28 | Accepted | 3ms | 4348 KiB |