正文
增加 16 行删除 16 行
14 行未改动1516171819202122239 行未改动33343536373839404113 行未改动55565758596061626332 行未改动9697989910010110210310435 行未改动1401411421431441451461471481494 行未改动15415515615715815916016116216316416516616716816917017117217317417517617717817918018118218315 行未改动19920020120220320420520620712 行未改动22022122222322422522622722824 行未改动25325425525625725825926014 行未改动const int N = 1e5 + 10;int m, s, c, a[N], ans;int main() {cin >> m >> s >> c;for(int i = 1; i <= c; i++) {cin >> a[i];}9 行未改动q.pop();cnt++;}cout << ans << "\n";return 0;}```13 行未改动int n, m1, m2, ans1[N], ans2[N], ans;set<pair<int, int> > s;int main() {cin >> n >> m1 >> m2;for(int i = 1; i <= m1; i++) {int l, r;cin >> l >> r;32 行未改动for(int i = 0; i <= n; i++) {ans = max(ans, ans1[i] + ans2[n - i]);}cout << ans << "\n";return 0;}```35 行未改动st[j][i] = max(st[j][i - 1], st[j + (1 << (i - 1))][i - 1]);}}}}int query(int l, int r) {int k = lg[r - l + 1];if(tp == 1) {return min(st[l][k], st[r - (1 << k) + 1][k]);4 行未改动}}st1[4], st2[2];signed main() {// freopen("C.in", "r", stdin);ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> n >> m >> q;for(int i = 1; i <= n; i++) {cin >> a[i];st1[0].st[i][0] = a[i]; // 最大st1[1].st[i][0] = a[i]; // 最小st1[2].st[i][0] = (a[i] < 0 ? 2e9 : a[i]); // 大于等于0中最小st1[3].st[i][0] = (a[i] > 0 ? -2e9 : a[i]);// 小于等于0中最大}st1[0].n = st1[1].n = st1[2].n = st1[3].n = n;st1[0].tp = st1[3].tp = 2;st1[1].tp = st1[2].tp = 1;for(int i = 1; i <= m; i++) {cin >> b[i];st2[0].st[i][0] = b[i]; // 最大st2[1].st[i][0] = b[i]; // 最小}st2[0].n = st2[1].n = m;st2[0].tp = 2;st2[1].tp = 1;15 行未改动min(st1[1].query(l1, r1) * st2[0].query(l2, r2), st1[1].query(l1, r1) * st2[1].query(l2, r2)),(st1[2].query(l1, r1) != 2e9 ? st1[2].query(l1, r1) * st2[1].query(l2, r2) : -(int)1e18),(st1[3].query(l1, r1) != -2e9 ? st1[3].query(l1, r1) * st2[0].query(l2, r2) : -(int)1e18)}) << "\n";}}```## T412 行未改动int T, id, n, m, c, f, dp[N][N];char a[N][N];int main() {cin >> T >> id;while(T--) {cin >> n >> m >> c >> f;for(int i = 1; i <= n; i++) {24 行未改动}}cout << ansc * c % MOD << " " << ansf * f % MOD << "\n";}return 0;}```14 行未改动1516171819202122239 行未改动33343536373839404113 行未改动55565758596061626332 行未改动9697989910010110210310435 行未改动1401411421431441451461471481494 行未改动15415515615715815916016116216316416516616716816917017117217317417517617717817918018118218315 行未改动19920020120220320420520620712 行未改动22022122222322422522622722824 行未改动25325425525625725825926014 行未改动const int N = 1e5 + 10;int m, s, c, a[N], ans;int main() {cin >> m >> s >> c;for(int i = 1; i <= c; i++) {cin >> a[i];}9 行未改动q.pop();cnt++;}cout << ans << "\n";return 0;}```13 行未改动int n, m1, m2, ans1[N], ans2[N], ans;set<pair<int, int> > s;int main() {cin >> n >> m1 >> m2;for(int i = 1; i <= m1; i++) {int l, r;cin >> l >> r;32 行未改动for(int i = 0; i <= n; i++) {ans = max(ans, ans1[i] + ans2[n - i]);}cout << ans << "\n";return 0;}```35 行未改动st[j][i] = max(st[j][i - 1], st[j + (1 << (i - 1))][i - 1]);}}}}int query(int l, int r) {int k = lg[r - l + 1];if(tp == 1) {return min(st[l][k], st[r - (1 << k) + 1][k]);4 行未改动}}st1[4], st2[2];signed main() {// freopen("C.in", "r", stdin);ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> n >> m >> q;for(int i = 1; i <= n; i++) {cin >> a[i];st1[0].st[i][0] = a[i]; // 最大st1[1].st[i][0] = a[i]; // 最小st1[2].st[i][0] = (a[i] < 0 ? 2e9 : a[i]); // 大于等于0中最小st1[3].st[i][0] = (a[i] > 0 ? -2e9 : a[i]);// 小于等于0中最大}st1[0].n = st1[1].n = st1[2].n = st1[3].n = n;st1[0].tp = st1[3].tp = 2;st1[1].tp = st1[2].tp = 1;for(int i = 1; i <= m; i++) {cin >> b[i];st2[0].st[i][0] = b[i]; // 最大st2[1].st[i][0] = b[i]; // 最小}st2[0].n = st2[1].n = m;st2[0].tp = 2;st2[1].tp = 1;15 行未改动min(st1[1].query(l1, r1) * st2[0].query(l2, r2), st1[1].query(l1, r1) * st2[1].query(l2, r2)),(st1[2].query(l1, r1) != 2e9 ? st1[2].query(l1, r1) * st2[1].query(l2, r2) : -(int)1e18),(st1[3].query(l1, r1) != -2e9 ? st1[3].query(l1, r1) * st2[0].query(l2, r2) : -(int)1e18)}) << "\n";}}```## T412 行未改动int T, id, n, m, c, f, dp[N][N];char a[N][N];int main() {cin >> T >> id;while(T--) {cin >> n >> m >> c >> f;for(int i = 1; i <= n; i++) {24 行未改动}}cout << ansc * c % MOD << " " << ansf * f % MOD << "\n";}return 0;}```