218522026-01-14 09:23:22MrkzAranycipők (45)cpp17Accepted 45/452ms556 KiB
#include <bits/stdc++.h>

using namespace std;
struct {
    int szam;
    int gol;
}jatekos;
int N, maxi;
vector<int> megoldas;
int db;
int main()
{
    cin>>N;
    maxi=0;
    for(int i=1;i<=N;i++){
        cin>>jatekos.gol;
        if(jatekos.gol>maxi){
            maxi=jatekos.gol;
            db=1;
            megoldas.clear();
            megoldas.push_back(i);
        }
        else if(jatekos.gol==maxi){
            db++;
            megoldas.push_back(i);
        }

    }
    cout<<maxi<<endl;
    cout<<db<<endl;
    for(int i=0;i<db;i++)
        cout<<megoldas.at(i)<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/01ms508 KiB
2Accepted0/01ms508 KiB
3Accepted3/31ms316 KiB
4Accepted3/31ms316 KiB
5Accepted3/31ms316 KiB
6Accepted3/31ms316 KiB
7Accepted3/31ms316 KiB
8Accepted3/31ms316 KiB
9Accepted3/31ms316 KiB
10Accepted3/32ms500 KiB
11Accepted3/31ms316 KiB
12Accepted3/31ms316 KiB
13Accepted3/31ms500 KiB
14Accepted3/32ms404 KiB
15Accepted3/32ms316 KiB
16Accepted3/31ms316 KiB
17Accepted3/32ms556 KiB