50512023-04-11 20:30:52CattAranycipők (45)cpp17Accepted 45/454ms4316 KiB
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n, max_goals = 0, num_winners = 0;
    vector<int> goals;
    cin >> n;
    for (int i = 0; i < n; i++) {
        int g;
        cin >> g;
        goals.push_back(g);
        max_goals = max(max_goals, g);
    }
    for (int i = 0; i < n; i++) {
        if (goals[i] == max_goals) {
            num_winners++;
        }
    }
    cout << max_goals << endl;
    cout << num_winners << endl;
    for (int i = 0; i < n; i++) {
        if (goals[i] == max_goals) {
            cout << i+1 << endl;
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1964 KiB
2Accepted0/03ms2120 KiB
3Accepted3/33ms2220 KiB
4Accepted3/33ms2472 KiB
5Accepted3/33ms2968 KiB
6Accepted3/33ms2904 KiB
7Accepted3/33ms3116 KiB
8Accepted3/33ms3204 KiB
9Accepted3/33ms3548 KiB
10Accepted3/33ms3568 KiB
11Accepted3/33ms3724 KiB
12Accepted3/33ms3732 KiB
13Accepted3/33ms3944 KiB
14Accepted3/33ms4176 KiB
15Accepted3/34ms4232 KiB
16Accepted3/33ms4316 KiB
17Accepted3/33ms4192 KiB