36032023-03-01 09:50:36AblablablaInverziócpp17Wrong answer 2/50175ms8032 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> szamok(n, 0);
    for(int i = 0; i < n; i++){
        cin >> szamok[i];
    }

    int maxi = 0;
    int indk, indn;
    for(int i = 0; i < n; i++){
        if(maxi > n - i - 1){
            break;
        }
        for(int j = n - 1; j > i; j++){
            if(j - i > maxi){
                maxi = j - i;
                indk = i + 1;
                indn = j + 1;
                break;
            }
        }
    }

    cout << indk << " " << indn;
}
SubtaskSumTestVerdictTimeMemory
base2/50
1Accepted0/03ms1684 KiB
2Wrong answer0/017ms2164 KiB
3Wrong answer0/13ms2140 KiB
4Accepted2/23ms2388 KiB
5Wrong answer0/73ms2484 KiB
6Wrong answer0/217ms3008 KiB
7Wrong answer0/2173ms6860 KiB
8Wrong answer0/2173ms7188 KiB
9Wrong answer0/2173ms7248 KiB
10Wrong answer0/2173ms7504 KiB
11Wrong answer0/2173ms7820 KiB
12Wrong answer0/2171ms7512 KiB
13Wrong answer0/2174ms7668 KiB
14Wrong answer0/2174ms7672 KiB
15Wrong answer0/2173ms7620 KiB
16Wrong answer0/2174ms7456 KiB
17Wrong answer0/2173ms7456 KiB
18Wrong answer0/2173ms7452 KiB
19Wrong answer0/3173ms7456 KiB
20Wrong answer0/3174ms7456 KiB
21Wrong answer0/2174ms7452 KiB
22Wrong answer0/2175ms7708 KiB
23Wrong answer0/2174ms8032 KiB
24Wrong answer0/2173ms7988 KiB