Alice is playing an arcade game and wants to climb to the top of the leaderboard. Can you help her track her ranking as she plays? The game uses Dense Ranking, so its leaderboard works like this:
The player with the highest score is ranked number on the leaderboard.
Players who have equal scores receive the same ranking number, and the next player(s) receive the immediately following ranking number.
We want to determine Alice's rank as she progresses up the leaderboard. For example, the four players on the leaderboard have high scores of , , , and . Those players will have ranks , , , and , respectively. If Alice's scores are , and , her rankings after each game are , and .
You are given an array, , of monotonically decreasing leaderboard scores, and another array, , of Alice's scores for the game. You must print integers. The integer should indicate the current rank of alice after her game.
The first line contains an integer , the number of players on the leaderboard.
The next line contains space-separated integers , the leaderboard scores in decreasing order.
The next line contains an integer, , denoting the number games Alice plays.
The last line contains space-separated integers , her game scores.
The existing leaderboard, , is in descending order.
Alice's scores , are in ascending order.
For of the maximum score:
Print integers. The integer should indicate the rank of alice after playing the game.