我试着对这些行进行编码:
copy the first {ceiling of} n/2 points of P to array Pleft
copy the same {ceiling of} n/2 points from Q to array Qleft
copy the remaining {floor of} n/2 points of P to array Pright
copy the same {floor of} n/2 points from Q to array Qright
m = P[ ({ceiling of} n/2) - 1].x我得到了:
mid = len(P) / 2
Pl = P[:mid]
Ql = Q[:mid]
Pr = P[mid:]
Qr = Q[mid:]
m = P[:mid - 1].x但我不知道如何编码这一行:
copy all the points of array Q for which |x - m| < d into new array S[0..num - 1]请帮帮忙。
https://stackoverflow.com/questions/47276662
复制相似问题