-->
当前位置:首页 > 题库

PROGRAMMING:Test seat number

Luz5年前 (2021-05-10)题库458
Each pat examinee will be assigned two seat numbers, one is the test seat, the other is the test seat. Under normal circumstances, candidates will first get the seat number of the test machine when entering the test machine. After entering the test machine state, the system will display the test seat number of the candidate. Candidates need to change to the test seat during the test. But some candidates are late and the test is over. They can only ask you for help with the seat number they got and find out their seat number from the backstage.
###Input format:
Enter the first line to give a positive integer $$n $$($$Le 1000 $$), and then $$n $$lines, each line gives a candidate's information: ` admission number, test seat number, test seat number '. Among them, the "admission number" is composed of 16 digits, and the seats are numbered from 1 to $$n $. Input to ensure that everyone's admission number is different, and at no time will two people be assigned to the same seat.
After the candidate information, give a positive integer $$M $$($$Le n $$), and then give $$M $$seat numbers to be queried in the next line, separated by spaces.
###Output format:
Corresponding to the seat number of each test machine to be inquired, output the corresponding candidate's ticket number and seat number in one line, separated by a space in the middle.
###Input example:
```in
four
3310120150912233 2 4
3310120150912119 4 1
3310120150912126 1 3
3310120150912002 3 2
two
3 4
```
###Output example:
```out
3310120150912002 2
3310120150912119 1
```







answer:If there is no answer, please comment