| 21536 | 2026-01-13 12:52:40 | KSzili | Hőségriadó (50 pont) | cpp17 | Compilation error |
#include <iostream>
using namespace std;
int main()
{ int k, n, l, f, db1=0, db2=0, sz=0;
int a[10000];
cin>>n;
cin>>k;
cin>>l;
cin>>f;
for(int i=0; i<n; i++)
{
cin>>a[i];
if(a[i]>f)
{
db1++;
db2=0;
}
if(a[i]<f)
{
db2++;
db1=0;
}
if(db1==2 && db2<2)
sz++;
}
cout<<sz;
return 0;open /var/local/lib/isolate/444/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:30:17: error: expected '}' at end of input
30 | return 0;
| ^
main.cpp:7:1: note: to match this '{'
7 | { int k, n, l, f, db1=0, db2=0, sz=0;
| ^