63162023-11-15 16:54:44Pbg4444Formula-1cpp17Wrong answer 0/1003ms4556 KiB
#include <iostream>
#include <string>

int main(){
    int n;
    std::cin>>n;
    int v[n], h[n];
    int vv;
    int hh;
    int nn;
    bool ham;
    for (int i = 0; i < n; i++)
    {
        std::cin>>h[i];
    }
    for (int i = 0; i < n; i++)
    {
        std::cin>>v[i];
    }
    if (v[0] < h[0]){
        nn = v[0];
        ham = false;
    } 
    else {
        nn = h[0];
        ham = true;
    }
    for (int i = 0; i < n; i++){
        if(v[i] < h[i]){ 
            vv++; 
            }
        else {
            hh++;
            }
        if (v[i] < nn) {
            nn = v[i];
            ham = false;
        }
        else if (h[i] < nn) {
            nn = h[i];
            ham = true;
        }
    }
    if (vv-4607 > hh) std::cout<<"Verstappen"<<std::endl;
    else std::cout<<"Hamilton"<<std::endl;
    if (ham) std::cout<<"Hamilton";
    else std::cout<<"Verstappen";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Wrong answer3ms2072 KiB
subtask20/10
3Wrong answer2ms2152 KiB
4Accepted3ms2292 KiB
5Wrong answer3ms2500 KiB
6Accepted2ms2624 KiB
subtask30/15
7Accepted3ms2652 KiB
8Accepted3ms2848 KiB
9Wrong answer3ms3064 KiB
10Wrong answer3ms3240 KiB
11Accepted3ms3360 KiB
subtask40/20
12Accepted3ms3476 KiB
13Accepted3ms3576 KiB
14Wrong answer3ms3688 KiB
15Wrong answer3ms3768 KiB
16Accepted3ms3644 KiB
17Wrong answer3ms3652 KiB
18Wrong answer3ms3780 KiB
19Accepted3ms4028 KiB
subtask50/55
20Wrong answer3ms4116 KiB
21Wrong answer3ms4116 KiB
22Wrong answer3ms4324 KiB
23Accepted3ms4408 KiB
24Wrong answer3ms4404 KiB
25Wrong answer3ms4524 KiB
26Accepted3ms4556 KiB
27Accepted3ms4544 KiB
28Accepted3ms4288 KiB