131292025-01-06 17:47:03simon0219Áruszállítás üres szakaszaicpp17Wrong answer 0/50400ms4344 KiB
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main() {

int N;
cin>>N;
vector<int>S(N);
for(int i = 0; i <N;i++){
    cin>>S[i];
}
pair<int,int>meg;
int b=0;
for(int i = 0;i<N;i++){
    for(int o = i;o<N;o++){
        if(S[i]>S[o]){
            if(b<(o-i)){
                b=o-i;
                meg.first=i+1;
                meg.second=o+1;
            }
        }
    }
}
cout<<meg.first<<" "<<meg.second;


}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/01ms508 KiB
2Time limit exceeded0/0386ms4148 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/21ms316 KiB
8Wrong answer0/21ms316 KiB
9Wrong answer0/21ms316 KiB
10Wrong answer0/21ms316 KiB
11Time limit exceeded0/2400ms564 KiB
12Time limit exceeded0/2400ms564 KiB
13Time limit exceeded0/3400ms564 KiB
14Time limit exceeded0/3388ms1076 KiB
15Time limit exceeded0/3377ms1268 KiB
16Time limit exceeded0/3377ms4344 KiB
17Time limit exceeded0/3377ms4148 KiB
18Time limit exceeded0/3382ms4148 KiB
19Time limit exceeded0/3381ms2036 KiB
20Time limit exceeded0/3382ms2356 KiB
21Time limit exceeded0/3381ms4148 KiB
22Time limit exceeded0/3384ms4148 KiB