74852024-01-09 10:24:18adamAranycipők (45)cpp17Accepted 45/453ms3636 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    
    int player_count = 0;

    cin >> player_count;
    vector<int> players(player_count, 0);

    int most_goal = 0;

    for (int i = 0; i < player_count; i++)
    {
        cin >> players[i];
        most_goal = max(most_goal, players[i]);
    }

    cout << most_goal << "\n";

    int count = 0;

    for (int i = 0; i < player_count; i++) {
        if (players[i] == most_goal) {
            count++;
        }
    }
    cout << count << "\n";

    for (int i = 0; i < player_count; i++) {
        if (players[i] == most_goal) {
            cout << i+1 << "\n";
        }
    }


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1812 KiB
2Accepted0/03ms2064 KiB
3Accepted3/33ms2244 KiB
4Accepted3/33ms2456 KiB
5Accepted3/33ms2704 KiB
6Accepted3/33ms2724 KiB
7Accepted3/33ms2724 KiB
8Accepted3/33ms2756 KiB
9Accepted3/33ms2856 KiB
10Accepted3/33ms3068 KiB
11Accepted3/33ms3160 KiB
12Accepted3/33ms3276 KiB
13Accepted3/33ms3364 KiB
14Accepted3/33ms3636 KiB
15Accepted3/33ms3516 KiB
16Accepted3/33ms3516 KiB
17Accepted3/33ms3516 KiB