74852024-01-09 10:24:18adamAranycipők (45)cpp17Elfogadva 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;
}
RészfeladatÖsszpontTesztVerdiktIdőMemória
base45/45
1Elfogadva0/03ms1812 KiB
2Elfogadva0/03ms2064 KiB
3Elfogadva3/33ms2244 KiB
4Elfogadva3/33ms2456 KiB
5Elfogadva3/33ms2704 KiB
6Elfogadva3/33ms2724 KiB
7Elfogadva3/33ms2724 KiB
8Elfogadva3/33ms2756 KiB
9Elfogadva3/33ms2856 KiB
10Elfogadva3/33ms3068 KiB
11Elfogadva3/33ms3160 KiB
12Elfogadva3/33ms3276 KiB
13Elfogadva3/33ms3364 KiB
14Elfogadva3/33ms3636 KiB
15Elfogadva3/33ms3516 KiB
16Elfogadva3/33ms3516 KiB
17Elfogadva3/33ms3516 KiB