38452023-03-03 11:33:12AGergoFasor (40)cpp17Forditási hiba
#include <bits/stdc++.h>

using namespace std;

int main()
{
    //iostream.sync_with_stdio(false);
    in.tie(0);

    int szam;
    int lat;
    cin >> szam >> lat;

    vector<int> fak( szam + 2*lat + 1,-1);

    for (int i = 0; i < szam; i++)
    {
        cin >> fak[i + lat];
    }

    int temp = 0;
    for(int i = lat; i < szam + lat; i++)
    {
        temp =0;
        for(int j = -lat; j < lat +1; j++)
        {

            if(fak[i + j] > fak[i])
            {
                break;
            }
            else
            {
                temp++;
            }
        }

        if(temp == 2 * lat + 1)
        {
            cout << i - lat + 1 ;
            break;
        }
    }

    if(temp != 2*lat +1)
    {
        cout << -1;
    }

}
Forditási hiba
exit status 1
main.cpp: In function 'int main()':
main.cpp:8:5: error: 'in' was not declared in this scope; did you mean 'yn'?
    8 |     in.tie(0);
      |     ^~
      |     yn
Exited with error status 1