C语言程序设计-1041 考试座位号

#include
using namespace std;
#include

int main(){
	
	int N;
	string stu_id[1001];           // 1100 正确,1000错误,可能因为是string,所以一定要大于1000
	int kaoshi[1001];
	
	cin >> N;
	
	while(N--){
		string ie;
		int shiji, b;
		cin >> ie >> shiji >> b;
		stu_id[shiji] = ie;
		kaoshi[shiji] = b;
	}

	
	int n;
	cin >> n;
	while(n--){
		int t;
		cin >> t;
		cout << stu_id[t] << " " << kaoshi[t] << endl;
	}
	
	
	return 0;
}

你可能感兴趣的:(C语言程序设计)