74522024-01-09 09:22:25rancealexkriszAranycipők (45)cpp17Accepted 45/454ms4072 KiB
#include <iostream>

using namespace std;

int main()
{
    int gol[101] = {0};

    int n,x,max=0;
    cin>>n;
    int jat[n] = {0};
    for(int i=1;i<=n;i++)
    {
       cin>>x;
       gol[x]++;
       if(max<x) max=x;
       jat[i]=x;

    }
    cout<<max<<endl;
    cout<<gol[max]<<endl;
    for(int i=1;i<=n;i++)
    {
        if(jat[i]==max) cout<<i<<endl;
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1900 KiB
2Accepted0/03ms1956 KiB
3Accepted3/33ms2148 KiB
4Accepted3/33ms2356 KiB
5Accepted3/33ms2548 KiB
6Accepted3/33ms2768 KiB
7Accepted3/33ms2848 KiB
8Accepted3/33ms2976 KiB
9Accepted3/33ms3224 KiB
10Accepted3/34ms3272 KiB
11Accepted3/33ms3420 KiB
12Accepted3/33ms3468 KiB
13Accepted3/33ms3684 KiB
14Accepted3/33ms3920 KiB
15Accepted3/33ms3928 KiB
16Accepted3/33ms3928 KiB
17Accepted3/34ms4072 KiB