68462023-12-19 10:58:34KovacsBalintFormula-1cpp17Wrong answer 0/1003ms4072 KiB
#include <iostream>

using namespace std;

int main()
{
    int n=0,h=0,v=0,ki=99999;
    cin>>n;
    int H[n],V[n];
    for(int i=0;i<n;i++)
    {
        cin>>H[i];
        if(H[i]>ki)
        {
            ki=H[i];
        }
    }
    for(int i=0;i<n;i++)
    {
        cin>>V[i];
        if(V[i]>ki)
        {
            ki=V[i];
        }
    }
    for(int i=0;i<n;i++)
    {
        h+=H[i];
    }
    for(int i=0;i<n;i++)
    {
        v+=V[i];
    }
    for(int i=0;i<n;i++)
    {
        if(ki==V[i])
        {
            cout<<"Verstappen";
        }
        if(ki==H[i])
        {
            cout<<"Hamilton";
        }
    }
    if(h<v)
    {
        cout<<"Hamilton"<<endl;
    }
    else
    {
        cout<<"Verstappen"<<endl;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1876 KiB
2Wrong answer3ms2116 KiB
subtask20/10
3Wrong answer3ms2268 KiB
4Wrong answer3ms2348 KiB
5Wrong answer3ms2436 KiB
6Wrong answer3ms2636 KiB
subtask30/15
7Wrong answer3ms2728 KiB
8Wrong answer3ms2872 KiB
9Wrong answer3ms2864 KiB
10Wrong answer3ms3060 KiB
11Wrong answer3ms3268 KiB
subtask40/20
12Wrong answer3ms3488 KiB
13Wrong answer3ms3460 KiB
14Wrong answer3ms3460 KiB
15Wrong answer3ms3460 KiB
16Wrong answer3ms3732 KiB
17Wrong answer3ms3752 KiB
18Wrong answer3ms3920 KiB
19Wrong answer3ms4072 KiB
subtask50/55
20Wrong answer3ms4044 KiB
21Wrong answer3ms4040 KiB
22Wrong answer3ms3928 KiB
23Wrong answer3ms4040 KiB
24Wrong answer3ms3928 KiB
25Wrong answer3ms3936 KiB
26Wrong answer3ms3940 KiB
27Wrong answer3ms3936 KiB
28Wrong answer3ms3904 KiB