#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
ll n;
cin>>n;
int k=floor(n/3);
map<int,int>f;
ll a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
for(int i=0;i<n;i++)
{
f[a[i]]++;
}
if(f.size()==0)
{
cout<<“No Majority Elements”;
}
else
{
for(auto t : f)
{
if(t.second>k)
{
cout<<t.first<<" ";
}
}
}
}
what’s wrong in this code…why it is not passing all the test cases