#include <iostream>
#include <queue>
#include <algorithm>
#define ll long long
using namespace std;
ll atlham, atlver;
int main()
{
ll n;
cin >> n;
vector <ll> ham(n + 1), ver(n+1);
for (ll i = 1; i <= n; ++i)
{
cin >> ham[i];
atlham += ham[i];
}
for (ll i = 1; i <= n; ++i)
{
cin >> ver[i];
atlver += ver[i];
}
sort(ham.begin(), ham.end());
sort(ver.begin(), ver.end());
if (atlver < atlham)
cout << "Verstappen\n";
else
cout << "Hamilton\n";
if(ver[0] < ham[0])
cout << "Verstappen";
else
cout << "Hamilton";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1812 KiB | ||||
2 | Accepted | 3ms | 2004 KiB | ||||
subtask2 | 0/10 | ||||||
3 | Accepted | 3ms | 2244 KiB | ||||
4 | Wrong answer | 3ms | 2492 KiB | ||||
5 | Accepted | 3ms | 2804 KiB | ||||
6 | Wrong answer | 3ms | 3048 KiB | ||||
subtask3 | 0/15 | ||||||
7 | Wrong answer | 2ms | 3012 KiB | ||||
8 | Accepted | 3ms | 3064 KiB | ||||
9 | Wrong answer | 3ms | 3312 KiB | ||||
10 | Accepted | 3ms | 3316 KiB | ||||
11 | Wrong answer | 3ms | 3404 KiB | ||||
subtask4 | 0/20 | ||||||
12 | Wrong answer | 3ms | 3500 KiB | ||||
13 | Accepted | 2ms | 3584 KiB | ||||
14 | Accepted | 3ms | 3824 KiB | ||||
15 | Accepted | 3ms | 3916 KiB | ||||
16 | Wrong answer | 3ms | 4024 KiB | ||||
17 | Wrong answer | 3ms | 4024 KiB | ||||
18 | Wrong answer | 3ms | 3916 KiB | ||||
19 | Wrong answer | 3ms | 4044 KiB | ||||
subtask5 | 0/55 | ||||||
20 | Accepted | 3ms | 4008 KiB | ||||
21 | Wrong answer | 3ms | 4132 KiB | ||||
22 | Accepted | 3ms | 4256 KiB | ||||
23 | Wrong answer | 3ms | 4344 KiB | ||||
24 | Accepted | 3ms | 4336 KiB | ||||
25 | Wrong answer | 3ms | 4448 KiB | ||||
26 | Accepted | 3ms | 4340 KiB | ||||
27 | Accepted | 3ms | 4224 KiB | ||||
28 | Wrong answer | 3ms | 4220 KiB |