62202023-11-08 11:28:40EsVagyFormula-1cpp17Accepted 100/1003ms4488 KiB
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <climits>

using namespace std;

int main()
{
	int size;
	cin >> size;

	long int hB = LONG_MAX;
	long int hS = 0;
	long int vB = LONG_MAX;
	long int vS = 0;
	for (int i = 0; i < size; i++)
	{
		long int next;
		cin >> next;

		hB = min(hB, next);
		hS += next;
	}

	for (int i = 0; i < size; i++)
	{
		long int next;
		cin >> next;

		vB = min(vB, next);
		vS += next;
	}

	cout << (hS < vS ? "Hamilton" : "Verstappen") << "\n";
	cout << (hB < vB ? "Hamilton" : "Verstappen") << "\n";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2064 KiB
subtask210/10
3Accepted3ms2312 KiB
4Accepted3ms2552 KiB
5Accepted2ms2636 KiB
6Accepted2ms2560 KiB
subtask315/15
7Accepted2ms2516 KiB
8Accepted2ms2520 KiB
9Accepted3ms2756 KiB
10Accepted3ms2752 KiB
11Accepted2ms2968 KiB
subtask420/20
12Accepted3ms2888 KiB
13Accepted3ms3100 KiB
14Accepted3ms3396 KiB
15Accepted3ms3520 KiB
16Accepted2ms3600 KiB
17Accepted3ms3852 KiB
18Accepted2ms3956 KiB
19Accepted2ms4216 KiB
subtask555/55
20Accepted2ms4272 KiB
21Accepted2ms4384 KiB
22Accepted3ms4356 KiB
23Accepted3ms4364 KiB
24Accepted3ms4372 KiB
25Accepted3ms4488 KiB
26Accepted3ms4488 KiB
27Accepted3ms4376 KiB
28Accepted3ms4336 KiB