106802024-04-07 21:28:54VargusInverziócpp17Wrong answer 7/50578ms12092 KiB
#include <iostream>
#include <queue>
#define ll long long

using namespace std;

int main()
{
    ll n;
    cin >> n;
    vector <ll> a(n + 1);
    for (ll i = 1; i <= n; ++i)
        cin >> a[i];

    for (ll i = 1; i <= n; ++i)
    {
        for (ll j = n; j >= i + 1; --j)
        {
            if (a[i] > a[j])
            {
                cout << i << " " << j;
                return 0;
            }
        }
    }
    cout << "-1";

    return 0;
}
/*
5
1 5 3 2 4
*/
SubtaskSumTestVerdictTimeMemory
base7/50
1Accepted0/03ms1808 KiB
2Wrong answer0/017ms2712 KiB
3Accepted1/13ms2212 KiB
4Accepted2/23ms2432 KiB
5Wrong answer0/73ms2672 KiB
6Wrong answer0/217ms3584 KiB
7Wrong answer0/2173ms10808 KiB
8Wrong answer0/2173ms10744 KiB
9Wrong answer0/2174ms11036 KiB
10Accepted2/2174ms10956 KiB
11Wrong answer0/2173ms11212 KiB
12Wrong answer0/2171ms11164 KiB
13Wrong answer0/2173ms11524 KiB
14Wrong answer0/2173ms11808 KiB
15Wrong answer0/2174ms12092 KiB
16Wrong answer0/2174ms12044 KiB
17Wrong answer0/2174ms11900 KiB
18Wrong answer0/2173ms11900 KiB
19Wrong answer0/3173ms11904 KiB
20Wrong answer0/3175ms11900 KiB
21Wrong answer0/2174ms11928 KiB
22Wrong answer0/2174ms11904 KiB
23Accepted2/2173ms11900 KiB
24Time limit exceeded0/2578ms7432 KiB