comefrom: <doocs>1007.Minimum Domino Rotations For Equal Row_1.py
code: def minDominoRotations( A: List[int], B: List[int]) -> int:
      a, b = A[0], B[0]
      c, d = b, a
      counta, countb = 0, 0
      countc, countd = 1, 1
      for ai, bi in zip(A[1:], B[1:]):
          if ai == a:
              pass
          elif ai != a and bi == a:
              counta += 1
          else:
              counta = -30000
          if bi == b:
              pass
          elif bi != b and ai == b:
              countb += 1
          else:
              countb = -30000
          if ai == c:
              pass
          elif ai != c and bi == c:
              countc += 1
          else:
              countc = -30000
          if bi == d:
              pass
          elif bi != d and ai == d:
              countd += 1
          else:
              countd = -30000
      if counta < 0 and countb < 0 and countc < 0 and countd < 0:
          return -1
      else:
          ans = 30000
          for count in [counta, countb, countc, countd]:
              if count >= 0:
                  ans = min(ans, count)
          return ans
masked: def sample_funcname ( var_0 : List [ int ] , var_3 : List [ int ] ) -> int :
      var_5 , var_6 = var_0 [ 0 ] , var_3 [ 0 ]
      var_7 , var_8 = var_6 , var_5
      var_9 , var_10 = 0 , 0
      var_12 , var_13 = 1 , 1
      for var_15 , var_16 in zip ( var_0 [ 1 : ] , var_3 [ 1 : ] ) :
          if var_15 == var_5 :
              pass
          elif var_15 != var_5 and var_16 == var_5 :
              var_9 += 1
          else :
              var_9 = - 30000
          if var_16 == var_6 :
              pass
          elif var_16 != var_6 and var_15 == var_6 :
              var_10 += 1
          else :
              var_10 = - 30000
          if var_15 == var_7 :
              pass
          elif var_15 != var_7 and var_16 == var_7 :
              var_12 += 1
          else :
              var_12 = - 30000
          if var_16 == var_8 :
              pass
          elif var_16 != var_8 and var_15 == var_8 :
              var_13 += 1
          else :
              var_13 = - 30000
      if var_9 < 0 and var_10 < 0 and var_12 < 0 and var_13 < 0 :
          return - 1
      else :
          var_18 = 30000
          for var_19 in [ var_9 , var_10 , var_12 , var_13 ] :
              if var_19 >= 0 :
                  var_18 = min ( var_18 , var_19 )
          return var_18
  