第一次用结构体~~

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

const int MAXN = 1001;

struct Student{
long long id;
int examSeat;
}testSeat[MAXN];

int main(int argc, char** argv) {

int n, m, seat, examSeat; //n是考生数,m是待查询的个数
long long id;
cin >> n;

while(n--){
scanf("%lld %d %d", &id, &seat, &examSeat);
testSeat[seat].id = id;
testSeat[seat].examSeat = examSeat;
}

cin >> m;
while(m--){
cin >> seat;
printf("%lld %d\n", testSeat[seat].id, testSeat[seat].examSeat);
}


return 0;
}