<doocs>1996.The Number of Weak Characters in the Game_1.py
def numberOfWeakCharacters( properties: List[List[int]]) -> int:
    properties.sort(key=lambda x: (-x[0], x[1]))
    ans = mx = 0
    for _, d in properties:
        if mx > d:
            ans += 1
        mx = max(mx, d)
    return ans
def sample_funcname ( var_0 : List [ List [ int ] ] ) -> int :
    var_0.sort ( var_4 = lambda var_5 : ( - var_5 [ 0 ] , var_5 [ 1 ] ) )
    var_9 = var_8 = 0
    for var_10 , var_11 in var_0 :
        if var_8 > var_11 :
            var_9 += 1
        var_8 = max ( var_8 , var_11 )
    return var_9
