Thursday, October 9, 2014

ACM 1496. Spammer / Спамер

C++ map handles this problem perfectly. Keep a map of type<string,int> and increase the corresponding string element in this map by 1 after reading each name. Then loop over all the elements of the map and check if the current one has a value greater than 2 output that word and continue.


       FULL SOURCE CODE

No comments:

Post a Comment