#include <iostream>
using namespace std;
int main()
{
int n, i, min = 200000, ham = 0, ver = 0, br = 0, t;
cin >> n;
for (i = 0; i < n; i++)
{
cin >> t;
ham += t;
if (t < min) min = t;
}
for (i = 0; i < n; i++)
{
cin >> t;
ver += t;
if (t < min) min = t, br = 1;
}
if (ver < ham) cout << "Verstappen\n";
else cout << "Hamilton\n";
if (br == 1) cout << "Verstappen";
else cout << "Hamilton";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 1ms | 320 KiB | ||||
2 | Accepted | 1ms | 320 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 1ms | 320 KiB | ||||
4 | Accepted | 1ms | 320 KiB | ||||
5 | Accepted | 1ms | 320 KiB | ||||
6 | Accepted | 1ms | 320 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 1ms | 508 KiB | ||||
8 | Accepted | 1ms | 320 KiB | ||||
9 | Accepted | 1ms | 320 KiB | ||||
10 | Accepted | 1ms | 320 KiB | ||||
11 | Accepted | 1ms | 320 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 1ms | 500 KiB | ||||
13 | Accepted | 1ms | 512 KiB | ||||
14 | Accepted | 1ms | 320 KiB | ||||
15 | Accepted | 1ms | 320 KiB | ||||
16 | Accepted | 1ms | 508 KiB | ||||
17 | Accepted | 1ms | 548 KiB | ||||
18 | Accepted | 1ms | 320 KiB | ||||
19 | Accepted | 1ms | 320 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 1ms | 320 KiB | ||||
21 | Accepted | 1ms | 320 KiB | ||||
22 | Accepted | 1ms | 380 KiB | ||||
23 | Accepted | 1ms | 320 KiB | ||||
24 | Accepted | 1ms | 320 KiB | ||||
25 | Accepted | 1ms | 320 KiB | ||||
26 | Accepted | 1ms | 320 KiB | ||||
27 | Accepted | 1ms | 512 KiB | ||||
28 | Accepted | 1ms | 336 KiB |