117732024-11-10 16:05:11MittomenFormula-1cpp17Wrong answer 0/1002ms568 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
1Accepted1ms320 KiB
2Accepted1ms320 KiB
subtask20/10
3Accepted1ms320 KiB
4Wrong answer1ms320 KiB
5Accepted1ms320 KiB
6Wrong answer1ms320 KiB
subtask30/15
7Wrong answer1ms320 KiB
8Accepted1ms352 KiB
9Wrong answer1ms320 KiB
10Accepted1ms408 KiB
11Wrong answer1ms320 KiB
subtask40/20
12Wrong answer1ms320 KiB
13Accepted1ms416 KiB
14Accepted1ms320 KiB
15Accepted1ms356 KiB
16Wrong answer1ms320 KiB
17Wrong answer1ms320 KiB
18Wrong answer1ms520 KiB
19Wrong answer2ms508 KiB
subtask50/55
20Accepted1ms320 KiB
21Wrong answer1ms372 KiB
22Accepted1ms568 KiB
23Wrong answer1ms320 KiB
24Accepted1ms508 KiB
25Wrong answer1ms508 KiB
26Accepted1ms320 KiB
27Accepted1ms568 KiB
28Wrong answer1ms320 KiB