12386 | 2024-12-16 09:57:29 | ercseferenc | Hőségriadó (50 pont) | cpp17 | Compilation error |
#include <iostream>
using namespace std;
int main()
{
int n,k,l,f,c=0;
cin>>n>>k>>l>>f;
int a[n]; for(int i=0; i<n; i++){g>>a[i];}
int mel=0,hid=0,riad=0;
for(int i=0; i<n; i++){
if(a[i]>f){mel++; hid=0;}
else{hid++; mel=0;}
if(mel==k && riad==0){riad=1; c++;}
if(riad==1 && hid==l){riad=0;}}
cout<<c;
return 0;}
open /var/local/lib/isolate/442/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:7:38: error: 'g' was not declared in this scope
7 | int a[n]; for(int i=0; i<n; i++){g>>a[i];}
| ^