74512024-01-09 09:07:50gyjazminAranycipők (45)cpp17Accepted 45/454ms3564 KiB
#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int maxi=0;
    vector<int> jat(n+1);
    for(int i=1;i<n+1;i++){
        int j;
        cin >> j;
        //cout <<j <<endl;
        if(j>maxi){
            maxi=j;
            //cout <<j <<endl;
        }
        jat[i]=j;
    }

    vector<int> nyer;
    for(int i=1;i<n+1;i++){
        if(jat[i]==maxi){
            nyer.push_back(i);
        }
    }
    cout << maxi << endl;
    cout << nyer.size() <<endl;
    for(int i=0;i<nyer.size();i++){
        cout << nyer[i] <<endl;
    }
    return 0;
}

SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1956 KiB
2Accepted0/03ms2208 KiB
3Accepted3/33ms2420 KiB
4Accepted3/33ms2660 KiB
5Accepted3/33ms2752 KiB
6Accepted3/33ms2848 KiB
7Accepted3/33ms2888 KiB
8Accepted3/33ms3100 KiB
9Accepted3/33ms3372 KiB
10Accepted3/34ms3372 KiB
11Accepted3/33ms3336 KiB
12Accepted3/33ms3340 KiB
13Accepted3/33ms3352 KiB
14Accepted3/33ms3440 KiB
15Accepted3/34ms3564 KiB
16Accepted3/33ms3540 KiB
17Accepted3/34ms3448 KiB