68122023-12-19 10:32:46KovacsBalintFormula-1cpp17Wrong answer 0/1003ms4128 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,h,v,ki=9999999999999999999999999999999999999999999999999999999;
    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];
    }
    if(h<v)
    {
        cout<<"Hamilton"<<endl;
    }
    else
    {
        cout<<"Verstappen"<<endl;
    }
    for(int i=0;i<n;i++)
    {
        if(ki==V[i])
        {
            cout<<"Verstappen";
        }
        if(ki==H[i])
        {
            cout<<"Hamilton";
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2120 KiB
subtask20/10
3Wrong answer3ms2336 KiB
4Wrong answer3ms2416 KiB
5Wrong answer3ms2652 KiB
6Wrong answer3ms2788 KiB
subtask30/15
7Wrong answer3ms2880 KiB
8Wrong answer3ms2940 KiB
9Accepted3ms3052 KiB
10Wrong answer3ms3020 KiB
11Wrong answer3ms3240 KiB
subtask40/20
12Wrong answer3ms3164 KiB
13Accepted3ms3448 KiB
14Wrong answer3ms3532 KiB
15Wrong answer3ms3476 KiB
16Accepted3ms3572 KiB
17Wrong answer3ms3820 KiB
18Wrong answer3ms3904 KiB
19Wrong answer3ms3904 KiB
subtask50/55
20Accepted3ms3908 KiB
21Accepted3ms3912 KiB
22Wrong answer3ms3868 KiB
23Accepted3ms3872 KiB
24Wrong answer3ms3868 KiB
25Wrong answer3ms3996 KiB
26Accepted3ms4128 KiB
27Accepted3ms4120 KiB
28Accepted3ms4012 KiB