196082025-12-17 09:32:50VietnameseButcherInverziócpp17Forditási hiba

#include <iostream>
#include <vector>

using namespace std;

int n,turo1,turo2,maxi=INT_MIN,i,j;

vector<int> v;

int main()
{
	cin >> n;
	v.resize(n + 1);
	for (int i = 1; i <= n; ++i)
	{
		cin >> v[i];
	}
	
	for (int i = 1; i < n; ++i)
	{
		for (int j = i+1; j <= n; ++j)
		{
			if (i<j && v[j]<v[i] && maxi < j - i)
			{
				maxi = j - i;
				turo1 = i;
				turo2 = j;

			}
		}
	}
	cout << turo1 << " " << turo2;
}

Forditási hiba
open /var/local/lib/isolate/401/box/a.out: no such file or directory
main.cpp:7:24: error: 'INT_MIN' was not declared in this scope
    7 | int n,turo1,turo2,maxi=INT_MIN,i,j;
      |                        ^~~~~~~
main.cpp:4:1: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'?
    3 | #include <vector>
  +++ |+#include <climits>
    4 |