51182023-04-18 16:04:51Tina0731Legmesszebbi rossz sorrendű (35 pont)cpp11Time limit exceeded 1/35300ms3872 KiB
#include <iostream>

using namespace std;

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

    int ln=-100001, tav, hely;
    for(int i=1;i+tav<n;i++)
    {
        if(t[i]>ln)
        for(int j=n;j>i+tav;j--)
        {
            if(t[i]>t[j])
            {
                hely=i;
                tav=j-i+1;
                if(ln<t[i])
                    ln=t[i];
                break;
            }
        }
    }

    cout<<hely<<" "<<tav;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base1/35
1Accepted0/03ms1872 KiB
2Time limit exceeded0/0261ms1652 KiB
3Wrong answer0/13ms2464 KiB
4Accepted1/12ms2556 KiB
5Wrong answer0/12ms2640 KiB
6Wrong answer0/13ms2884 KiB
7Wrong answer0/13ms3096 KiB
8Wrong answer0/13ms3160 KiB
9Wrong answer0/14ms3260 KiB
10Wrong answer0/16ms3476 KiB
11Wrong answer0/18ms3696 KiB
12Time limit exceeded0/2300ms3136 KiB
13Time limit exceeded0/2263ms3296 KiB
14Time limit exceeded0/2263ms3216 KiB
15Time limit exceeded0/2275ms3352 KiB
16Time limit exceeded0/2282ms3520 KiB
17Time limit exceeded0/2256ms3720 KiB
18Time limit exceeded0/2239ms3808 KiB
19Time limit exceeded0/2270ms3716 KiB
20Time limit exceeded0/2236ms3716 KiB
21Time limit exceeded0/2263ms3776 KiB
22Time limit exceeded0/2266ms3800 KiB
23Time limit exceeded0/2266ms3680 KiB
24Time limit exceeded0/2282ms3872 KiB