SHARE
TWEET

Untitled

a guest Dec 13th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //H
  2. #include <bits/stdc++.h>
  3. int main()
  4. {
  5.     int n,i,j=0;
  6.     std::cin>>n;
  7.     std::map <int,int> a;
  8.     while (n--)
  9.     {
  10.         std::cin>>i;
  11.         if (a[j]<++a[i])
  12.             j=i;
  13.     }
  14.     std::cout<<j;
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top