40442023-03-09 17:36:45KicsenAranycipők (45)cpp17Accepted 45/453ms4192 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int a[n],i=0,x=0,b[n],y=0;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        if(x<a[i])
        {
            x=a[i];
        }
    }
    for(i=0;i<n;i++)
    {
        if(x==a[i])
        {
            b[y]=i+1;
            y++;
        }
    }
    cout<<x<<"\n"<<y<<"\n";
    for(i=0;i<y;i++)
    {
        cout<<b[i]<<"\n";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1876 KiB
2Accepted0/03ms2124 KiB
3Accepted3/33ms2336 KiB
4Accepted3/33ms2544 KiB
5Accepted3/33ms2752 KiB
6Accepted3/33ms2968 KiB
7Accepted3/33ms3180 KiB
8Accepted3/32ms3296 KiB
9Accepted3/32ms3300 KiB
10Accepted3/33ms3428 KiB
11Accepted3/33ms3508 KiB
12Accepted3/33ms3604 KiB
13Accepted3/33ms3764 KiB
14Accepted3/33ms3848 KiB
15Accepted3/33ms3848 KiB
16Accepted3/33ms3984 KiB
17Accepted3/33ms4192 KiB