Soj. Me/1825.
// Problem #: 1825 // submission #: 1211578 // the source code is licensed under Creative Commons Attribution-non1_cial-since Alike 3.0 unported license // URI: http://creativecommons.org/licenses/by-nc-sa/3.0/// all copyright reserved by informatic lab of Sun Yat-sen University # include <iostream> # include <string> # include <map> # include <set> # include <cctype> using namespace STD; string arr [100001]; int Main () {int t; CIN> T; while (t --) {Map <string, int> m; set <string> S; int N; CIN> N; string temp; For (INT I = 0; I <n; I ++) {CIN> temp; For (Int J = 0; j <temp. length (); j ++) if (isupper (temp [J]) temp [J] = tolower (temp [J]); arr [I] = temp; if (S. count (ARR [I]) = 0) {S. insert (ARR [I]); m [arr [I] = 1;} else M [arr [I] ++;} while (! S. empty () {cout <* s. begin () <"" <m [* s. begin ()] <Endl; S. erase (S. begin ();} cout <Endl;} return 0 ;}