comefrom: <doocs>2358.Maximum Number of Groups Entering a Competition_1.py
code: def maximumGroups( grades: List[int]) -> int:
      grades.sort()
      ans = 1
      prev = [1, grades[0]]
      curr = [0, 0]
      for v in grades[1:]:
          curr[0] += 1
          curr[1] += v
          if prev[0] < curr[0] and prev[1] < curr[1]:
              prev = curr
              curr = [0, 0]
              ans += 1
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_0.sort ( )
      var_5 = 1
      var_7 = [ 1 , var_0 [ 0 ] ]
      var_8 = [ 0 , 0 ]
      for var_9 in var_0 [ 1 : ] :
          var_8 [ 0 ] += 1
          var_8 [ 1 ] += var_9
          if var_7 [ 0 ] < var_8 [ 0 ] and var_7 [ 1 ] < var_8 [ 1 ] :
              var_7 = var_8
              var_8 = [ 0 , 0 ]
              var_5 += 1
      return var_5
  