code: def subset_sum(x, R):
      
      k = len(x) // 2             # divide input
      Y = [v for v in part_sum(x[:k])]
      Z = [R - v for v in part_sum(x[k:])]
      Y.sort()                    # test of intersection between Y and Z
      Z.sort()
      i = 0
      j = 0
      while i < len(Y) and j < len(Z):
          if Y[i] == Z[j]:
              return True
          elif Y[i] < Z[j]:       # increment index of smallest element
              i += 1
          else:
              j += 1
      return False
docs: Subsetsum by splitting
  
      :param x: table of values
      :param R: target value
      :returns bool: if there is a subsequence of x with total sum R
      :complexity: :math:`O(n^{\\lceil n/2 \\rceil})`