<doocs>2099.Find Subsequence of Length K With the Largest Sum_1.py
def maxSubsequence( nums: List[int], k: int) -> List[int]:
    idx = list(range(len(nums)))
    idx.sort(key=lambda i: nums[i])
    return [nums[i] for i in sorted(idx[-k:])]
def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> List [ int ] :
    var_7 = list ( range ( len ( var_0 ) ) )
    var_7.sort ( var_9 = lambda var_10 : var_0 [ var_10 ] )
    return [ var_0 [ var_10 ] for var_10 in sorted ( var_7 [ - var_3 : ] ) ]
