219802026-01-14 12:13:10sandormeszicsFasor (40)cpp17Wrong answer 4/404ms500 KiB
#include <iostream>

using namespace std;

int boldog(int a[10000], int n, int k){
    for(int i = 0; i < n; i++){
        if(i > k && i < n-k){
            bool b = true;
            for(int j = 0; j < k; j++){
                if(a[i] < a[i-j-1]){
                    b = false;
                }
            }
            if(b){
                return i+1;
            }
        }
    }

    return -1;
}

int main()
{
    int a[10000], n, k;
    cin >> n >> k;

    for(int i = 0; i < n; i++){
        cin >> a[i];
    }

    cout << boldog(a, n, k);


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/40
1Wrong answer0/01ms316 KiB
2Accepted0/04ms316 KiB
3Wrong answer0/21ms500 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Accepted2/21ms316 KiB
7Wrong answer0/21ms316 KiB
8Wrong answer0/22ms316 KiB
9Wrong answer0/24ms316 KiB
10Accepted2/24ms384 KiB
11Wrong answer0/24ms316 KiB
12Wrong answer0/23ms316 KiB
13Runtime error0/24ms316 KiB
14Runtime error0/24ms316 KiB
15Runtime error0/23ms316 KiB
16Runtime error0/24ms428 KiB
17Runtime error0/24ms316 KiB
18Runtime error0/24ms316 KiB
19Runtime error0/24ms316 KiB
20Runtime error0/24ms316 KiB
21Runtime error0/24ms316 KiB
22Runtime error0/24ms316 KiB