105052024-04-03 16:38:44MagyarKendeSZLGLegcsalódottabb versenyző (75 pont)cpp17Accepted 75/7514ms4228 KiB
#include <bits/stdc++.h>
using namespace std;

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

    int N;
    cin >> N;
    vector<int> v(N);
    for (int& x : v) cin >> x;

    int l = 0, r = 1, mx = -1, result = -1;
    while (r < N) {
        if (v[l] < v[r]) {
            if (mx < r - l) {
                mx = r - l;
                result = l + 1;
            }
            l = r;
        }
        r++;
    }

    cout << result;
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms1828 KiB
2Accepted0/014ms2856 KiB
3Accepted5/52ms2140 KiB
4Accepted5/53ms2336 KiB
5Accepted5/53ms2572 KiB
6Accepted5/52ms2652 KiB
7Accepted5/52ms2652 KiB
8Accepted5/53ms2776 KiB
9Accepted5/53ms2992 KiB
10Accepted5/53ms2976 KiB
11Accepted5/53ms2984 KiB
12Accepted5/53ms3136 KiB
13Accepted5/514ms3752 KiB
14Accepted5/514ms4228 KiB
15Accepted5/514ms4092 KiB
16Accepted5/514ms4108 KiB
17Accepted5/514ms4176 KiB