comefrom: <doocs>1442.Count Triplets That Can Form Two Arrays of Equal XOR_1.py
code: def countTriplets( arr: List[int]) -> int:
      n = len(arr)
      pre = [0] * (n + 1)
      for i in range(n):
          pre[i + 1] = pre[i] ^ arr[i]
      ans = 0
      for i in range(n - 1):
          for j in range(i + 1, n):
              for k in range(j, n):
                  a, b = pre[j] ^ pre[i], pre[k + 1] ^ pre[j]
                  if a == b:
                      ans += 1
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_4 = len ( var_0 )
      var_7 = [ 0 ] * ( var_4 + 1 )
      for var_9 in range ( var_4 ) :
          var_7 [ var_9 + 1 ] = var_7 [ var_9 ] ^ var_0 [ var_9 ]
      var_10 = 0
      for var_9 in range ( var_4 - 1 ) :
          for var_11 in range ( var_9 + 1 , var_4 ) :
              for var_12 in range ( var_11 , var_4 ) :
                  var_13 , var_14 = var_7 [ var_11 ] ^ var_7 [ var_9 ] , var_7 [ var_12 + 1 ] ^ var_7 [ var_11 ]
                  if var_13 == var_14 :
                      var_10 += 1
      return var_10
  