解
2024-02-02 18:24:27
发布于:浙江
8阅读
0回复
0点赞
#include<iostream>
using namespace std;
struct info{
int id;
string name;
string number;
string number2;
}info[100];
int main(){
int n,a,b;
string c;
cin >> n;
for(int i=1;i<=n*3;i++){
cin >> a >> b >> c;
info[a].id=a;
if(b==2)
info[a].name=c;
else if(b==3)
info[a].number=c;
else if(b==4)
info[a].number2=c;
}
for(int i=1;i<=n;i++)
cout << info[i].id << " " << info[i].name << " " << info[i].number << " " << info[i].number2 << endl;
}
这里空空如也
有帮助,赞一个