106742024-04-07 21:15:33VargusInverziócpp17Wrong answer 6/50187ms11136 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];

    ll p1 = 0, p2 = 0;
    bool ok = false;
    for (ll i = 1; i <= n; ++i)
    {
        for (ll j = n; j >= 0; --j)
        {
            if (a[i] > a[j])
            {
                ok = true;
                p1 = i;
                p2 = j;
                break;
            }
        }
        if (ok)
            break;
    }
    cout << p1 << " " << p2;

    return 0;
}
/*
5
4 3 5 1 2
*/
SubtaskSumTestVerdictTimeMemory
base6/50
1Accepted0/03ms1816 KiB
2Wrong answer0/017ms2712 KiB
3Wrong answer0/12ms2088 KiB
4Accepted2/23ms2228 KiB
5Wrong answer0/73ms2312 KiB
6Wrong answer0/217ms3008 KiB
7Wrong answer0/2173ms10244 KiB
8Wrong answer0/2175ms10360 KiB
9Wrong answer0/2173ms10448 KiB
10Accepted2/2173ms10676 KiB
11Wrong answer0/2173ms10632 KiB
12Wrong answer0/2170ms10632 KiB
13Wrong answer0/2173ms10736 KiB
14Wrong answer0/2173ms10632 KiB
15Wrong answer0/2187ms10632 KiB
16Wrong answer0/2173ms10628 KiB
17Wrong answer0/2173ms10920 KiB
18Wrong answer0/2173ms10776 KiB
19Wrong answer0/3173ms10780 KiB
20Wrong answer0/3173ms10780 KiB
21Wrong answer0/2173ms11036 KiB
22Wrong answer0/2172ms11068 KiB
23Accepted2/2175ms11060 KiB
24Wrong answer0/2173ms11136 KiB