1# Runtime: 4914 ms (Top 7.28%) | Memory: 66.6 MB (Top 91.64%)2class Solution:3def numberOfWeakCharacters(self, properties: List[List[int]]) -> int:45properties.sort(key=lambda x: (-x[0], x[1]))67ans = 08curr_max = 0910for _, d in properties:11if d < curr_max:12ans += 113else:14curr_max = d15return ans