版本比较
T496233 「PFROI-R1」清理计划,启动! 题解
正文
增加 8 行删除 8 行
67 行未改动686970717273747576777839 行未改动1181191201211221231241251261271281291301311321331341351366 行未改动1431441451461471481491501516 行未改动1581591601611621631641651666 行未改动1731741751761771781791801817 行未改动67 行未改动const int MAXN = 2e5 + 10;int a[MAXN], ans1 = 0, ans2 = 0;int f[MAXN];struct code {int x;int y;int n;};code h[MAXN], l[MAXN];bool cmp1(code x, code y) {return x.x < y.x;39 行未改动for (int i = 1; i <= m; i++) {// cout << i << m;cin >> c >> x;if (c == 'U') {dd += allh * x; alll -= x;hs += x;while (hposl <= hposr) {if (h[hposl].x < hs) {if (f[h[hposl].n] == 0) {f[h[hposl].n] = 1;score(i);}hposl++;}else break;}}6 行未改动f[h[hposr].n] = 1;score(i);}hposr--;}else break;}}6 行未改动f[l[lposl].n] = 1;score(i);}lposl++;}else break;}}6 行未改动f[l[lposr].n] = 1;score(i);}lposr--;}else break;}}7 行未改动67 行未改动686970717273747576777839 行未改动1181191201211221231241251261271281291301311321331341351366 行未改动1431441451461471481491501516 行未改动1581591601611621631641651666 行未改动1731741751761771781791801817 行未改动67 行未改动const int MAXN = 2e5 + 10;int a[MAXN], ans1 = 0, ans2 = 0;int f[MAXN];struct code {int x;int y;int n;};code h[MAXN], l[MAXN];bool cmp1(code x, code y) {return x.x < y.x;39 行未改动for (int i = 1; i <= m; i++) {// cout << i << m;cin >> c >> x;if (c == 'U') {dd += allh * x; alll -= x;hs += x;while (hposl <= hposr) {if (h[hposl].x < hs) {if (f[h[hposl].n] == 0) {f[h[hposl].n] = 1;score(i);}hposl++;}else break;}}6 行未改动f[h[hposr].n] = 1;score(i);}hposr--;}else break;}}6 行未改动f[l[lposl].n] = 1;score(i);}lposl++;}else break;}}6 行未改动f[l[lposr].n] = 1;score(i);}lposr--;}else break;}}7 行未改动