6829 | 2023-12-19 10:45:50 | HunMartin23 | Formula-1 | cpp17 | Accepted 100/100 | 3ms | 5056 KiB |
#include <iostream>
using namespace std;
int main()
{
int N,osz=0,osz1=0,leg=10000000000000,leg1=100000000000000000000;
cin>>N;
int V[N],H[N];
for (int i=1;i<=N;i++)
{
cin>>H[i];
if (H[i]<leg)
{
leg=H[i];
}
osz+=H[i];
}
for (int i=1;i<=N;i++)
{
cin>>V[i];
if (V[i]<leg)
{
leg1=V[i];
}
osz1+=V[i];
}
if (osz<osz1)
{
cout<<"Hamilton"<<endl;
}
else if (osz1<osz)
{
cout<<"Verstappen"<<endl;
}
if (leg<leg1)
{
cout<<"Hamilton";
}
else if (leg1<leg)
{
cout<<"Verstappen";
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2124 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2332 KiB | ||||
4 | Accepted | 3ms | 2540 KiB | ||||
5 | Accepted | 3ms | 2792 KiB | ||||
6 | Accepted | 3ms | 2968 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 3124 KiB | ||||
8 | Accepted | 3ms | 3252 KiB | ||||
9 | Accepted | 3ms | 3484 KiB | ||||
10 | Accepted | 3ms | 3664 KiB | ||||
11 | Accepted | 3ms | 3756 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3860 KiB | ||||
13 | Accepted | 3ms | 3744 KiB | ||||
14 | Accepted | 3ms | 3660 KiB | ||||
15 | Accepted | 3ms | 3648 KiB | ||||
16 | Accepted | 3ms | 3768 KiB | ||||
17 | Accepted | 3ms | 3844 KiB | ||||
18 | Accepted | 3ms | 4092 KiB | ||||
19 | Accepted | 3ms | 4188 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 4272 KiB | ||||
21 | Accepted | 3ms | 4276 KiB | ||||
22 | Accepted | 3ms | 4276 KiB | ||||
23 | Accepted | 3ms | 4272 KiB | ||||
24 | Accepted | 3ms | 4276 KiB | ||||
25 | Accepted | 3ms | 4400 KiB | ||||
26 | Accepted | 3ms | 4616 KiB | ||||
27 | Accepted | 3ms | 4824 KiB | ||||
28 | Accepted | 3ms | 5056 KiB |