#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;
}
Részfeladat | Összpont | Teszt | Verdikt | Idő | Memória | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Elfogadva | 1ms | 320 KiB | ||||
2 | Elfogadva | 1ms | 320 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Elfogadva | 1ms | 320 KiB | ||||
4 | Elfogadva | 1ms | 320 KiB | ||||
5 | Elfogadva | 1ms | 320 KiB | ||||
6 | Elfogadva | 1ms | 328 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Elfogadva | 1ms | 560 KiB | ||||
8 | Elfogadva | 1ms | 332 KiB | ||||
9 | Elfogadva | 1ms | 320 KiB | ||||
10 | Elfogadva | 1ms | 320 KiB | ||||
11 | Elfogadva | 1ms | 320 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Elfogadva | 1ms | 508 KiB | ||||
13 | Elfogadva | 1ms | 320 KiB | ||||
14 | Elfogadva | 1ms | 320 KiB | ||||
15 | Elfogadva | 1ms | 320 KiB | ||||
16 | Elfogadva | 1ms | 500 KiB | ||||
17 | Elfogadva | 1ms | 320 KiB | ||||
18 | Elfogadva | 2ms | 320 KiB | ||||
19 | Elfogadva | 2ms | 320 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Elfogadva | 1ms | 320 KiB | ||||
21 | Elfogadva | 1ms | 320 KiB | ||||
22 | Elfogadva | 1ms | 320 KiB | ||||
23 | Elfogadva | 1ms | 388 KiB | ||||
24 | Elfogadva | 1ms | 320 KiB | ||||
25 | Elfogadva | 1ms | 320 KiB | ||||
26 | Elfogadva | 1ms | 320 KiB | ||||
27 | Elfogadva | 1ms | 320 KiB | ||||
28 | Elfogadva | 1ms | 320 KiB |