117752024-11-10 16:11:42MittomenFormula-1cpp17Wrong answer 0/1002ms572 KiB
#include <iostream>

using namespace std;

#define MIN(a, b) a < b ? a : b

int main() {
	short int n;
	int min_time = 0;
	bool fastest = false; // false: Hamilton, true: Verstappen
	int hamilton = 0, verstappen = 0;

	cin >> n;
	 
	int round;
	for (short int i = 0; i < n; i++) {
		cin >> round;

		hamilton += round;

		min_time = MIN(min_time, round);
	}

	for (short int i = 0; i < n; i++) {
		cin >> round;

		verstappen += round;

		if (round < min_time) fastest = true;
	}

	cout << (verstappen < hamilton ? "Verstappen" : "Hamilton") << endl;
	cout << (fastest ? "Verstappen" : "Hamilton");

	return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms512 KiB
2Accepted1ms320 KiB
subtask20/10
3Accepted1ms320 KiB
4Wrong answer1ms320 KiB
5Accepted1ms320 KiB
6Wrong answer1ms320 KiB
subtask30/15
7Wrong answer1ms320 KiB
8Accepted1ms512 KiB
9Wrong answer1ms320 KiB
10Accepted1ms320 KiB
11Wrong answer1ms388 KiB
subtask40/20
12Wrong answer2ms320 KiB
13Accepted1ms512 KiB
14Accepted2ms388 KiB
15Accepted1ms384 KiB
16Wrong answer1ms320 KiB
17Wrong answer1ms320 KiB
18Wrong answer1ms320 KiB
19Wrong answer1ms320 KiB
subtask50/55
20Accepted1ms320 KiB
21Wrong answer1ms320 KiB
22Accepted2ms320 KiB
23Wrong answer1ms320 KiB
24Accepted1ms336 KiB
25Wrong answer1ms512 KiB
26Accepted1ms320 KiB
27Accepted1ms572 KiB
28Wrong answer1ms320 KiB