#includebits/stdc.h using namespace std; int main(){ int q; cinq; int a0; int b0; mapstring,unordered_setstringcnt; while(q--){ int op; cinop; if(op1){ string x,y; cinxy; cnt[x].insert(y);//同一个小岛上存不同的宝藏 } else if(op2){ string x; cinx; if(!cnt.count(x))//map的判断存不存在 cout0endl; else coutcnt[x].size()endl; } else if(op3){ string x,y; cinxy; if(!cnt.count(x))//set的判断存不存在 cout0endl; else coutcnt[x].count(y)endl; } else if(op4){ coutcnt.size()endl; }} return 0; }#includebits/stdc.h using namespace std; #define int long long #define endl \n #define pii pairint,int #define fi first #define se second const int N1e21; int a[N],b[N],c[N]; typedef long long ll; void solve(){ int n,m; cinnm; vectorvectorstringss(n1); while(m--){ int op; cinop; int x; string s; if(op1) { cinxs; ss[x].push_back(s);//同一个实验不同的学号 } int l1,r1,l2,r2; if(op2) { cinl1r1l2r2; swap(ss[l1][r1-1],ss[l2][r2-1]);//让固定位置的两个学号交换 } } for(int i1;in;i){ coutss[i].size(); int ass[i].size(); /*for(int j1;ja;j){ cout ss[i][j]; }*/ for(auto x:ss[i]) { cout x; } coutendl; } } signed main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); int _1; while(_--) solve(); return 0; }