1041 考试座位号
#include <iostream>
using namespace std;
struct student
{
string name;
int num1, num2;
} stu[1005];
int main()
{
int N;
cin >> N;
for (int i = 0; i < N; i++)
cin >> stu[i].name >> stu[i].num1 >> stu[i].num2;
int M;
cin >> M;
int a;
for (int i = 0; i < M; i++)
{
cin >> a;
for (int j = 0;; j++)
{
if (stu[j].num1 == a)
{
cout << stu[j].name << " " << stu[j].num2 << endl;
break;
}
}
}
}