63142023-11-15 16:53:43Pbg4444Formula-1cpp17Wrong answer 0/1003ms5004 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 > 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 answer3ms1876 KiB
2Wrong answer3ms2124 KiB
subtask20/10
3Wrong answer3ms2360 KiB
4Wrong answer3ms2620 KiB
5Wrong answer3ms2832 KiB
6Wrong answer3ms2876 KiB
subtask30/15
7Wrong answer3ms3128 KiB
8Wrong answer3ms3144 KiB
9Wrong answer3ms3364 KiB
10Wrong answer3ms3540 KiB
11Wrong answer3ms3788 KiB
subtask40/20
12Wrong answer3ms3832 KiB
13Wrong answer3ms3932 KiB
14Wrong answer3ms3956 KiB
15Wrong answer3ms4056 KiB
16Wrong answer3ms4180 KiB
17Wrong answer3ms4256 KiB
18Wrong answer3ms4472 KiB
19Wrong answer3ms4552 KiB
subtask50/55
20Wrong answer3ms4676 KiB
21Wrong answer3ms4920 KiB
22Wrong answer3ms4916 KiB
23Wrong answer3ms4908 KiB
24Wrong answer3ms4896 KiB
25Wrong answer3ms4880 KiB
26Wrong answer3ms5004 KiB
27Wrong answer3ms4888 KiB
28Wrong answer3ms4980 KiB