题目链接
AC代码
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<string>
#include<map>
#include<stack>
using namespace std
;
typedef long long ll
;
const int maxn
=1e6;
struct stu
{
string num
;
int sh
;
int k
;};
stu s
[1005];
int main()
{
int n
,m
,ss
;
cin
>>n
;
for(int i
=0;i
<n
;i
++)
{
cin
>>s
[i
].num
>>s
[i
].sh
>>s
[i
].k
;
}
cin
>>m
;
while(m
--)
{
cin
>>ss
;
for(int i
=0;i
<n
;i
++)
{
if(s
[i
].sh
==ss
)
{
cout
<<s
[i
].num
<<" "<<s
[i
].k
<<endl
;
break;
}
}
}
return 0;
}
转载请注明原文地址: https://lol.8miu.com/read-8026.html