#include<iostream>
#include<cstdio>
#include<vector>
using namespace std;
struct stu
{
string a;
int b;
int c;
};
vector<stu> stulist;
int main()
{
int i,n,j;
stu a;
string str;
int n1,n2,now;
cin>>n;
for(i=0;i<n;i++)
{
cin>>str>>n1>>n2;
a.a=str;
a.b=n1;
a.c=n2;
stulist.push_back(a);
}
cin>>n;
for(i=0;i<n;i++)
{
cin>>now;
for(vector<stu>::iterator it=stulist.begin();it!=stulist.end();it++)
{
stu temp=*it;
if(temp.b==now)
{
cout<<temp.a<<" "<<temp.c<<endl;
break;
}
}
}
return 0;
}
pat乙1041 考试座位号
最新推荐文章于 2021-08-22 16:57:26 发布