75572024-01-09 16:24:07AblablablaHús sütés (75 pont)cpp17Accepted 75/7554ms5384 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];
    }

    sort(szamok.begin(), szamok.end(), greater<int>());

    for(int i = 0; i < n; i++){
        szamok[i] += i;
    }

    sort(szamok.begin(), szamok.end(), greater<int>());
    cout << szamok[0] << "\n";
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms1816 KiB
2Accepted0/03ms2020 KiB
3Accepted0/026ms2712 KiB
4Accepted3/33ms2816 KiB
5Accepted3/33ms2828 KiB
6Accepted3/33ms2928 KiB
7Accepted3/33ms2964 KiB
8Accepted4/43ms3028 KiB
9Accepted4/43ms3176 KiB
10Accepted4/43ms3256 KiB
11Accepted4/43ms3388 KiB
12Accepted4/43ms3612 KiB
13Accepted4/448ms4504 KiB
14Accepted4/454ms4716 KiB
15Accepted5/550ms4932 KiB
16Accepted5/550ms4804 KiB
17Accepted5/552ms4808 KiB
18Accepted4/448ms5028 KiB
19Accepted4/448ms5020 KiB
20Accepted4/443ms5020 KiB
21Accepted4/435ms5024 KiB
22Accepted2/243ms5152 KiB
23Accepted2/221ms5384 KiB