#include <iostream>
using namespace std;
#define MIN(a, b) a < b ? a : b
int main() {
short int n;
int min_time = 0;
bool fastest = false; // false: Hamilton, true: Verstappen
int hamilton = 0, verstappen = 0;
cin >> n;
int round;
for (short int i = 0; i < n; i++) {
cin >> round;
hamilton += round;
min_time = MIN(min_time, round);
}
for (short int i = 0; i < n; i++) {
cin >> round;
verstappen += round;
if (round < min_time) fastest = true;
}
cout << (verstappen < hamilton ? "Verstappen" : "Hamilton") << endl;
cout << (fastest ? "Verstappen" : "Hamilton");
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 1ms | 512 KiB | ||||
2 | Accepted | 1ms | 320 KiB | ||||
subtask2 | 0/10 | ||||||
3 | Accepted | 1ms | 320 KiB | ||||
4 | Wrong answer | 1ms | 320 KiB | ||||
5 | Accepted | 1ms | 320 KiB | ||||
6 | Wrong answer | 1ms | 320 KiB | ||||
subtask3 | 0/15 | ||||||
7 | Wrong answer | 1ms | 320 KiB | ||||
8 | Accepted | 1ms | 512 KiB | ||||
9 | Wrong answer | 1ms | 320 KiB | ||||
10 | Accepted | 1ms | 320 KiB | ||||
11 | Wrong answer | 1ms | 388 KiB | ||||
subtask4 | 0/20 | ||||||
12 | Wrong answer | 2ms | 320 KiB | ||||
13 | Accepted | 1ms | 512 KiB | ||||
14 | Accepted | 2ms | 388 KiB | ||||
15 | Accepted | 1ms | 384 KiB | ||||
16 | Wrong answer | 1ms | 320 KiB | ||||
17 | Wrong answer | 1ms | 320 KiB | ||||
18 | Wrong answer | 1ms | 320 KiB | ||||
19 | Wrong answer | 1ms | 320 KiB | ||||
subtask5 | 0/55 | ||||||
20 | Accepted | 1ms | 320 KiB | ||||
21 | Wrong answer | 1ms | 320 KiB | ||||
22 | Accepted | 2ms | 320 KiB | ||||
23 | Wrong answer | 1ms | 320 KiB | ||||
24 | Accepted | 1ms | 336 KiB | ||||
25 | Wrong answer | 1ms | 512 KiB | ||||
26 | Accepted | 1ms | 320 KiB | ||||
27 | Accepted | 1ms | 572 KiB | ||||
28 | Wrong answer | 1ms | 320 KiB |