70322023-12-28 09:35:11eduka78Fasor (40)cpp17Runtime error 0/4032ms65088 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/026ms65088 KiB
2Runtime error0/026ms64848 KiB
3Runtime error0/226ms64608 KiB
4Runtime error0/227ms64368 KiB
5Runtime error0/226ms64128 KiB
6Runtime error0/230ms63900 KiB
7Runtime error0/230ms63620 KiB
8Runtime error0/226ms63628 KiB
9Runtime error0/230ms63556 KiB
10Runtime error0/227ms63552 KiB
11Runtime error0/230ms63308 KiB
12Runtime error0/232ms63296 KiB
13Runtime error0/230ms63064 KiB
14Runtime error0/230ms62880 KiB
15Runtime error0/230ms62896 KiB
16Runtime error0/230ms62728 KiB
17Runtime error0/230ms62668 KiB
18Runtime error0/230ms62668 KiB
19Runtime error0/230ms62668 KiB
20Runtime error0/226ms62436 KiB
21Runtime error0/230ms62436 KiB
22Runtime error0/226ms62264 KiB