72452024-01-05 11:02:21eduka78Aranycipők (45)cpp17Accepted 45/454ms3344 KiB
#include <iostream>
#include <queue>
using namespace std;

int main()
{
    
    int i, n, m=0, db=0;
    queue<int>s;
    cin>>n;
    int a[n];
    for(i=0;i<n;i++){
        cin>>a[i];
        if(m<a[i])m=a[i];
    }
    for(i=0;i<n;i++){
        if(a[i]==m){
            db=db+1;
            s.push(i+1);
        }
    }
    cout<<m<<endl;
    cout<<db<<endl;
    for(i=0;i<db;i++){
        cout<<s.front()<<endl;
        s.pop();
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1680 KiB
2Accepted0/03ms1852 KiB
3Accepted3/33ms2064 KiB
4Accepted3/33ms2144 KiB
5Accepted3/33ms2268 KiB
6Accepted3/33ms2356 KiB
7Accepted3/33ms2356 KiB
8Accepted3/33ms2360 KiB
9Accepted3/33ms2360 KiB
10Accepted3/34ms2500 KiB
11Accepted3/33ms2728 KiB
12Accepted3/33ms2896 KiB
13Accepted3/33ms3040 KiB
14Accepted3/33ms3024 KiB
15Accepted3/33ms2984 KiB
16Accepted3/33ms3112 KiB
17Accepted3/34ms3344 KiB