40452023-03-09 17:37:46reckaAranycipők (45)cpp11Wrong answer 1/453ms4200 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int N,K=0;
    cin>>N;
    vector<int>gol(N);
    for(int i=0;i<N;i++)
        cin>>gol.at(i);
    int nagy=gol.at(0);
    for(int i=0;i<N;i++)
        if(gol.at(i)>nagy)
            nagy=gol.at(i);
    for(int i=0;i<N;i++)
        if(gol.at(i)==nagy)
            K++;
    vector<int>nagyindex(K);
    int s=0;
    for(int i=0;i<N;i++)
        if(gol.at(i)==nagy)
        {
            nagyindex.at(s)=i+1;
            s++;
        }
    cout<<endl<<nagy<<endl;
    cout<<K<<endl;
    for(int i=0;i<K;i++)
        cout<<nagyindex.at(i)<<endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base1/45
1Wrong answer0/03ms1848 KiB
2Wrong answer0/03ms2016 KiB
3Wrong answer0/33ms2220 KiB
4Partially correct1/33ms2432 KiB
5Wrong answer0/33ms2788 KiB
6Wrong answer0/33ms2900 KiB
7Wrong answer0/33ms3180 KiB
8Wrong answer0/33ms3492 KiB
9Wrong answer0/33ms3696 KiB
10Wrong answer0/33ms3808 KiB
11Wrong answer0/33ms3680 KiB
12Wrong answer0/33ms3800 KiB
13Wrong answer0/33ms3956 KiB
14Wrong answer0/33ms4144 KiB
15Wrong answer0/33ms4184 KiB
16Wrong answer0/33ms4200 KiB
17Wrong answer0/33ms4176 KiB