119332024-11-20 20:52:07SRobVölgy (100 pont)cpp11Compilation error


#include "stdafx.h"
#include <iostream>

using namespace std;


int main()
{
	int N;
	cin >> N;

	int elol;
	int elolIndex= 0;
	elol = 0;
	int mostaniMax = 0;
	int maxHossz = 0;
	int most;
	int elozo;
	for (int i = 0; i < N; i++)
	{
		
		cin >> most;
		if (i == 0)
		{
			elozo = most;
			elol = most;
		}
		if (i > 0)
		{
			
			if (most < elol)
			{
				mostaniMax++;
			}
			else if(most < elol && elozo > most)
			{
				elol = elozo;
				elolIndex = i-1;
				mostaniMax = 0;
			}
			else if (most >= elol && most > elozo)
			{
				mostaniMax++;
			}
			
			else if(most >= elol && most == elozo)
			{
				elol = most;
				elolIndex = i;
				mostaniMax = 0;
			}
			if (mostaniMax > maxHossz)
				{
					maxHossz = mostaniMax;
				}
			elozo = most;
		}
	}
	if (maxHossz = 0)
	{
		cout << -1;
	}
	else
	{
		cout << maxHossz;
	}
	
}

Compilation error
open /var/local/lib/isolate/422/box/a.out: no such file or directory
main.cpp:3:10: fatal error: stdafx.h: No such file or directory
    3 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.