12571 | 2024-12-23 13:54:27 | nkbalint | Fasor (40) | cpp17 | Forditási hiba |
#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;
}
}
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 | {
| ^