25672023-01-17 13:55:01gkataKéséscpp17Wrong answer 0/5048ms4564 KiB
#include <iostream>
//#include <fstream>
#include <vector>
#include <climits>
#define ll long long

using namespace std;

//ifstream cin("keses.in");
//ofstream cout("keses.out");

vector<ll>x;
vector<ll>y;
ll n,i,a,maxi=LLONG_MIN,pos;
int main()
{
    cin>>n;
    x.resize(10000);
    for(i=0;i<n;++i)
    {
        cin>>a;
        ++x[a];
    }
    for(auto &e:x) if(e) y.push_back(e);
    for(i=0;i<y.size();++i)
    {
        if(y[i]>maxi)
        {
            maxi=y[i];
            pos=i;
        }
    }

    cout<<pos+1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Accepted0/03ms2080 KiB
2Wrong answer0/08ms2528 KiB
3Wrong answer0/52ms2492 KiB
4Wrong answer0/52ms2684 KiB
5Wrong answer0/548ms2980 KiB
6Wrong answer0/548ms3180 KiB
7Runtime error0/42ms3224 KiB
8Runtime error0/42ms3464 KiB
9Runtime error0/42ms3716 KiB
10Runtime error0/42ms3924 KiB
11Runtime error0/42ms3868 KiB
12Runtime error0/22ms3992 KiB
13Runtime error0/22ms4076 KiB
14Runtime error0/12ms4208 KiB
15Runtime error0/12ms4280 KiB
16Runtime error0/12ms4280 KiB
17Runtime error0/12ms4360 KiB
18Runtime error0/12ms4484 KiB
19Runtime error0/12ms4564 KiB