124652024-12-18 11:03:32szasztundeAranycipők (45)cpp17Accepted 45/452ms560 KiB
#include <iostream>
#include <set>
using namespace std;

set <int> ssz;

int main()
{
    int n;
    cin>>n;
    int g,maxg=0;
    for(int i=1;i<=n;i++){
        cin>>g;
        if(g>maxg){
                maxg=g;
                ssz.clear();
                ssz.insert(i);
        } else if(g==maxg) ssz.insert(i);
    }
    cout<<maxg<<"\n"<<ssz.size()<<"\n";
    set<int>::iterator i;
    for (i=ssz.begin();i!=ssz.end();i++)
        cout<<*i<<"\n";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/01ms320 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms508 KiB
4Accepted3/31ms320 KiB
5Accepted3/31ms320 KiB
6Accepted3/31ms320 KiB
7Accepted3/31ms560 KiB
8Accepted3/31ms320 KiB
9Accepted3/31ms336 KiB
10Accepted3/31ms320 KiB
11Accepted3/31ms320 KiB
12Accepted3/31ms320 KiB
13Accepted3/31ms320 KiB
14Accepted3/31ms336 KiB
15Accepted3/32ms500 KiB
16Accepted3/31ms320 KiB
17Accepted3/31ms320 KiB