Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <cstring>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- vector<pair<pair<int, string>, vector<int> > > v;
- for(int i = 0; i < n; i++) {
- string s;
- cin >> s;
- vector<int> cnt(26, 0);
- for(int j = 0; j < s.size(); j++) {
- cnt[s[j] - 'A']++;
- }
- v.push_back(make_pair(make_pair(s.size(), s), cnt));
- }
- sort(v.begin(), v.end());
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement