void del(int x) { r[l[x]] = r[x], l[r[x]] = l[x]; v[l[x]] += v[x], v[r[x]] += v[x]; } //把id右边个体的左编号改为id的左编号 //把id左边个体的右编号改为id的右编号 int main () { int n, k; cin >> n >> k; priority_queue<pair<ll, int>, vector<pai...
void del(int x) { r[l[x]] = r[x], l[r[x]] = l[x]; v[l[x]] += v[x], v[r[x]] += v[x]; } //把id右边个体的左编号改为id的左编号 //把id左边个体的右编号改为id的右编号 int main () { int n, k; cin >> n >> k; priority_queue<pair<ll, int>, vector<pai...