39852023-03-07 15:02:49pyramisAranycipők (45)cpp11Accepted 45/454ms3752 KiB
#include <iostream>
#include <vector>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    int n;
    cin>>n;
    int golok [n];
    vector<int> aranycipo;

    int maximum = 0;

    for(int i=0; i<n; i++){
        cin>>golok[i];

    }

    for(int i=0; i<n; i++){
        if (maximum<golok[i]){
            maximum = golok[i];
        }

    }
    cout<<maximum<<endl;

    for(int i=0; i<n; i++){
        if(maximum == golok[i]){
            aranycipo.push_back(i+1);
     }


    }
    cout<<aranycipo.size()<<endl;
    for(int i=0; i<aranycipo.size(); i++){
        cout<< aranycipo [i]<<endl;
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1700 KiB
2Accepted0/03ms1864 KiB
3Accepted3/32ms2224 KiB
4Accepted3/33ms2348 KiB
5Accepted3/33ms2556 KiB
6Accepted3/32ms2588 KiB
7Accepted3/32ms2652 KiB
8Accepted3/33ms2784 KiB
9Accepted3/32ms2864 KiB
10Accepted3/34ms2880 KiB
11Accepted3/33ms2868 KiB
12Accepted3/32ms2868 KiB
13Accepted3/33ms3008 KiB
14Accepted3/33ms3376 KiB
15Accepted3/33ms3444 KiB
16Accepted3/33ms3648 KiB
17Accepted3/34ms3752 KiB