60232023-10-25 15:54:17KCsengeInverziócpp14Wrong answer 10/50582ms7784 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,i,j=0;
    cin>>n;
    int tomb[n+1];
    int b=1,jobb=n;
    for(i=1;i<=n;i++)
    {
        cin>>tomb[i];
    }
   if(tomb[b]>tomb[jobb])
        {
            cout<<b<< " "<<n;
            j=1;
        }
    else
    for(i=1;i<n;i++)
    {
        jobb=n-i;
        b=1;
          while(tomb[b]<=tomb[jobb]&&jobb<=n&&j!=1)
         {
             //cout<<i<<" "<<b<<" "<<jobb<<" "<<endl;
           b++;
           jobb++;
           /*
           if(tomb[b]>tomb[jobb])
           {
            cout<<b<< "bb "<<n;
            j=1;
            break;
           }
           */
         }
         if(tomb[b]>tomb[jobb])
           {
            cout<<b<< " "<<jobb;
            j=1;
            break;
           }

    }
    if(j==0)
    cout<<-1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base10/50
1Accepted0/03ms1872 KiB
2Wrong answer0/0232ms2516 KiB
3Accepted1/12ms2280 KiB
4Accepted2/23ms2364 KiB
5Accepted7/73ms2488 KiB
6Wrong answer0/2210ms3148 KiB
7Time limit exceeded0/2582ms3904 KiB
8Wrong answer0/2178ms6884 KiB
9Wrong answer0/2181ms7144 KiB
10Wrong answer0/2177ms6880 KiB
11Wrong answer0/2177ms7008 KiB
12Wrong answer0/2172ms7048 KiB
13Wrong answer0/2178ms7104 KiB
14Wrong answer0/2177ms6984 KiB
15Wrong answer0/2372ms7112 KiB
16Wrong answer0/2177ms7176 KiB
17Wrong answer0/2178ms7184 KiB
18Wrong answer0/2180ms7528 KiB
19Wrong answer0/3367ms7484 KiB
20Time limit exceeded0/3566ms4720 KiB
21Time limit exceeded0/2561ms4936 KiB
22Wrong answer0/2177ms7784 KiB
23Wrong answer0/2178ms7688 KiB
24Time limit exceeded0/2565ms4928 KiB