60582023-10-29 07:57:14GervidFormula-1cpp17Accepted 100/1003ms5240 KiB
#include <iostream>

using namespace std;

int main()
{
	int n, i, j, sum[2] = { 0, 0 }, min[2] = { 100000, 100000}, temp;
    cin >> n;

	for (j = 0; j < 2; j++)
	{
		for (i = 0; i < n; i++)
		{
			cin >> temp;
		
			sum[j] += temp;

			if (temp < min[j])
			{
				min[j] = temp;
			}
		}
	}

	if (sum[0] < sum[1])
	{
		cout << "Hamilton" << endl;
	}
	else
	{
		cout << "Verstappen" << endl;
	}

	if (min[0] < min[1])
	{
		cout << "Hamilton";
	}
	else
	{
		cout << "Verstappen";
	}
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1880 KiB
2Accepted3ms2068 KiB
subtask210/10
3Accepted3ms2308 KiB
4Accepted3ms2492 KiB
5Accepted3ms2740 KiB
6Accepted3ms2952 KiB
subtask315/15
7Accepted2ms3076 KiB
8Accepted2ms3000 KiB
9Accepted3ms3128 KiB
10Accepted3ms3240 KiB
11Accepted3ms3484 KiB
subtask420/20
12Accepted3ms3500 KiB
13Accepted2ms3548 KiB
14Accepted2ms3736 KiB
15Accepted3ms3992 KiB
16Accepted3ms3956 KiB
17Accepted3ms4080 KiB
18Accepted2ms4168 KiB
19Accepted2ms4168 KiB
subtask555/55
20Accepted3ms4292 KiB
21Accepted3ms4548 KiB
22Accepted3ms4560 KiB
23Accepted3ms4612 KiB
24Accepted3ms4848 KiB
25Accepted3ms5060 KiB
26Accepted3ms5120 KiB
27Accepted3ms5240 KiB
28Accepted3ms5120 KiB