81762024-01-12 15:46:29rennFasor (40)cpp17Wrong answer 4/403ms4300 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)
        {
            for(i+=1; i < n; i++) cin >> c;
            break;
        }
        if(c > maxh)
        {
            maxi = i;
            maxh = c;
        }
    }

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

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base4/40
1Wrong answer0/03ms1896 KiB
2Wrong answer0/03ms2084 KiB
3Wrong answer0/23ms2192 KiB
4Wrong answer0/23ms2268 KiB
5Accepted2/23ms2268 KiB
6Wrong answer0/23ms2500 KiB
7Wrong answer0/23ms2484 KiB
8Wrong answer0/23ms2492 KiB
9Accepted2/23ms2620 KiB
10Wrong answer0/23ms2704 KiB
11Wrong answer0/23ms2836 KiB
12Wrong answer0/23ms2912 KiB
13Wrong answer0/23ms3200 KiB
14Wrong answer0/23ms3272 KiB
15Wrong answer0/23ms3496 KiB
16Wrong answer0/22ms3608 KiB
17Wrong answer0/22ms3608 KiB
18Wrong answer0/23ms3700 KiB
19Wrong answer0/23ms3912 KiB
20Wrong answer0/23ms4136 KiB
21Wrong answer0/22ms4224 KiB
22Wrong answer0/23ms4300 KiB