标签:names for out ret pre string form std ali
#include<stdio.h>
#include<iostream>
#include<string>
using namespace std;
struct StudentInfo {
string ID;
int testID, formalID;
}StudentInfo[1010];
int main() {
int n, m, a;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> StudentInfo[i].ID >> StudentInfo[i].testID >> StudentInfo[i].formalID;
}
cin >> m;
for (int i = 0; i < m; i++) {
cin >> a;
for (int j = 0; j < n; j++) {
if (a == StudentInfo[j].testID) cout << StudentInfo[j].ID << ‘ ‘ << StudentInfo[j].formalID << endl;
}
}
return 0;
}
标签:names for out ret pre string form std ali
原文地址:https://www.cnblogs.com/Yaxadu/p/10364540.html