56512023-09-02 07:37:57gonterarminAranycipők (45)cpp17Accepted 45/454ms4168 KiB
#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

int main() {
    int N;
    cin>>N;
    short G[N];
    short GM[N];
    int MDB=0;
    for (int i = 0; i < N; ++i) {
        cin>>G[i];
    }
    for (int i = 0; i < N; ++i) {
        GM[i]=G[i];
    }
    sort(GM,GM+N);
    cout<<GM[N-1]<<endl;
    for (int i = 0; i < N; ++i) {
        if (G[i]==GM[N-1]) {
            MDB++;
        }
    }
    cout<<MDB<<endl;
    for (int i = 0; i < N; ++i) {
        if (G[i]==GM[N-1]) {
            cout<<i+1<<endl;
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1876 KiB
2Accepted0/03ms2236 KiB
3Accepted3/32ms2220 KiB
4Accepted3/33ms2428 KiB
5Accepted3/32ms2680 KiB
6Accepted3/33ms2896 KiB
7Accepted3/33ms3112 KiB
8Accepted3/32ms3192 KiB
9Accepted3/32ms3196 KiB
10Accepted3/33ms3440 KiB
11Accepted3/33ms3656 KiB
12Accepted3/33ms3764 KiB
13Accepted3/33ms3972 KiB
14Accepted3/33ms3980 KiB
15Accepted3/34ms4020 KiB
16Accepted3/33ms4168 KiB
17Accepted3/34ms4100 KiB