comefrom: <doocs>2213.Longest Substring of One Repeating Character_1.py
code: def _pushup( root, left, right):
      root.lc, root.rc = left.lc, right.rc
      root.size = left.size + right.size
      
      root.mx = max(left.mx, right.mx)
      root.lmx, root.rmx = left.lmx, right.rmx
      
      if left.rc == right.lc:
          if left.lmx == left.size:
              root.lmx += right.lmx
          if right.rmx == right.size:
              root.rmx += left.rmx
          root.mx = max(root.mx, left.rmx + right.lmx)
masked: def sample_funcname ( var_0 , var_1 , var_2 ) :
      var_0.lc , var_0.rc = var_1.lc , var_2.rc
      var_0.size = var_1.size + var_2.size
      var_0.mx = max ( var_1.mx , var_2.mx )
      var_0.lmx , var_0.rmx = var_1.lmx , var_2.rmx
      if var_1.rc == var_2.lc :
          if var_1.lmx == var_1.size :
              var_0.lmx += var_2.lmx
          if var_2.rmx == var_2.size :
              var_0.rmx += var_1.rmx
          var_0.mx = max ( var_0.mx , var_1.rmx + var_2.lmx )
  