126162024-12-26 21:29:43BucsMateAranycipők (45)cpp17Wrong answer 1/451ms560 KiB
#include <iostream>

using namespace std;

int main()
{
    int N, goals[1001], sol[1001], index = 0, maxim = 0;
    cin >> N;
    for(int i = 0; i < N; i++){
        cin >> goals[i];
        maxim = max(maxim, goals[i]);
    }
    for(int i = 0; i < N; i++){
        if(goals[i] == maxim){
            sol[index] = goals[i];
            index++;
        }
    }
    cout << index << endl;
    for(int i = 0; i < index; i++){
        cout << sol[i] << " ";
    }
    cout << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base1/45
1Wrong answer0/01ms320 KiB
2Wrong answer0/01ms320 KiB
3Wrong answer0/31ms320 KiB
4Partially correct1/31ms320 KiB
5Wrong answer0/31ms320 KiB
6Wrong answer0/31ms332 KiB
7Wrong answer0/31ms320 KiB
8Wrong answer0/31ms320 KiB
9Wrong answer0/31ms320 KiB
10Wrong answer0/31ms320 KiB
11Wrong answer0/31ms320 KiB
12Wrong answer0/31ms320 KiB
13Wrong answer0/31ms320 KiB
14Wrong answer0/31ms320 KiB
15Wrong answer0/31ms544 KiB
16Wrong answer0/31ms560 KiB
17Wrong answer0/31ms320 KiB