71632024-01-01 10:06:25MagyarKendeSZLGLegmesszebbi rossz sorrendű (35 pont)cpp17Time limit exceeded 9/35300ms4048 KiB
#include <bits/stdc++.h>

#define speed cin.tie(0); ios::sync_with_stdio(0)
#define cinv(v) for (auto& e : v) cin >> e;
#define all(v) v.begin(), v.end()
#define has(s, e) s.count(e)

using namespace std;
using ll = long long;
using point = array<int, 2>;

int main() {
    speed;

    int N;
    cin >> N;
    vector<int> v(N);
    cinv(v);

    for (int w = N; w > 0; w--) {
        for (int i = 0, j = w - 1; j < N; i++, j++) {
            if (v[i] > v[j]) {
                cout << i + 1 << ' ' << j + 1;
                exit(0);
            }
        }
    }

    cout << -1;
}
SubtaskSumTestVerdictTimeMemory
base9/35
1Accepted0/03ms1828 KiB
2Time limit exceeded0/0300ms1856 KiB
3Accepted1/13ms2556 KiB
4Accepted1/13ms2540 KiB
5Accepted1/13ms2532 KiB
6Accepted1/13ms2728 KiB
7Accepted1/13ms2908 KiB
8Accepted1/13ms3124 KiB
9Accepted1/14ms3208 KiB
10Accepted1/17ms3436 KiB
11Accepted1/110ms3648 KiB
12Time limit exceeded0/2246ms3008 KiB
13Time limit exceeded0/2254ms3132 KiB
14Time limit exceeded0/2273ms2996 KiB
15Time limit exceeded0/2270ms3132 KiB
16Time limit exceeded0/2257ms3604 KiB
17Time limit exceeded0/2266ms3612 KiB
18Time limit exceeded0/2273ms3832 KiB
19Time limit exceeded0/2250ms3836 KiB
20Time limit exceeded0/2275ms3884 KiB
21Time limit exceeded0/2270ms3936 KiB
22Time limit exceeded0/2261ms3984 KiB
23Time limit exceeded0/2270ms3980 KiB
24Time limit exceeded0/2273ms4048 KiB