236462026-01-27 07:37:26tamasnagyAranycipők (45)cpp17Accepted 45/452ms508 KiB
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

struct focimatyi{
    int gol;
    int index;
};
vector<focimatyi>scorer;
vector<int>topscorer;
bool cmp(focimatyi a, focimatyi b){
    return a.gol>b.gol;
}

int main()
{
    int n;
    //scorer.resize(n);
    cin>>n;
    for(int i=1; i<=n; i++){
        int a;
        cin>>a;
        scorer.push_back({a,i});
    }
    sort(scorer.begin(), scorer.end(), cmp);
    cout<<scorer[0].gol<<endl;
    int i=0;
    int db=0;
    while(scorer[i].gol==scorer[0].gol){
        topscorer.push_back(scorer[i].index);
        db++;
        i++;

    }
    cout<<db<<endl;
    sort(topscorer.begin(),topscorer.end());
    for(int j=0; j<topscorer.size();j++){
        cout<<topscorer[j]<<endl;
    }


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/01ms316 KiB
2Accepted0/01ms316 KiB
3Accepted3/31ms316 KiB
4Accepted3/31ms316 KiB
5Accepted3/31ms316 KiB
6Accepted3/31ms316 KiB
7Accepted3/31ms316 KiB
8Accepted3/31ms316 KiB
9Accepted3/31ms508 KiB
10Accepted3/32ms508 KiB
11Accepted3/32ms316 KiB
12Accepted3/31ms316 KiB
13Accepted3/31ms316 KiB
14Accepted3/32ms364 KiB
15Accepted3/32ms316 KiB
16Accepted3/31ms316 KiB
17Accepted3/32ms316 KiB