77612024-01-11 08:43:12csaron71Aranycipők (45)cpp17Accepted 45/453ms3928 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> v;
    int mgol=0;
    for (int i=0; i<n; i++) {
        int x;
        cin >> x;
        mgol=max(mgol, x);
        v.push_back(x);
    }
    vector<int> vege;
    for (int i=0; i<n; i++) {
        if (v[i]==mgol) {
            vege.push_back(i+1);
        }
    }
    cout << mgol << "\n" << vege.size() << "\n";
    for (int i=0; i<vege.size(); i++) {
        cout << vege[i] << "\n";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1992 KiB
2Accepted0/03ms2248 KiB
3Accepted3/33ms2456 KiB
4Accepted3/33ms2544 KiB
5Accepted3/33ms2532 KiB
6Accepted3/33ms2744 KiB
7Accepted3/33ms2996 KiB
8Accepted3/33ms2980 KiB
9Accepted3/33ms3256 KiB
10Accepted3/33ms3448 KiB
11Accepted3/33ms3448 KiB
12Accepted3/33ms3560 KiB
13Accepted3/33ms3776 KiB
14Accepted3/33ms3780 KiB
15Accepted3/33ms3824 KiB
16Accepted3/33ms3924 KiB
17Accepted3/33ms3928 KiB