40432023-03-09 17:30:47balaaaazsAranycipők (45)cpp14Accepted 45/454ms4240 KiB
#include <bits/stdc++.h>

using namespace std;

int legn(vector<int> v)
{
    int legn=v.at(0);
    for(int x:v)
        if(legn<x)
            legn=x;
    return legn;
}

int main()
{
    int n;
    cin>>n;
    vector<int> gol(n);
    for(int i=0;i<n;i++)
        cin>>gol.at(i);
    int r=legn(gol);
    cout<<r<<endl;
    cout<<count(gol.begin(),gol.end(),r)<<endl;
    for(int i=0;i<n;i++)
    {
        if(gol.at(i)==r)
            cout<<i+1<<endl;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1812 KiB
2Accepted0/03ms2008 KiB
3Accepted3/33ms2216 KiB
4Accepted3/33ms2428 KiB
5Accepted3/33ms2668 KiB
6Accepted3/32ms2724 KiB
7Accepted3/32ms2724 KiB
8Accepted3/33ms2852 KiB
9Accepted3/33ms3208 KiB
10Accepted3/34ms3188 KiB
11Accepted3/33ms3388 KiB
12Accepted3/32ms3464 KiB
13Accepted3/33ms3468 KiB
14Accepted3/33ms3600 KiB
15Accepted3/33ms3816 KiB
16Accepted3/33ms4044 KiB
17Accepted3/34ms4240 KiB