#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> H(N);
vector<int> V(N);
int Hsum = 0;
int Vsum = 0;
int Hmin = INT_MAX;
int Vmin = INT_MAX;
for(int i = 0; i < N; i++){
cin >> H[i];
Hsum += H[i];
if(Hmin > H[i]){
Hmin = H[i];
}
}
for(int i = 0; i < N; i++){
cin >> V[i];
Vsum += V[i];
if(Vmin > V[i]){
Vmin = V[i];
}
}
if(Hsum < Vsum){
cout << "Hamilton\n";
} else{
cout << "Verstappen\n";
}
if(Hmin < Vmin){
cout << "Hamilton\n";
} else{
cout << "Verstappen\n";
}
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1684 KiB | ||||
2 | Accepted | 3ms | 1932 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2172 KiB | ||||
4 | Accepted | 2ms | 2168 KiB | ||||
5 | Accepted | 3ms | 2392 KiB | ||||
6 | Accepted | 2ms | 2476 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 2720 KiB | ||||
8 | Accepted | 3ms | 2932 KiB | ||||
9 | Accepted | 3ms | 2996 KiB | ||||
10 | Accepted | 2ms | 2880 KiB | ||||
11 | Accepted | 3ms | 3124 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3336 KiB | ||||
13 | Accepted | 3ms | 3576 KiB | ||||
14 | Accepted | 2ms | 3544 KiB | ||||
15 | Accepted | 3ms | 3660 KiB | ||||
16 | Accepted | 3ms | 3540 KiB | ||||
17 | Accepted | 3ms | 3396 KiB | ||||
18 | Accepted | 2ms | 3512 KiB | ||||
19 | Accepted | 2ms | 3516 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 3516 KiB | ||||
21 | Accepted | 3ms | 3748 KiB | ||||
22 | Accepted | 3ms | 3760 KiB | ||||
23 | Accepted | 3ms | 3756 KiB | ||||
24 | Accepted | 3ms | 4040 KiB | ||||
25 | Accepted | 3ms | 4080 KiB | ||||
26 | Accepted | 3ms | 4260 KiB | ||||
27 | Accepted | 3ms | 4508 KiB | ||||
28 | Accepted | 3ms | 4632 KiB |