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

PROGRAMMING:Follow quietly

Luz5年前 (2021-05-10)题库473
There is a "quietly following" on Sina Weibo. A user who quietly follows doesn't appear on the user's following list, but the system will push the microblog published by the person who quietly follows to the user. Now let's be an Internet detective. According to someone's following list and their likes to other users, we can pick out the people who may be quietly followed by them.
###Input format:
Input: first, give a user's attention list in the first line. The format is as follows:
```
Number n user 1 user 2... User n
```
Where 'n' is a positive integer no more than 5000, and each 'user I' ('I '= 1,...,'n') is the ID of the user concerned. It is a 4-digit string composed of numbers and English letters, separated by spaces.
After that, the user's like information is given: first, a positive integer'm 'not exceeding 10000 is given, and then'm' lines are given. Each line gives a user ID and the number of likes (not exceeding 1000) to the user, separated by spaces. Note: the user ID is the unique identity of a user. The title guarantees that there are no duplicate users in the following list, and there are no duplicate users in the like information.
###Output format:
We think that the people who are liked more than the average number of times and are not on the following list are likely to be the people they follow quietly. According to this assumption, please output the user ID in ascending order, which may be the person they quietly follow, one ID per line. If there is no such person, output "Bing Mei you".
###Input sample 1:
```in
10 GAO3 Magi Zha1 Sen1 Quan FaMK LSum Eins FatM LLao
eight
Magi 50
Pota 30
LLao 3
Ammy 48
Dave 15
GAO3 31
Zoro 1
Cath 60
```
###Output sample 1:
```out
Ammy
Cath
Pota
```
###Input example 2:
```
11 GAO3 Magi Zha1 Sen1 Quan FaMK LSum Eins FatM LLao Pota
seven
Magi 50
Pota 30
LLao 48
Ammy 3
Dave 15
GAO3 31
Zoro 29
```
###Output example 2:
```
Bing Mei You
```






answer:If there is no answer, please comment