59482023-10-06 09:13:52mmatedAranycipők (45)cpp17Accepted 45/453ms4144 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n;
    cin>>n;
    int a[n];
    int maxi=0;
    f(i,0,n)
    {
        cin>>a[i];
        if(maxi<a[i])   maxi=a[i];
    }
    cout<<maxi<<"\n";
    int c=0;
    vector<int> b;
    f(i,0,n)
        if(a[i]==maxi)
        {
            c++;
            b.push_back(i+1);
        }
    cout<<c<<"\n";
    for(auto x : b) cout<<x<<"\n";
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1860 KiB
2Accepted0/03ms2188 KiB
3Accepted3/32ms2432 KiB
4Accepted3/33ms2472 KiB
5Accepted3/33ms2712 KiB
6Accepted3/33ms2896 KiB
7Accepted3/33ms3112 KiB
8Accepted3/33ms3492 KiB
9Accepted3/33ms3416 KiB
10Accepted3/33ms3496 KiB
11Accepted3/33ms3492 KiB
12Accepted3/33ms3756 KiB
13Accepted3/33ms3872 KiB
14Accepted3/33ms3964 KiB
15Accepted3/33ms3936 KiB
16Accepted3/33ms4144 KiB
17Accepted3/33ms4032 KiB