jakaria_hossain

Toph - word count

Oct 2nd, 2018
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define fast()(ios_base::sync_with_stdio(false),cin.tie(NULL));
  4. map<string,int>mp;
  5. string ans;
  6. int mx=0;
  7. void counting(string s)
  8. {
  9. mp[s]++;
  10. if(mp[s]>mx)mx=mp[s],ans=s;
  11. }
  12. int main()
  13. {
  14. string a;
  15. while(cin>>a)counting(a);
  16. return cout<<ans<<endl,0;
  17. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×