63112023-11-15 16:52:59Pbg4444Formula-1cpp17Wrong answer 0/1003ms4416 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;
        }
    }
    std::cout<<vv<<" "<<hh<<" "<<ham<<std::endl;
    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
1Wrong answer3ms1912 KiB
2Wrong answer3ms2100 KiB
subtask20/10
3Wrong answer3ms2356 KiB
4Wrong answer3ms2556 KiB
5Wrong answer3ms2772 KiB
6Wrong answer3ms2984 KiB
subtask30/15
7Wrong answer3ms3224 KiB
8Wrong answer3ms3316 KiB
9Wrong answer3ms3380 KiB
10Wrong answer3ms3616 KiB
11Wrong answer3ms3652 KiB
subtask40/20
12Wrong answer3ms3784 KiB
13Wrong answer3ms3892 KiB
14Wrong answer3ms3864 KiB
15Wrong answer3ms3980 KiB
16Wrong answer3ms4012 KiB
17Wrong answer3ms4124 KiB
18Wrong answer3ms4008 KiB
19Wrong answer3ms4016 KiB
subtask50/55
20Wrong answer3ms4076 KiB
21Wrong answer3ms4080 KiB
22Wrong answer3ms4072 KiB
23Wrong answer3ms4224 KiB
24Wrong answer3ms4176 KiB
25Wrong answer3ms4180 KiB
26Wrong answer3ms4172 KiB
27Wrong answer3ms4292 KiB
28Wrong answer3ms4416 KiB