题解
2024-11-24 22:09:10
发布于:广东
2阅读
0回复
0点赞
#include <bits/stdc++.h> // 万能头文件
using namespace std;
struct xzr {
string name; // 姓名
int cheng; // 性别
string n; // 身份证号
};
int main() {
int n;
cin >> n;
vector<xzr> people(n); // 使用 vector 存储人员
for(int i = 0; i < n; i++) {
cin >> people[i].name >> people[i].cheng >> people[i].n;
}
for (int i = 0; i < n;i++) {
if (people[i].cheng == 1){
cout << people[i].name << " " << people[i].n << endl;
}
}
return 0;
}
这里空空如也
有帮助,赞一个