60732023-10-29 15:53:35IgnácFormula-1cpp11Accepted 100/1003ms4632 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int N;
	cin >> N;
	vector<int> H(N);
	vector<int> V(N);
	int Hsum = 0;
	int Vsum = 0;
	int Hmin = INT_MAX;
	int Vmin = INT_MAX;
	for(int i = 0; i < N; i++){
		cin >> H[i];
		Hsum += H[i];
		if(Hmin > H[i]){
			Hmin = H[i];
		}
	}

	for(int i = 0; i < N; i++){
		cin >> V[i];
		Vsum += V[i];
		if(Vmin > V[i]){
			Vmin = V[i];
		}
	}

	if(Hsum < Vsum){
		cout << "Hamilton\n";
	} else{
		cout << "Verstappen\n";
	}

	if(Hmin < Vmin){
		cout << "Hamilton\n";
	} else{
		cout << "Verstappen\n";
	}
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1684 KiB
2Accepted3ms1932 KiB
subtask210/10
3Accepted3ms2172 KiB
4Accepted2ms2168 KiB
5Accepted3ms2392 KiB
6Accepted2ms2476 KiB
subtask315/15
7Accepted3ms2720 KiB
8Accepted3ms2932 KiB
9Accepted3ms2996 KiB
10Accepted2ms2880 KiB
11Accepted3ms3124 KiB
subtask420/20
12Accepted3ms3336 KiB
13Accepted3ms3576 KiB
14Accepted2ms3544 KiB
15Accepted3ms3660 KiB
16Accepted3ms3540 KiB
17Accepted3ms3396 KiB
18Accepted2ms3512 KiB
19Accepted2ms3516 KiB
subtask555/55
20Accepted3ms3516 KiB
21Accepted3ms3748 KiB
22Accepted3ms3760 KiB
23Accepted3ms3756 KiB
24Accepted3ms4040 KiB
25Accepted3ms4080 KiB
26Accepted3ms4260 KiB
27Accepted3ms4508 KiB
28Accepted3ms4632 KiB