蓝桥杯 找到最多的数
#include <bits/stdc++.h>
using namespace std;
map<int,int>m1;
int main()
{
  ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
  int n,m;
  cin >> n >> m;
  for(int i=1;i<=n*m;++i)
  {
    int x;
    cin >> x;
    m1[x]++;
  }
  for(auto &[x,y] : m1)
  {
    if(2*y>n*m)
    cout << x << '\n';
  }
  return 0;
}
 
                     
                    
                 
                    
                 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号