1
# Runtime: 4914 ms (Top 7.28%) | Memory: 66.6 MB (Top 91.64%)
2
class Solution:
3
def numberOfWeakCharacters(self, properties: List[List[int]]) -> int:
4

5
properties.sort(key=lambda x: (-x[0], x[1]))
6

7
ans = 0
8
curr_max = 0
9

10
for _, d in properties:
11
if d < curr_max:
12
ans += 1
13
else:
14
curr_max = d
15
return ans

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0