68692023-12-19 13:02:29lennon014Formula-1cpp17Accepted 100/1003ms4160 KiB
#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>

using namespace std;

int main() {
    int n, k=0, l=0;
    cin>>n;
    int ido1[n], ido2[n];

    for(int i=0;i<n;i++){
        cin>>ido1[i];
        k+=ido1[i];
    }
    for(int i=0;i<n;i++){
        cin>>ido2[i];
        l+=ido2[i];
    }

    if(k<l){
        cout<<"Hamilton";
    }else{
        cout<<"Verstappen";
    }
    cout<<endl;
    sort(ido1, ido1+n);
    sort(ido2, ido2+n);
    if(ido1[0]<ido2[0]){
        cout<<"Hamilton";
    }else{
        cout<<"Verstappen";
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms2040 KiB
2Accepted3ms2232 KiB
subtask210/10
3Accepted3ms2376 KiB
4Accepted3ms2592 KiB
5Accepted3ms2728 KiB
6Accepted3ms2708 KiB
subtask315/15
7Accepted3ms2768 KiB
8Accepted3ms2828 KiB
9Accepted3ms2916 KiB
10Accepted3ms3036 KiB
11Accepted3ms3028 KiB
subtask420/20
12Accepted3ms3072 KiB
13Accepted3ms3192 KiB
14Accepted3ms3248 KiB
15Accepted3ms3376 KiB
16Accepted3ms3388 KiB
17Accepted3ms3668 KiB
18Accepted3ms3756 KiB
19Accepted3ms3748 KiB
subtask555/55
20Accepted3ms3760 KiB
21Accepted3ms4160 KiB
22Accepted3ms3864 KiB
23Accepted3ms3864 KiB
24Accepted3ms3864 KiB
25Accepted3ms3864 KiB
26Accepted3ms3868 KiB
27Accepted3ms3868 KiB
28Accepted3ms3872 KiB