60082023-10-18 16:13:42Tina0731Inverziócpp14Time limit exceeded 3/50600ms7168 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<n)
        {
            //cout<<"xx";
            bal++;
            jobb++;
            if(t[bal]>t[jobb])
            {
                cout<<jobb<<" "<<bal;
                return 0;
            }
        }

        h--;
    }
    cout<<-1;


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/50
1Accepted0/03ms1872 KiB
2Time limit exceeded0/0600ms1520 KiB
3Accepted1/13ms2388 KiB
4Accepted2/23ms2664 KiB
5Wrong answer0/73ms2916 KiB
6Wrong answer0/2307ms3548 KiB
7Time limit exceeded0/2550ms4244 KiB
8Time limit exceeded0/2569ms4512 KiB
9Wrong answer0/2182ms7168 KiB
10Time limit exceeded0/2533ms4516 KiB
11Time limit exceeded0/2574ms4596 KiB
12Time limit exceeded0/2569ms4784 KiB
13Time limit exceeded0/2574ms4896 KiB
14Time limit exceeded0/2569ms4848 KiB
15Time limit exceeded0/2569ms4888 KiB
16Time limit exceeded0/2565ms5132 KiB
17Time limit exceeded0/2554ms5304 KiB
18Time limit exceeded0/2574ms5252 KiB
19Time limit exceeded0/3569ms5508 KiB
20Time limit exceeded0/3566ms5460 KiB
21Time limit exceeded0/2529ms5600 KiB
22Time limit exceeded0/2574ms5676 KiB
23Time limit exceeded0/2569ms5492 KiB
24Time limit exceeded0/2573ms5448 KiB