38022023-03-03 08:30:25kohumarkFormula-1cpp17Accepted 100/1003ms4500 KiB
#include <iostream>
using namespace std;

int main(){
    cin.tie(0); ios_base::sync_with_stdio(false);
    int n; int h=0; int hm=1e9; int f=0; int fm=1e9; cin >> n;
    for(int i=0; i<n; i++){int x; cin >> x; h+=x; hm=min(x,hm);}
    for(int i=0; i<n; i++){int x; cin >> x; f+=x; fm=min(x,fm);}
    if(h<f) cout << "Hamilton\n"; else cout << "Verstappen\n";
    if(hm<fm) cout << "Hamilton\n"; else cout << "Verstappen\n";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms2172 KiB
2Accepted3ms2168 KiB
subtask210/10
3Accepted3ms2380 KiB
4Accepted3ms2616 KiB
5Accepted2ms2680 KiB
6Accepted3ms2752 KiB
subtask315/15
7Accepted2ms2828 KiB
8Accepted3ms3060 KiB
9Accepted2ms3152 KiB
10Accepted2ms3048 KiB
11Accepted2ms3056 KiB
subtask420/20
12Accepted2ms3044 KiB
13Accepted2ms3044 KiB
14Accepted3ms3172 KiB
15Accepted2ms3252 KiB
16Accepted3ms3476 KiB
17Accepted2ms3488 KiB
18Accepted3ms3700 KiB
19Accepted2ms3684 KiB
subtask555/55
20Accepted2ms3792 KiB
21Accepted3ms3936 KiB
22Accepted3ms3884 KiB
23Accepted2ms3968 KiB
24Accepted3ms4204 KiB
25Accepted2ms4280 KiB
26Accepted2ms4168 KiB
27Accepted3ms4404 KiB
28Accepted2ms4500 KiB