版本比较
雅礼 10.21 总结
正文
增加 17 行删除 17 行
17 行未改动18192021222223242526262728293012 行未改动434445464747484949505152538 行未改动6263646566666768697070717273744 行未改动7980818283838485858687888915 行未改动10510610710810910911011111211311311411511611718 行未改动13613713813914014014114214314422 行未改动16716816917017117117217317417559 行未改动2352362372382392392402412422432432442452462475 行未改动25325425525625725725825926026166 行未改动32832933033133233233333433533617 行未改动35435535635735835835936036136282 行未改动17 行未改动const int N = 1e5 + 10;int n, a[N], sum[2], pre;
signed main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> n; for(int i = 1; i <= n; i++) { cin >> a[i]; }12 行未改动 else { cout << pre - (sum[1] / 3 + (sum[1] % 3 == 1)) << " "; } }
return 0;} }
```
:::8 行未改动const int N = 1e5 + 10;int n, a[N], sum[2], pre;
signed main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> n; for(int i = 1; i <= n; i++) { cin >> a[i]; }4 行未改动 sum[a[i] & 1]++; pre += a[i]; cout << pre - (sum[1] / 3 + (sum[1] % 3 == 1)) << " "; }
return 0;} }```
:::
15 行未改动const int N = 3e5 + 10;int T, n, m, a[N], b[N], c[N], sum[N];
signed main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> T; while(T--) { cin >> n >> m; int maxb = 0;18 行未改动 } } cout << ans << "\n"; }
}```
:::22 行未改动 sum[x] = max(sum[x << 1], sum[x << 1 | 1]); maxa[x] = max(maxa[x << 1], maxa[x << 1 | 1]); mina[x] = min(mina[x << 1], mina[x << 1 | 1]); t2[x] = max(t2[x << 1], t2[x << 1 | 1]); t3[x] = max(t3[x << 1], t3[x << 1 | 1]); t3[x] = max(t3[x << 1], t3[x << 1 | 1]);}
void addtag(int x, int a, int b) { mina[x] = maxa[x] = tag1[x] = a;59 行未改动 return ans;}
signed main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> n; for(int i = 1; i <= n; i++) { cin >> a[i]; }5 行未改动 change1(1, 1, n, a[i], b[i]); dp[i] = query(1, 1, n, 1, i); } cout << dp[n] << "\n";
return 0;}
```66 行未改动 }}
signed main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
17 行未改动 ans += down[i][2][j] * up[i][j] + down[i][3][j]; } } cout << ans << "\n";
return 0;}```
82 行未改动