172
правки
Изменения
→Split
'''func''' Split(t : '''Treap''', k : '''int''', t1 : '''Treap''', t2 : '''Treap''')
'''if''' t == NULL
t1 = t2 = NULL;
'''else if''' k > t.x
Split(t.right, k, t.right, t2); t1 = t;
'''else'''
Split(t.left, k, t1, t.left); t2 = t;