7478 | 2024-01-09 10:04:15 | BenedekMarton | Fasor (40) | csharp | Compilation error |
#include <iostream>
#include <queue>
using namespace std;
int main()
{
int n, k, mq, mi, x, a=1;
queue<int> q;
cin >> x;
q.push(x);
mq=x;
mi=1;
for(int i=0; i<2*k+1; i++)
{
a++;
cin >> x;
q.push(x);
if(mq<x)
{
mq=x;
mi=1;
}
else
{
mi++;
}
if(mi==k+1)
{
cout << n-k;
return 0;
}
}
for(int i=k+1; i<n; i++)
{
cin >> x;
}
return 0;
}
exit status 1
main.cs(2,0): error CS1024: Wrong preprocess