126172024-12-26 21:30:54BucsMateAranycipők (45)cpp17Accepted 45/452ms552 KiB
#include <iostream>

using namespace std;

int main()
{
    int N, goals[1001], sol[1001], index = 0, maxim = 0;
    cin >> N;
    for(int i = 0; i < N; i++){
        cin >> goals[i];
        maxim = max(maxim, goals[i]);
    }
    for(int i = 0; i < N; i++){
        if(goals[i] == maxim){
            sol[index] = i+1;
            index++;
        }
    }
    cout << maxim << endl << index << endl;
    for(int i = 0; i < index; i++){
        cout << sol[i] << endl;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/01ms508 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms320 KiB
4Accepted3/31ms512 KiB
5Accepted3/31ms320 KiB
6Accepted3/31ms320 KiB
7Accepted3/31ms320 KiB
8Accepted3/31ms320 KiB
9Accepted3/31ms320 KiB
10Accepted3/32ms332 KiB
11Accepted3/31ms320 KiB
12Accepted3/31ms320 KiB
13Accepted3/31ms320 KiB
14Accepted3/32ms320 KiB
15Accepted3/32ms320 KiB
16Accepted3/31ms552 KiB
17Accepted3/32ms512 KiB