125712024-12-23 13:54:27nkbalintFasor (40)cpp17Compilation error
#include <iostream>

using namespace std;

int i,db,a,maxi,pos,n,k;
int main()
{
    cin>>n>>k;

    for(i=1;i<=n;++i)
    {
        cin>>a;

        if(i==1)
        {
            maxi=a;
            pos=1;
        }
        else
        {
            ++db;
            if(a>maxi)
            {
                maxi=a;
                db=0;
                pos=i;
            }

            if(db>=k) break;
        }
    }
Compilation error
open /var/local/lib/isolate/430/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:31:6: error: expected '}' at end of input
   31 |     }
      |      ^
main.cpp:7:1: note: to match this '{'
    7 | {
      | ^