You are given two heroes and monsters, of lengths coins of length
heroes[i] represents the power of the monsters[j] and coins[j] represent the power of the
A hero can defeat the monsters[j]. Each hero can defeat any monster they qualify to beat and will collect all corresponding coins. Monsters can be defeated multiple times by different heroes independently.
Return an array ans of length ans[i] is the total number of coins the
Constraints:
heroes.length
monsters.length
coins.length
heroes[i], monsters[i], coins[i]
You are given two heroes and monsters, of lengths coins of length
heroes[i] represents the power of the monsters[j] and coins[j] represent the power of the
A hero can defeat the monsters[j]. Each hero can defeat any monster they qualify to beat and will collect all corresponding coins. Monsters can be defeated multiple times by different heroes independently.
Return an array ans of length ans[i] is the total number of coins the
Constraints:
heroes.length
monsters.length
coins.length
heroes[i], monsters[i], coins[i]