#include<bits/stdc++.h> #define int long long #define s second #define f first using namespace std; const int N = 1e5+10; const int M = 1e9+7; void solve() { map<string,int> p; vector<pair<string,int>> q; string s; while(cin>>s) { p[s] ++; } //因为map不能用sort排序,所以把大于3的字符串存...