114332024-09-17 07:22:21madvirAranycipők (45)cpp17Accepted 45/454ms632 KiB
#include <iostream>
#include <set>

using namespace std;

int main()
{
    int n, maxi=1, x=0;
    cin >> n;
    set<int> index;
    int a[n], s[n];
    for(int i=0; i<n; i++) {
        cin >> a[i];
        if(a[i]>maxi) maxi=a[i];
    }
    cout<< maxi << endl;
    for(int i=0; i<n; i++) {
        if(a[i]==maxi) {
            s[x]=i+1;
            x++;
        }
    }
    cout << x << endl;
    for(int i=0; i<x; i++) {
        cout << s[i] << endl;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms360 KiB
2Accepted0/03ms408 KiB
3Accepted3/33ms512 KiB
4Accepted3/33ms360 KiB
5Accepted3/32ms504 KiB
6Accepted3/33ms384 KiB
7Accepted3/32ms360 KiB
8Accepted3/32ms360 KiB
9Accepted3/32ms360 KiB
10Accepted3/34ms504 KiB
11Accepted3/33ms632 KiB
12Accepted3/32ms256 KiB
13Accepted3/33ms384 KiB
14Accepted3/34ms360 KiB
15Accepted3/34ms504 KiB
16Accepted3/33ms488 KiB
17Accepted3/34ms376 KiB