11417 | 2024-09-13 10:42:36 | madvir | Hőségriadó (50 pont) | cpp17 | Forditási hiba |
#include <iostream>
#include <set>
using namespace std;
long long n,k,l,f;
long long temp[n];
long long meleg=0, hideg=0, riado=0, card=0;
int main()
{
cin >>n >>k >>l >> f;
for(int i=0; i<n; i++) {
cin >> temp[i];
if(temp[i]>f) {
hideg=0;
meleg++;
if(meleg==k && riado==0) {
riado=1;
card++;
}
}
else {
meleg=0;
if(temp[i]<f) {
hideg++;
if(hideg==l && riado==1) {
riado=0;
}
}
}
}
cout<< card;
return 0;
}
open /var/local/lib/isolate/415/box/a.out: no such file or directory
main.cpp:6:16: error: size of array 'temp' is not an integral constant-expression
6 | long long temp[n];
| ^