文章
105
粉丝
69
获赞
117
访问
56.8k
#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int n, m;
struct student{
string id;
string name;
string gender;
int age;
}s[N];
int main()
{
cin >> n;
for(int i = 1; i <= n; i ++)
cin >> s[i].id >> s[i].name >> s[i].gender >> s[i].age;
cin >> m;
while(m --)
{
string id;
cin >> id;
bool t = false;
for(int i = 1; i <= n; i ++)
if(s[i].id == id)
{
cout << s[i].id << " " << s[i].name << " " << s[i].gender << " " << s[i].age << endl;
t = true;
}
if(!t) cout << "No Answer!" << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发