68662023-12-19 12:56:26lennon014Formula-1cpp17Runtime error 0/1003ms4424 KiB
#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
using namespace std;






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

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

    if(k>l){
        cout<<"Hamilton";
    }else{
        cout<<"Verstappen";
    }
    sort(ido1.end(), ido1.begin());
    sort(ido2.end(), ido2.begin());
    if(ido1[0]>ido2[0]){
        cout<<"Hamilton";
    }else{
        cout<<"Verstappen";
    }

    return 0;
}

SubtaskSumTestVerdictTimeMemory
subtask10/0
1Runtime error3ms1948 KiB
2Runtime error3ms2220 KiB
subtask20/10
3Runtime error3ms2188 KiB
4Runtime error3ms2412 KiB
5Runtime error3ms2632 KiB
6Runtime error3ms2844 KiB
subtask30/15
7Runtime error3ms2856 KiB
8Runtime error3ms3132 KiB
9Runtime error3ms3472 KiB
10Runtime error3ms3472 KiB
11Runtime error3ms3748 KiB
subtask40/20
12Runtime error3ms3564 KiB
13Runtime error3ms3404 KiB
14Runtime error3ms3396 KiB
15Runtime error3ms3400 KiB
16Runtime error3ms3404 KiB
17Runtime error3ms3648 KiB
18Runtime error3ms3608 KiB
19Runtime error3ms3592 KiB
subtask50/55
20Runtime error3ms3852 KiB
21Runtime error3ms4012 KiB
22Runtime error3ms3956 KiB
23Runtime error3ms4168 KiB
24Runtime error3ms4160 KiB
25Runtime error3ms4424 KiB
26Runtime error3ms4380 KiB
27Runtime error3ms4284 KiB
28Runtime error3ms4376 KiB