81732024-01-12 15:43:16rennFasor (40)cpp17Wrong answer 4/403ms3484 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);

    int n, k, c;
    cin >> c;
    int maxi = 0, maxh = c;
    for(int i = 1; i < n; i++)
    {
        cin >> c;
        if(i-maxi > k) break;
        if(c > maxh)
        {
            maxi = i;
            maxh = c;
        }
    }

    cout << maxi+1 << "\n";

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/40
1Wrong answer0/03ms2044 KiB
2Wrong answer0/03ms2188 KiB
3Wrong answer0/23ms2400 KiB
4Wrong answer0/23ms2568 KiB
5Accepted2/23ms2688 KiB
6Wrong answer0/23ms2920 KiB
7Wrong answer0/23ms3044 KiB
8Wrong answer0/23ms3076 KiB
9Accepted2/23ms3156 KiB
10Wrong answer0/23ms3284 KiB
11Wrong answer0/23ms3264 KiB
12Wrong answer0/23ms3268 KiB
13Wrong answer0/23ms3336 KiB
14Wrong answer0/23ms3332 KiB
15Wrong answer0/23ms3336 KiB
16Wrong answer0/23ms3336 KiB
17Wrong answer0/23ms3332 KiB
18Wrong answer0/23ms3476 KiB
19Wrong answer0/23ms3484 KiB
20Wrong answer0/23ms3336 KiB
21Wrong answer0/23ms3480 KiB
22Wrong answer0/23ms3448 KiB