70602023-12-29 08:46:22MagyarKendeSZLGHús sütés (75 pont)cpp17Accepted 75/7523ms5048 KiB
#include <bits/stdc++.h>

#define speed cin.tie(0); ios::sync_with_stdio(0)
#define cinv(v) for (auto& e : v) cin >> e;
#define all(v) v.begin(), v.end()

using namespace std;

int main() {
    speed;

    int N, result = 0;
    cin >> N;
    vector<int> v(N);
    cinv(v);
    sort(all(v), greater<int>());
    
    for (int i = 0; i < N; i++) {
        result = max(result, (v[i] += i));
    }

    cout << result;
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms1828 KiB
2Accepted0/03ms2060 KiB
3Accepted0/013ms2580 KiB
4Accepted3/33ms2352 KiB
5Accepted3/33ms2444 KiB
6Accepted3/33ms2552 KiB
7Accepted3/33ms2908 KiB
8Accepted4/43ms2996 KiB
9Accepted4/43ms3084 KiB
10Accepted4/43ms3060 KiB
11Accepted4/43ms3568 KiB
12Accepted4/43ms3516 KiB
13Accepted4/423ms4260 KiB
14Accepted4/423ms4400 KiB
15Accepted5/521ms4612 KiB
16Accepted5/523ms4816 KiB
17Accepted5/523ms4904 KiB
18Accepted4/423ms4680 KiB
19Accepted4/423ms4936 KiB
20Accepted4/416ms4824 KiB
21Accepted4/417ms4820 KiB
22Accepted2/220ms5048 KiB
23Accepted2/210ms4900 KiB