60282023-10-26 19:44:02xxxFormula-1cpp14Accepted 100/1003ms4412 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long

signed main() {
	int n; cin >> n;
	vector<int> h(n), v(n);
	int hsum = 0, vsum = 0, minh = INT_MAX, minv = INT_MAX;
	for(int i = 0; i < n; i++) {
		cin >> h[i];
		hsum += h[i];
		minh = min(minh, h[i]);
	}

	for(int i = 0; i < n; i++) {
		cin >> v[i];
		vsum += v[i];
		minv = min(minv, v[i]);
	}

	cout << (hsum < vsum ? "Hamilton\n" : "Verstappen\n");
	cout << (minh < minv ? "Hamilton\n" : "Verstappen\n");
	return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1812 KiB
2Accepted3ms2052 KiB
subtask210/10
3Accepted3ms2268 KiB
4Accepted3ms2512 KiB
5Accepted3ms2724 KiB
6Accepted3ms2936 KiB
subtask315/15
7Accepted2ms3152 KiB
8Accepted3ms3276 KiB
9Accepted2ms3356 KiB
10Accepted3ms3484 KiB
11Accepted3ms3608 KiB
subtask420/20
12Accepted2ms3688 KiB
13Accepted3ms3684 KiB
14Accepted2ms3804 KiB
15Accepted3ms3688 KiB
16Accepted3ms3808 KiB
17Accepted2ms3688 KiB
18Accepted3ms3816 KiB
19Accepted2ms3900 KiB
subtask555/55
20Accepted3ms3780 KiB
21Accepted3ms3780 KiB
22Accepted3ms3912 KiB
23Accepted3ms4056 KiB
24Accepted3ms4128 KiB
25Accepted3ms4124 KiB
26Accepted3ms4396 KiB
27Accepted3ms4412 KiB
28Accepted3ms4304 KiB