60072023-10-18 16:12:02Tina0731Inverziócpp14Wrong answer 3/50190ms7836 KiB
#include <iostream>

using namespace std;

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

    int h=n;
    int jobb, bal;
    while(h>1)
    {
        jobb=h;
        bal=1;
        if(t[bal]>t[jobb])
        {
            cout<<bal<<" "<<jobb;
            return 0;
        }
        while(jobb+1<=n)
        {
            //cout<<"xx";
            bal++;
            jobb++;
            if(t[jobb]>t[bal])
            {
                cout<<jobb<<" "<<bal;
                return 0;
            }
        }

        h--;
    }
    cout<<-1;


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/50
1Accepted0/03ms1748 KiB
2Wrong answer0/017ms2436 KiB
3Accepted1/13ms2204 KiB
4Accepted2/23ms2288 KiB
5Wrong answer0/73ms2340 KiB
6Wrong answer0/217ms2996 KiB
7Wrong answer0/2190ms6636 KiB
8Wrong answer0/2175ms6692 KiB
9Wrong answer0/2175ms6956 KiB
10Wrong answer0/2175ms6912 KiB
11Wrong answer0/2175ms7168 KiB
12Wrong answer0/2172ms7208 KiB
13Wrong answer0/2175ms7460 KiB
14Wrong answer0/2175ms7548 KiB
15Wrong answer0/2175ms7688 KiB
16Wrong answer0/2175ms7616 KiB
17Wrong answer0/2175ms7620 KiB
18Wrong answer0/2175ms7744 KiB
19Wrong answer0/3175ms7836 KiB
20Wrong answer0/3177ms7832 KiB
21Wrong answer0/2175ms7828 KiB
22Wrong answer0/2177ms7824 KiB
23Wrong answer0/2180ms7828 KiB
24Wrong answer0/2177ms7832 KiB