124422024-12-18 07:31:09feheristvanAranycipők (45)cpp17Accepted 45/452ms508 KiB
#include <iostream>
#include <bits/stdc++.h>

using namespace std;

void be(vector <int> &a){
    int n;
    cin >> n;
    int x, maxx = 0;
    for(int i = 0; i < n ; i ++){
        cin >> x;
        if(x > maxx){
            a.resize(0);
            a.push_back(i + 1);
            maxx = x;
        } else if(x == maxx){
            a.push_back(i + 1);
        }
    }
    cout << maxx << endl ;
    cout << a.size() << endl;
}

void kiir(vector <int> a){
    for(auto i : a){
        cout << i << endl;
    }
}

int main()
{
    vector <int> a;
    be(a);
    kiir(a);
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/01ms320 KiB
2Accepted0/01ms500 KiB
3Accepted3/31ms320 KiB
4Accepted3/31ms320 KiB
5Accepted3/31ms352 KiB
6Accepted3/31ms320 KiB
7Accepted3/31ms320 KiB
8Accepted3/31ms320 KiB
9Accepted3/31ms320 KiB
10Accepted3/32ms320 KiB
11Accepted3/31ms508 KiB
12Accepted3/31ms320 KiB
13Accepted3/31ms320 KiB
14Accepted3/32ms508 KiB
15Accepted3/32ms320 KiB
16Accepted3/31ms500 KiB
17Accepted3/32ms320 KiB