61432023-11-03 20:26:42MrChipserAranycipők (45)cpp11Accepted 45/454ms3780 KiB
#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int golok[n];
    for(int i = 0; i < n; i++)
        cin >> golok[i];
    vector<int>ciposok;
    int maxgol = 0;
    for(int i = 0; i < n; i++)
    {
        if(golok[i]>maxgol)
        {
            maxgol = golok[i];
            ciposok.clear();
            ciposok.push_back(i);
        }
        else if(golok[i]==maxgol)
            ciposok.push_back(i);
    }
    cout << maxgol << endl << ciposok.size() << endl;
    for(int i = 0; i < ciposok.size(); i++)
    {
        cout << ciposok[i]+1 << endl;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1812 KiB
2Accepted0/03ms2008 KiB
3Accepted3/33ms2224 KiB
4Accepted3/32ms2308 KiB
5Accepted3/32ms2328 KiB
6Accepted3/33ms2576 KiB
7Accepted3/33ms2788 KiB
8Accepted3/33ms2892 KiB
9Accepted3/33ms3132 KiB
10Accepted3/34ms3204 KiB
11Accepted3/33ms3304 KiB
12Accepted3/33ms3304 KiB
13Accepted3/33ms3316 KiB
14Accepted3/34ms3348 KiB
15Accepted3/34ms3432 KiB
16Accepted3/33ms3560 KiB
17Accepted3/34ms3780 KiB