62192023-11-08 11:27:40EsVagyFormula-1cpp17Forditási hiba
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>

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";
}
Forditási hiba
exit status 1
main.cpp: In function 'int main()':
main.cpp:15:23: error: 'LONG_MAX' was not declared in this scope
   15 |         long int hB = LONG_MAX;
      |                       ^~~~~~~~
main.cpp:7:1: note: 'LONG_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
    6 | #include <map>
  +++ |+#include <climits>
    7 | 
Exited with error status 1