124752024-12-18 13:00:28KissCsongor777Aranycipők (45)cpp17Accepted 45/452ms556 KiB
#include <iostream>
#include <set>
using namespace std;

int main()
{
    int n,m=0,x;
    cin>>n;
    set<int> H;
    for(int i=1; i<=n; i++)
    {
        cin>>x;
        if(x>m){m=x; H.clear();H.insert(i);}
        else if(x==m)H.insert(i);
    }
    cout<<m<<endl;
    cout<<H.size()<<endl;
    for(set <int>::iterator i=H.begin();i!=H.end();i++)
    cout<<*i<<endl;

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