70312023-12-28 09:34:44eduka78Fasor (40)cpp14Runtime 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/027ms64776 KiB
3Runtime error0/232ms64500 KiB
4Runtime error0/232ms64264 KiB
5Runtime error0/232ms64184 KiB
6Runtime error0/227ms63944 KiB
7Runtime error0/232ms63712 KiB
8Runtime error0/230ms63520 KiB
9Runtime error0/232ms63484 KiB
10Runtime error0/232ms63320 KiB
11Runtime error0/225ms63096 KiB
12Runtime error0/230ms63036 KiB
13Runtime error0/228ms63032 KiB
14Runtime error0/226ms63028 KiB
15Runtime error0/230ms62796 KiB
16Runtime error0/230ms62640 KiB
17Runtime error0/230ms62628 KiB
18Runtime error0/230ms62632 KiB
19Runtime error0/230ms62624 KiB
20Runtime error0/230ms62404 KiB
21Runtime error0/230ms62404 KiB
22Runtime error0/221ms62400 KiB