Company: Innovacer_9nov
Difficulty: medium
Battle Royale Problem Description A battle royale match has N players and M opponents. PlayerPower[i] is the strength of player i . OppPower[j] is the strength of opponent j . coins[j] is the reward paid for defeating opponent j . A player defeats an opponent when the player's strength is greater than or equal to the opponent's strength. For every player, work out the total number of coins that player can collect. Note: A player's strength does not drop after a win, so one player can defeat every opponent they are strong enough for. The same opponent may be defeated by several players; each of them is paid in full. Complete the function findMAx , which takes PlayerPower , OppPower and coins and returns one total per player, in player order. Input Format The first line contains the integer N , the size of PlayerPower . Each of the next N lines contains one integer, the strength of a player. The next line contains the integer M , the size of OppPower . Each of the next M lines contains o