Majority element problem

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;

}

hello @akshugoyal705
pls check ->
image

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.