my code is getting accepted at geeksfogeeks but not here.
#include
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
ll n,temp,flag=0;
cin>>n;
unordered_map<ll,ll>m;
for(auto i=0;i<n;i++)
{
cin>>temp;
m[temp]++;
}
for(auto x:m)
{
if(x.second>n/3){cout<<x.first<<" “;flag=1;}
}
if(flag==0)cout<<”-1";
return 0;
}
