#include <iostream>
#include <string>
using namespace std;
unsigned int InfoNum = 0;
unsigned int CheckNum = 0;
class StudentInfo
{
public:
string Id = "";
unsigned int TestSitID = 0;
unsigned int RealsitID = 0;
};
int main()
{
cin >> InfoNum;
StudentInfo* InfoArr = new StudentInfo[InfoNum];
for (size_t i = 0; i < InfoNum; ++i)
{
cin >> InfoArr[i].Id>> InfoArr[i].TestSitID >> InfoArr[i].RealsitID;
}
cin >> CheckNum;
unsigned int* CheckArr = new unsigned int[CheckNum];
for (size_t j = 0; j < CheckNum; ++j)
{
cin >> CheckArr[j];
}
for (size_t x = 0; x < CheckNum; ++x)
{
for (size_t y = 0; y < InfoNum; ++y)
{
if (CheckArr[x] == InfoArr[y].TestSitID)
{
cout << InfoArr[y].Id << " " << InfoArr[y].RealsitID << endl;
}
}
}
return 0;
}
PTA - L1-005 考试座位号
最新推荐文章于 2024-09-11 15:28:58 发布