pair
2025-01-12 11:24:20
发布于:广东
0阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int n,a,b;
pair<string,pair<string,string>>l[15];
int main(){
cin >> n;
for(int i=1;i<=3*n;i++){
string c;
cin >> a >> b >> c;
if(b==2)l[a].first = c;
else if(b==3)l[a].second.first = c;
else if(b==4)l[a].second.second = c;
}for(int i=1;i<=n;i++)cout<<i<<" "<<l[i].first<<" "<<l[i].second.first<<" "<<l[i].second.second<<endl;
}
这里空空如也
有帮助,赞一个