50512023-04-11 20:30:52CattAranycipők (45)cpp17Elfogadva 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;
}
RészfeladatÖsszpontTesztVerdiktIdőMemória
base45/45
1Elfogadva0/03ms1964 KiB
2Elfogadva0/03ms2120 KiB
3Elfogadva3/33ms2220 KiB
4Elfogadva3/33ms2472 KiB
5Elfogadva3/33ms2968 KiB
6Elfogadva3/33ms2904 KiB
7Elfogadva3/33ms3116 KiB
8Elfogadva3/33ms3204 KiB
9Elfogadva3/33ms3548 KiB
10Elfogadva3/33ms3568 KiB
11Elfogadva3/33ms3724 KiB
12Elfogadva3/33ms3732 KiB
13Elfogadva3/33ms3944 KiB
14Elfogadva3/33ms4176 KiB
15Elfogadva3/34ms4232 KiB
16Elfogadva3/33ms4316 KiB
17Elfogadva3/33ms4192 KiB