正文
增加 3 行删除 3 行
9 行未改动10111213141516171829 行未改动48495051525354555657585960616212 行未改动9 行未改动struct Interval{ll l, r, len;};priority_queue<Interval> q;struct node{int id;29 行未改动}sort(p + 1, p + m + 1, cmp);for (int i = 1; i <= m; i++) cout << p[i].pos << ' ';ll res = 0;// if (p[2].pos - p[1].pos <= a[1])// {// ll d = p[2].pos - p[1].pos;// if (d <= a[1])// res += a[1] - d + 1;// }// if (p[m].pos - p[m - 1].pos <= a[m])// {// ll d = p[m].pos - p[m - 1].pos;// if (d <= a[m]) res += a[m] - d + 1;// }12 行未改动9 行未改动10111213141516171829 行未改动48495051525354555657585960616212 行未改动9 行未改动struct Interval{ll l, r, len;};priority_queue<Interval> q;struct node{int id;29 行未改动}sort(p + 1, p + m + 1, cmp);for (int i = 1; i <= m; i++) cout << p[i].pos << ' ';ll res = 0;// if (p[2].pos - p[1].pos <= a[1])// {// ll d = p[2].pos - p[1].pos;// if (d <= a[1])// res += a[1] - d + 1;// }// if (p[m].pos - p[m - 1].pos <= a[m])// {// ll d = p[m].pos - p[m - 1].pos;// if (d <= a[m]) res += a[m] - d + 1;// }12 行未改动