NOIP T1 O(nmlogm)O(nm \log m)O(nmlogm) 能过吗?
就是:
for (int i = 1; i <= n; i++) { cin >> s[i]; sort(s[i].begin(), s[i].end()); }