89062024-02-03 23:57:46phiterrAranycipők (45)cpp17Accepted 45/454ms3620 KiB
#include <bits/stdc++.h>

using namespace std;

int main() {
    int length = 0;
    int biggest = 0;
    cin >> length;
    vector<int > players (0,0 );
    vector<int> goals (length,0);
    for(int i = 0; i<length; i++ ) {
        cin >> goals[i];
        if(goals[i] == biggest){
            players.push_back(i+ 1);
        }
        if(goals[i] > biggest) {
            biggest = goals[i];
            players.clear();
            players.push_back(i + 1);
        }

    }
    cout << biggest <<endl;
    cout << players.size() <<endl;

    for(int player : players){
        cout << player <<endl;
    }
    return 0;
};
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1812 KiB
2Accepted0/03ms2196 KiB
3Accepted3/33ms2316 KiB
4Accepted3/32ms2408 KiB
5Accepted3/33ms2536 KiB
6Accepted3/32ms2752 KiB
7Accepted3/33ms2888 KiB
8Accepted3/32ms2912 KiB
9Accepted3/33ms3072 KiB
10Accepted3/34ms3084 KiB
11Accepted3/33ms3160 KiB
12Accepted3/33ms3044 KiB
13Accepted3/33ms3176 KiB
14Accepted3/33ms3416 KiB
15Accepted3/34ms3464 KiB
16Accepted3/33ms3520 KiB
17Accepted3/33ms3620 KiB