QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#488302 | #8597. Запити красот пiдмасивiв | mshcherba# | 35 | 1761ms | 71300kb | C++20 | 2.7kb | 2024-07-23 20:37:21 | 2024-07-23 20:37:21 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef double db;
const LL LINF = 1e17;
const int LOG = 20;
const int N = 1 << 21;
struct SparseTable
{
int n;
VI lg;
vector<vector<LL>> t;
SparseTable(int _n): n(_n), lg(n + 1), t(LOG, vector<LL>(n))
{
lg[1] = 0;
FOR(i, 2, n + 1)
lg[i] = lg[i / 2] + 1;
}
void build(const vector<LL>& a)
{
t[0] = a;
FOR(i, 1, LOG)
{
FOR(j, 0, n + 1 - (1 << i))
{
t[i][j] = min(t[i - 1][j], t[i - 1][j + (1 << (i - 1))]);
}
}
}
LL query(int l, int r)
{
int len = lg[r - l + 1];
return min(t[len][l], t[len][r - (1 << len) + 1]);
}
};
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n, q;
cin >> n >> q;
VI a(n);
for (int& ai : a)
cin >> ai;
vector<LL> s(n + 1);
FOR(i, 0, n)
s[i + 1] = s[i] + a[i];
SparseTable stmn(n + 1), stmx(n + 1);
stmn.build(s);
FOR(i, 0, n + 1)
s[i] *= -1;
stmx.build(s);
FOR(i, 0, n + 1)
s[i] *= -1;
while (q--)
{
int ty;
cin >> ty;
if (ty == 1)
{
int l, r;
cin >> l >> r;
l--;
LL sl = s[l], sr = s[r];
LL mn = stmn.query(l, r), mx = -stmx.query(l, r);
LL ans = abs(sr - sl);
ans = max(ans, min(sl - mn, sr - mn));
ans = max(ans, min(mx - sl, mx - sr));
LL le = 0, ri = LINF;
while (ri - le > 1)
{
LL mid = (le + ri) / 2;
bool ok = false;
if (sl < sr)
{
if (mid <= mx - sl && mid <= sr - mn)
{
int ll = l - 1, rr = r;
while (rr - ll > 1)
{
int mm = (ll + rr) / 2;
if (-stmx.query(l, mm) - sl >= mid)
rr = mm;
else
ll = mm;
}
if (rr < r && sr - stmn.query(rr + 1, r) >= mid)
ok = true;
}
}
else
{
if (mid <= sl - mn && mid <= mx - sr)
{
int ll = l - 1, rr = r;
while (rr - ll > 1)
{
int mm = (ll + rr) / 2;
if (sl - stmn.query(l, mm) >= mid)
rr = mm;
else
ll = mm;
}
if (rr < r && -stmx.query(rr + 1, r) - sr >= mid)
ok = true;
}
}
if (ok)
le = mid;
else
ri = mid;
}
cout << max(ans, le) << "\n";
}
else
{
int x, v;
cin >> x >> v;
x--;
assert(false);
a[x] = v;
}
}
cerr << (db)clock() / CLOCKS_PER_SEC << endl;
return 0;
}
详细
Subtask #1:
score: 0
Time Limit Exceeded
Test #1:
score: 0
Time Limit Exceeded
input:
1000000 1000000 548734664 631285694 511074814 185066089 177199147 524740185 143108778 954318193 103939390 194933972 126964310 977448144 188825490 775722231 460775045 254691982 436971964 566341931 148211711 74910105 923734998 440021758 474275150 717904448 680353276 612974499 712145218 300908726 34722...
output:
251801387395338 230985543990378 233364582761908 165509624203582 383254838720986 448483728625094 365779189638223 259921744673457 396032911262151 463175787332481 396490494773605 379294045009719 380905359946099 248640668979163 372751657582612 250611799614193 382671202614963 249747705028859 377678676465...
result:
Subtask #2:
score: 14
Accepted
Test #7:
score: 14
Accepted
time: 4ms
memory: 4068kb
input:
1000 1000 -873807720 -737050877 797489760 406646247 -750849890 -581119106 43724194 -931326234 -9389547 -684003608 -926307185 -502569356 -461635706 -238087464 -83909772 -884633970 46721429 -576741985 -323890970 -855342249 -736506813 336516318 -4075924 -782227362 56799828 290931118 -471600723 81594380...
output:
9772834244 7971661681 7251185652 5902581650 12301584130 9137214347 10770040139 9693548841 12636393268 9951777555 8590138425 9126178404 8438322412 10469973494 9585010202 12336530829 12305905331 12818655084 9576894451 9228532410 10060968297 12060843219 8619457836 8862797014 12336530829 6408306273 9621...
result:
ok 1000 numbers
Test #8:
score: 14
Accepted
time: 4ms
memory: 4036kb
input:
1000 1000 692134706 979271447 980370950 994825542 999242327 999523358 999690467 999798408 999882013 999922869 -922596273 -659587774 640420971 986220997 990730649 999401779 999536875 999723478 999763458 999904584 42593372 653970020 930711142 994805382 996905450 997728548 998747773 999933140 999961560...
output:
508001236169 455677156350 464108965476 458984106243 591329464196 544306954522 606712940905 670216620925 467826054462 364402607562 478731198606 441359828061 589114661689 350571309943 538138574474 488313052986 406263573994 550962494917 490268630633 620941260144 452889284903 484667815820 398698987974 3...
result:
ok 1000 numbers
Test #9:
score: 14
Accepted
time: 4ms
memory: 4172kb
input:
1000 1000 580673741 925261058 993980536 997024573 999941913 999972191 999980883 999989783 999992331 999997282 999999063 999999150 999999272 999999338 999999726 999999825 999999870 999999902 999999977 999999989 999999993 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 ...
output:
560539190835 333464742334 628653998632 212079705817 586450009464 766145951766 886930541461 563384169825 438655875762 409072137159 571287452742 482618339702 532034732041 549824903600 640044000756 465785253221 406176201314 846137019311 349834504581 788697842607 451633268981 735398048343 645352016986 4...
result:
ok 1000 numbers
Test #10:
score: 14
Accepted
time: 0ms
memory: 3948kb
input:
1000 1000 113778409 616366980 758104758 774066845 884853572 946156080 949750283 973895123 986390312 994415418 998589686 998642039 999864578 999874539 999920293 999965949 999983998 999992235 999997899 999999234 999999892 999999964 999999978 999999980 999999995 999999999 999999999 1000000000 100000000...
output:
754778196417 695488349209 630480332057 412195393475 782679791114 602689765616 503897653789 488317363014 302782338384 348428051191 752051131798 432518915969 598010108356 663033550477 814335749262 318055380779 445729163692 336288091592 757027035466 821717471601 781958862262 718420655430 423109373010 7...
result:
ok 1000 numbers
Test #11:
score: 14
Accepted
time: 2ms
memory: 4072kb
input:
1000 1000 -353116922 418563102 940826827 988264316 988338236 996408365 999853601 999974320 999993971 999995926 999998121 999999678 999999755 999999806 999999971 999999972 999999984 999999991 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000...
output:
590373117158 732187641017 435372856316 652987578737 733292717761 248304131475 670498858492 259638664362 403406869931 653650856372 852594123641 787243880579 516800698532 428096472909 635223223388 485889309952 727613089170 694882124799 494270857759 434790317099 670088269609 797171569331 631514600863 5...
result:
ok 1000 numbers
Test #12:
score: 14
Accepted
time: 2ms
memory: 4104kb
input:
1000 1000 -221488095 587209633 872267838 890515934 994766025 997079143 998735303 998996787 999170582 999355457 999852598 999940425 999957014 999974875 999983770 999986290 999988558 999994493 999996741 999996805 999999341 999999837 999999856 999999954 999999972 999999976 999999987 999999999 100000000...
output:
622373476144 402153598108 672162651572 646493759749 595493759749 638404656027 692351281790 641769593147 748629283376 776968313017 699353081713 656395292200 334279316100 577911508843 812968313017 433174756274 514589630792 762110228713 321037336729 524645635375 823968313017 675363780989 764534665675 5...
result:
ok 1000 numbers
Test #13:
score: 14
Accepted
time: 4ms
memory: 4144kb
input:
1000 1000 -362722497 324046604 660730013 792835785 960138764 986476487 991231845 999524667 999598449 999843840 999869223 999914357 999934988 999969083 999972358 999998373 999999245 999999467 999999499 999999898 999999971 999999975 999999977 999999995 1000000000 1000000000 1000000000 1000000000 10000...
output:
382332552370 686345331368 424430112355 916112024283 630730004870 308325992400 438430299259 528912353216 896112024283 553216242505 661345331369 139766693095 447227200512 825112024283 799033892170 602150204024 524734124402 300625915893 438377837722 423712731278 557790198467 655345331368 802033892170 8...
result:
ok 1000 numbers
Subtask #3:
score: 0
Time Limit Exceeded
Test #14:
score: 10
Accepted
time: 1761ms
memory: 71220kb
input:
200000 200000 580139218 -783262026 565291185 -701435432 -591602198 -342573855 -900284959 -10919966 -682899137 -282058183 963121871 491072571 691886927 761414760 -828585515 888361166 -790814084 145385324 214735368 388759807 -80339362 -975535748 522135695 301673442 36714481 785639770 319723485 1098009...
output:
351460487491 210343422436 312498498649 203192986383 287815765786 245818714404 213968420688 159327542896 169009698075 212975612931 197610853645 255310400798 318802499824 292657635865 313528174745 321957839407 262317902055 187559666100 220264896012 221468083688 294234309666 310907237863 189575747002 1...
result:
ok 200000 numbers
Test #15:
score: 0
Time Limit Exceeded
input:
200000 200000 216963970 895963907 970921505 973720179 985811250 998640537 999103413 999661484 999729609 999942450 -821783874 781997309 829131735 832477333 892292610 985929024 998231319 999101470 999204347 999373872 473465706 768624229 994843197 999760281 999881158 999973657 999988928 999993358 99999...
output:
112621847444942 101030183697291 63233054628753 80384063266952 115039837711512 95578572948651 143407295417810 60640420205729 72326537106317 97513628293662 111552624754764 88836367993245 60834804129630 81553727338901 100409741576180 65344377179665 95711093922326 112060888712228 73442129454981 65507735...
result:
Subtask #4:
score: 10
Accepted
Test #21:
score: 10
Accepted
time: 1095ms
memory: 71164kb
input:
200000 200000 128744308 920701830 -482412021 59142239 721167306 -622861403 165749748 -449445968 -760679479 -207234657 171482190 -239316743 75518499 -717652242 502074875 -731242646 -183939818 -625333917 -53052313 185734819 -780000096 -563390882 -690210905 596581513 764466021 776717157 -38544163 -7898...
output:
128744308 1049446138 567034117 626176356 1347343662 724482259 890232007 906557623 1347343662 1347343662 1347343662 1347343662 1347343662 1347343662 1347343662 1466264164 1650203982 2275537899 2328590212 2142855393 2922855489 3486246371 4176457276 3579875763 2815409742 2137764691 2099220528 286704480...
result:
ok 200000 numbers
Test #22:
score: 10
Accepted
time: 1430ms
memory: 71148kb
input:
200000 200000 -763412911 313139114 535079082 989042081 993109117 995888077 998971206 999773517 999866478 999987134 777032268 990233656 992330606 996752593 998494028 998593842 998945960 999764312 999884287 999976973 653522695 919553000 971305283 988605240 995829044 997504762 999283178 999840628 99997...
output:
763412911 450273797 763412911 1073847366 2066956483 3062844560 4061815766 5061589283 6061455761 7061442895 7838475163 8828708819 9821039425 10817792018 11816286046 12814879888 13813825848 14813590160 15813474447 16813451420 17466974115 18386527115 19357832398 20346437638 21342266682 22339771444 2333...
result:
ok 200000 numbers
Test #23:
score: 10
Accepted
time: 1429ms
memory: 71148kb
input:
200000 200000 -825716414 416551232 517318490 714074106 868865237 955360474 973766234 984001767 996937534 999327490 999449772 999632500 999833646 999907522 999933058 999950810 999961227 999993042 999993315 999999589 999999786 999999944 999999987 999999999 1000000000 1000000000 1000000000 1000000000 1...
output:
825716414 416551232 825716414 825716414 1691092651 2646453125 3620219359 4604221126 5601158660 6600486150 7599935922 8599568422 9599402068 10599309590 11599242648 12599193458 13599154685 14599147727 15599141042 16599140631 17599140417 18599140361 19599140348 20599140347 21599140347 22599140347 23599...
result:
ok 200000 numbers
Test #24:
score: 10
Accepted
time: 1436ms
memory: 71144kb
input:
200000 200000 -151818563 160849335 914523434 941544657 957339565 971073750 998040223 998195659 999642984 999721721 999812380 999941098 999968574 999985544 999992595 999998006 999999673 999999850 999999978 999999997 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10000000...
output:
151818563 151818563 923554206 1865098863 2822438428 3793512178 4791552401 5789748060 6789391044 7789112765 8788925145 9788866243 10788834817 11788820361 12788812956 13788810962 14788810635 15788810485 16788810463 17788810460 18788810460 19788810460 20788810460 21788810460 22788810460 23788810460 247...
result:
ok 200000 numbers
Test #25:
score: 10
Accepted
time: 1432ms
memory: 71220kb
input:
200000 200000 -209681962 451691484 863486040 885986082 888701465 962559431 981013429 982403304 991652037 999501945 999723427 999924077 999928121 999964867 999985728 999998099 999999676 999999802 999999830 999999830 999999841 999999983 999999995 1000000000 1000000000 1000000000 1000000000 1000000000 ...
output:
209681962 242009522 1105495562 1991481644 2880183109 3842742540 4823755969 5806159273 6797811310 7797313255 8797036682 9796960759 10796888880 11796853747 12796839475 13796837574 14796837250 15796837052 16796836882 17796836712 18796836553 19796836536 20796836531 21796836531 22796836531 23796836531 24...
result:
ok 200000 numbers
Test #26:
score: 10
Accepted
time: 1440ms
memory: 71176kb
input:
200000 200000 627252523 979366570 995764806 999831790 999935437 999969851 999979210 999989379 999991613 999995444 999999861 999999970 999999982 999999994 999999997 999999997 999999997 999999999 999999999 999999999 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...
output:
627252523 1606619093 2602383899 3602215689 4602151126 5602120977 6602100187 7602089566 8602081179 9602076623 10602076484 11602076454 12602076436 13602076430 14602076427 15602076424 16602076421 17602076420 18602076419 19602076418 20602076418 21602076418 22602076418 23602076418 24602076418 25602076418...
result:
ok 200000 numbers
Test #27:
score: 10
Accepted
time: 1435ms
memory: 71176kb
input:
200000 200000 826496201 908165650 983143103 989914407 999690455 999884701 999972967 999976620 999990881 999996713 999997865 999999657 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1...
output:
826496201 1734661851 2717804954 3707719361 4707409816 5707294517 6707267484 7707244104 8707234985 9707231698 10707229563 11707229220 12707229220 13707229220 14707229220 15707229220 16707229220 17707229220 18707229220 19707229220 20707229220 21707229220 22707229220 23707229220 24707229220 25707229220...
result:
ok 200000 numbers
Subtask #5:
score: 11
Accepted
Test #28:
score: 11
Accepted
time: 574ms
memory: 71280kb
input:
200000 200000 3 -5 -3 3 3 -5 7 -2 2 -4 -4 9 0 -4 -2 2 -5 7 -2 3 -8 1 6 -7 9 -3 -2 4 -2 -2 3 -2 1 0 -3 6 0 -6 -2 6 -5 6 -4 3 2 -4 5 -2 -8 1 1 2 1 -3 3 5 -9 1 3 -2 0 1 -2 1 2 5 -1 -4 -1 -3 7 -7 7 1 -6 7 -1 -5 1 4 -7 6 -3 -4 -1 4 1 5 -7 -3 9 1 -6 2 -3 1 6 -1 -1 1 -1 -5 -3 9 -5 4 -1 3 -2 -4 -4 8 1 0 -9 ...
output:
9 7 8 7 8 6 5 7 9 9 7 9 6 6 9 6 8 9 9 5 6 7 5 7 6 6 5 7 8 6 6 7 5 7 7 7 5 9 7 6 9 5 8 10 5 8 7 8 5 5 8 7 7 6 6 8 6 6 9 7 8 5 6 5 8 6 6 5 5 9 8 5 7 6 7 7 6 6 5 7 6 6 6 6 6 7 9 9 8 9 7 6 6 9 9 7 8 5 9 6 7 8 9 8 9 9 8 8 5 6 8 8 6 6 6 6 6 5 9 6 6 8 9 5 9 6 6 5 7 5 10 7 5 5 6 8 6 8 7 5 6 9 6 5 10 8 8 6 6...
result:
ok 200000 numbers
Test #29:
score: 11
Accepted
time: 571ms
memory: 71216kb
input:
200000 200000 1 2 -5 0 5 -4 4 -3 -3 0 8 -2 -8 5 2 -6 3 1 -4 9 -8 -2 0 2 6 -2 -6 8 -5 1 4 -5 4 3 -3 -2 -3 6 -5 -1 3 5 -10 9 -3 4 -10 10 -2 -7 9 -6 5 -3 -1 2 -4 -1 0 1 3 2 -5 5 -4 3 2 1 -7 2 -5 7 -2 5 -9 5 0 -1 -4 6 -2 4 -1 0 -3 4 1 -3 2 -5 5 -5 -1 4 -7 3 0 6 -6 -2 8 -4 -3 4 0 -4 1 -2 3 1 4 -8 -1 8 -2...
output:
8 6 7 7 9 10 7 9 8 5 7 5 6 7 8 6 5 7 6 5 8 7 7 9 7 7 5 8 7 9 6 7 5 6 8 5 6 6 8 6 7 7 5 6 5 6 9 6 6 7 7 8 6 7 7 7 8 6 8 9 6 7 8 10 9 6 5 6 6 6 6 6 8 9 6 5 6 6 6 5 5 7 6 7 6 8 7 9 6 9 7 7 6 9 6 7 5 9 5 8 5 9 7 6 6 7 5 8 5 8 9 7 7 7 8 7 6 5 7 7 5 6 6 5 7 5 7 5 5 6 8 7 10 6 7 5 6 6 6 8 9 9 6 6 7 7 6 6 9...
result:
ok 200000 numbers
Test #30:
score: 11
Accepted
time: 572ms
memory: 71300kb
input:
200000 200000 -1 4 -2 -3 7 -3 2 -1 0 -7 0 9 -3 -6 -1 0 3 -1 -2 6 3 -5 0 4 -6 4 -5 6 -7 10 -6 5 1 -1 -5 -2 7 1 -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5 9 7 8 7 7 6 5 8 6 8 7 7 8 6 7 8 9 6 6 8 7 6 8 6 7 6 7 9 7 6 9 7 6 6 8 5 6 6 9 10 8 8 7 5 9 9 8 7 6 6 7 8 6 6...
result:
ok 200000 numbers
Test #32:
score: 11
Accepted
time: 576ms
memory: 71280kb
input:
200000 200000 -5 6 4 -7 1 -2 5 -5 7 -6 -2 0 5 2 -2 0 0 -6 1 0 6 1 1 -4 0 3 -2 0 -5 4 -3 0 6 1 -8 4 -4 2 -3 10 -7 5 -3 -4 4 -3 3 -1 1 -5 0 3 7 -10 7 -2 -2 2 -3 3 -4 8 -6 4 -2 3 -4 5 -5 -4 1 -1 9 1 -6 -3 7 -3 -4 3 0 3 -5 0 4 3 -5 -2 1 1 -4 0 3 -2 2 3 2 -7 9 -10 6 -2 6 -8 7 -2 1 0 -5 5 2 -6 5 -1 -5 -1 ...
output:
7 7 5 9 7 7 8 6 6 6 7 7 8 6 7 8 9 7 6 7 10 9 8 5 9 5 8 5 5 6 5 7 6 7 9 8 7 8 8 7 6 7 5 6 7 6 7 6 6 6 6 7 9 9 7 6 5 10 9 7 7 7 10 8 7 8 7 5 5 9 6 7 10 6 6 8 7 9 8 6 7 6 8 9 6 10 8 8 6 5 8 6 5 7 6 7 6 8 5 6 8 7 6 8 7 6 10 9 5 6 6 7 5 5 5 7 7 7 5 9 7 5 9 6 6 5 6 8 6 6 8 6 6 8 7 6 5 9 7 9 5 8 6 7 7 6 5 ...
result:
ok 200000 numbers
Test #33:
score: 11
Accepted
time: 567ms
memory: 71132kb
input:
200000 200000 -4 9 -8 1 3 3 -2 -6 2 -2 9 -9 8 -5 -1 6 0 -5 0 4 -3 -5 3 4 -3 -3 5 -5 8 -9 2 5 -7 9 -4 -2 2 -4 8 -4 1 -3 5 2 -9 3 -1 -1 0 2 4 -5 -3 0 0 2 5 -2 2 -6 3 3 1 -1 -3 1 1 4 -4 2 -6 0 8 -10 2 3 -5 10 -2 1 1 -3 -5 6 -5 7 -1 -2 -5 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#6:
score: 0
Skipped
Dependency #1:
0%
Subtask #7:
score: 0
Skipped
Dependency #6:
0%
Subtask #8:
score: 0
Skipped
Dependency #6:
0%
Subtask #9:
score: 0
Skipped
Dependency #1:
0%