jakaria_hossain

Codeforce - Registration system

Oct 7th, 2018
136
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n;
  6. cin>>n;
  7. cin.ignore();
  8. map<string,int>mp;
  9. string s;
  10. while(n--)
  11. {
  12. getline(cin,s);
  13. if(mp[s]==0)
  14. {
  15. printf("OK\n");
  16. mp[s]++;
  17. }
  18. else
  19. {
  20. cout<<s<<mp[s]<<endl;
  21. mp[s]++;
  22. }
  23. s.clear();
  24. }
  25. return 0;
  26. }
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.

×