版本比较
P11098 sol
正文
增加 2 行删除 2 行
147 行未改动全部展开1481491501511521531541551566 行未改动16316416516616716816917017113 行未改动147 行未改动全部展开read(a[i]);st[i][0] = a[i];Q.pb({i, 0, a[i], 0, 0});}rep(j, 1, 19)rep(i, 0, n)st[i][j] = min(st[i][j - 1], st[min(i + (1 << (j - 1)), max(0, n - (1 << (j - 1)) + 1))][j - 1]);read(q);rep(i, 1, q) {int r1, c1, r2, c2;6 行未改动std::sort(Q.begin(), Q.end());DC::DC(0, n, Q);rep(i, 1, q) {//error("test: ans1 {} | ans2 {}\n", DC::ans[L[i]], DC::ans[L[i] + 1]);if(DC::ans[L[i]] == DC::ans[L[i] + 1])tcs[DC::ans[L[i]]].pb({i, min(h[i].r1, h[i].r2)});else {int LL = DC::ans[L[i]], RR = DC::ans[L[i] + 1];if(LL > RR) std::swap(LL, RR);13 行未改动147 行未改动全部展开1481491501511521531541551566 行未改动16316416516616716816917017113 行未改动147 行未改动全部展开read(a[i]);st[i][0] = a[i];Q.pb({i, 0, a[i], 0, 0});}rep(j, 1, 19)rep(i, 0, n)st[i][j] = min(st[i][j - 1], st[min(i + (1 << (j - 1)), max(0, n - (1 << (j - 1)) + 1))][j - 1]);read(q);rep(i, 1, q) {int r1, c1, r2, c2;6 行未改动std::sort(Q.begin(), Q.end());DC::DC(0, n, Q);rep(i, 1, q) {//error("test: ans1 {} | ans2 {}\n", DC::ans[L[i]], DC::ans[L[i] + 1]);if(DC::ans[L[i]] == DC::ans[L[i] + 1])tcs[DC::ans[L[i]]].pb({i, min(h[i].r1, h[i].r2)});else {int LL = DC::ans[L[i]], RR = DC::ans[L[i] + 1];if(LL > RR) std::swap(LL, RR);13 行未改动