#include <iostream>
#include <climits>
using namespace std;
#define MIN(a, b) a < b ? a : b
int main() {
short unsigned int n;
unsigned int min_time = UINT_MAX;
bool fastest = false; // false: Hamilton, true: Verstappen
unsigned 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 | 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 | 328 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 1ms | 560 KiB | ||||
8 | Accepted | 1ms | 332 KiB | ||||
9 | Accepted | 1ms | 320 KiB | ||||
10 | Accepted | 1ms | 320 KiB | ||||
11 | Accepted | 1ms | 320 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 1ms | 508 KiB | ||||
13 | Accepted | 1ms | 320 KiB | ||||
14 | Accepted | 1ms | 320 KiB | ||||
15 | Accepted | 1ms | 320 KiB | ||||
16 | Accepted | 1ms | 500 KiB | ||||
17 | Accepted | 1ms | 320 KiB | ||||
18 | Accepted | 2ms | 320 KiB | ||||
19 | Accepted | 2ms | 320 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 1ms | 320 KiB | ||||
21 | Accepted | 1ms | 320 KiB | ||||
22 | Accepted | 1ms | 320 KiB | ||||
23 | Accepted | 1ms | 388 KiB | ||||
24 | Accepted | 1ms | 320 KiB | ||||
25 | Accepted | 1ms | 320 KiB | ||||
26 | Accepted | 1ms | 320 KiB | ||||
27 | Accepted | 1ms | 320 KiB | ||||
28 | Accepted | 1ms | 320 KiB |