70292023-12-28 09:32:06eduka78Fasor (40)cpp11Runtime error 0/4032ms65016 KiB
#include <iostream>
#include <fstream>
using namespace std;

int main()
{
    ifstream f("be.txt");
    int n, k, i, fa, ok=0, j;
    f>>n;
    f>>k;
    int a[n];
    for(i=0;i<n;i++){
        f>>a[i];
    }
    for(i=0;i<n;i++){
        fa=a[i];
        ok=0;
        for(j=1;j<=k;j++){
            if(fa>=a[i+j]){ok=ok+1;}
        }
        if(ok==k){cout<<i+1;i=n;}
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Runtime error0/032ms65016 KiB
2Runtime error0/032ms64772 KiB
3Runtime error0/232ms64732 KiB
4Runtime error0/227ms64492 KiB
5Runtime error0/226ms64252 KiB
6Runtime error0/230ms64012 KiB
7Runtime error0/226ms63780 KiB
8Runtime error0/230ms63548 KiB
9Runtime error0/232ms63544 KiB
10Runtime error0/232ms63308 KiB
11Runtime error0/230ms63112 KiB
12Runtime error0/230ms63096 KiB
13Runtime error0/230ms62860 KiB
14Runtime error0/227ms62848 KiB
15Runtime error0/229ms62616 KiB
16Runtime error0/230ms62604 KiB
17Runtime error0/230ms62608 KiB
18Runtime error0/229ms62608 KiB
19Runtime error0/230ms62608 KiB
20Runtime error0/230ms62608 KiB
21Runtime error0/230ms62604 KiB
22Runtime error0/230ms62612 KiB