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

PROGRAMMING:Lead the equipment

Luz5年前 (2021-05-10)题库541
Brother Honghong recently took a part-time job in a game company, responsible for data management in the background. The company's game is in its second anniversary recently. In order to thank the players for their long-term support, the president of the company decided to give the players a big reward of gratitude. During the activity, as long as you log in to the game, you can get rare equipment (rare equipment is also divided into stars, the higher the star, the better). The specific implementation method is as follows: each player gets a number card with his own player number, and then exchanges it for rare equipment. Note: the bad taste of the president comes. The bigger the number plate, the better. The bigger the number plate, the higher the star level of the equipment. The star level is randomly generated. Brother Hong's mission is to distribute equipment to players according to the generated data. Can you program to help brother Hong solve this problem?
###Input format:
Enter the first line to give a positive integer   N (≤ 1000), representing the number of players participating in the game.
subsequently   N   Line, each line gives a player's information: player number, equipment star. The player number is composed of 14 digits, and the number plate is from 1 to 2   N   No. Input to ensure that each player number is different.
After player information, give a positive integer   M (≤ n), given in the following line   M   Player numbers to be queried, separated by spaces.
###Output format:
Corresponding to each number plate to query, output the corresponding player number and equipment star in a line, separated by a space in the middle.
###Input example:
Here is a set of inputs. For example:
```in
four
10120150912233 2 4
10120150912119 4 1
10120150912126 1 3
10120150912002 3 2
two
3 4
```
###Output example:
The corresponding output is given here. For example:
```out
10120150912002 2
10120150912119 1
```







answer:If there is no answer, please comment