QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#310858 | #8014. 新本格魔法少女 | JCY_ | 10 | 4679ms | 82208kb | C++14 | 6.5kb | 2024-01-21 19:04:01 | 2024-01-21 19:04:03 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using i128 = __int128;
using u128 = unsigned __int128;
template <typename T>
void chkmax(T &x, const T &y) {
if (x < y) x = y;
}
template <typename T>
void chkmin(T &x, const T &y) {
if (y < x) x = y;
}
namespace io {
char ibuf[1 << 22], *ihd = ibuf, *itl = ibuf;
char getchar() {
if (ihd == itl) {
ihd = ibuf;
itl = ibuf + fread(ibuf, 1, 1 << 22, stdin);
}
return ihd == itl ? EOF : *(ihd++);
}
char obuf[1 << 22], *otl = obuf;
void putchar(char ch) {
if (otl == obuf + (1 << 22)) {
fwrite(obuf, 1, 1 << 22, stdout);
otl = obuf;
}
*(otl++) = ch;
}
void flush() { fwrite(obuf, 1, otl - obuf, stdout); }
} // namespace io
template <typename T>
void read(T &x) {
x = 0;
bool f = false;
char ch = io::getchar();
for (; !isdigit(ch); ch = io::getchar()) f ^= (ch == '-');
for (; isdigit(ch); ch = io::getchar()) x = x * 10 + ch - '0';
if (f) x = -x;
}
template <typename T>
void write(T x) {
if (x < 0) {
io::putchar('-');
x = -x;
}
static char stk[40], *tp = stk;
do {
*(tp++) = x % 10 + '0';
x /= 10;
} while (x);
while (tp != stk) io::putchar(*(--tp));
}
struct operation {
int t, l, r, v;
};
struct query {
int l, r, id;
};
constexpr int MAXN = 5e5 + 10, MAXBN = 715;
int n, m, q, bs, bn, st[MAXBN], ed[MAXBN], bel[MAXN];
int val[MAXN], tag[MAXBN];
ll ans[MAXN];
vector<pair<int, ll>> buc[MAXN];
query qry[MAXN];
operation op[MAXN];
namespace blk1 {
constexpr int MAXBN = 710;
int bs, bn, st[MAXBN], ed[MAXBN], bel[MAXN];
ll val[MAXN], sum[MAXBN];
void init() {
bs = round(sqrt(m));
bn = (m + bs - 1) / bs;
for (int i = 1; i <= bn; ++i) {
st[i] = ed[i - 1] + 1;
ed[i] = min(st[i] + bs - 1, m);
fill(bel + st[i], bel + ed[i] + 1, i);
}
}
void update(int p, ll x) {
val[p] += x;
sum[bel[p]] += x;
}
ll query(int p) {
return accumulate(val + p, val + ed[bel[p]] + 1,
accumulate(sum + bel[p] + 1, sum + bn + 1, 0ll));
}
} // namespace blk1
void push_tag(int b) {
if (tag[b]) {
fill(val + st[b], val + ed[b] + 1, tag[b]);
tag[b] = 0;
}
}
namespace blk2 {
constexpr int MAXBN = 710;
int bs, bn, st[MAXBN], ed[MAXBN], bel[MAXN];
ll suf[MAXN], bsuf[MAXBN];
void init() {
bs = round(sqrt(m));
bn = (m + bs - 1) / bs;
for (int i = 1; i <= bn; ++i) {
st[i] = ed[i - 1] + 1;
ed[i] = min(st[i] + bs - 1, m);
fill(bel + st[i], bel + ed[i] + 1, i);
}
}
void clear() {
fill(suf + 1, suf + m + 1, 0);
fill(bsuf + 1, bsuf + bn + 1, 0);
}
void update(int p, ll x) {
for (int i = st[bel[p]]; i <= p; ++i) suf[i] += x;
for (int i = 1; i < bel[p]; ++i) bsuf[i] += x;
}
ll query(int p) { return suf[p] + bsuf[bel[p]]; }
} // namespace blk2
void solve(int b) {
blk2::clear();
int num = 0, bl = st[b], br = ed[b], cov = 0;
fill(val + bl, val + br + 1, 0);
for (int i = 1, ptr = 1; i <= m; ++i) {
int l = op[i].l, r = op[i].r;
if (op[i].t == 1) {
if (l < bl && r > br) {
if (!cov) {
for (int x = bl, y; x <= br; x = y) {
y = x + 1;
while (y <= br && val[y] == val[x]) ++y;
if (val[x]) {
blk2::update(val[x], (ll)-op[val[x]].v * (y - x));
buc[i].emplace_back(val[x], (ll)op[val[x]].v * num * (y - x));
}
}
}
cov = i;
} else if (l <= br && r >= bl) {
chkmax(l, bl);
chkmin(r, br);
if (cov) {
fill(val + bl, val + br + 1, cov);
blk2::update(cov, (ll)op[cov].v * (br - bl + 1));
buc[i].emplace_back(cov, (ll)-op[cov].v * num * (br - bl + 1));
cov = 0;
}
for (int x = l, y; x <= r; x = y) {
y = x + 1;
while (y <= r && val[y] == val[x]) ++y;
if (val[x]) {
blk2::update(val[x], (ll)-op[val[x]].v * (y - x));
buc[i].emplace_back(val[x], (ll)op[val[x]].v * num * (y - x));
}
}
fill(val + l, val + r + 1, i);
blk2::update(i, (ll)op[i].v * (r - l + 1));
buc[i].emplace_back(i, (ll)-op[i].v * num * (r - l + 1));
}
} else {
num += (l < bl && r > br);
}
for (; ptr <= q && qry[ptr].r == i; ++ptr)
ans[qry[ptr].id] += blk2::query(qry[ptr].l) * num;
}
}
int main() {
// freopen("mfsn.in", "r", stdin);
// freopen("mfsn.out", "w", stdout);
read(n);
read(m);
read(q);
for (int i = 1; i <= m; ++i) {
read(op[i].t);
read(op[i].l);
read(op[i].r);
if (op[i].t == 1) read(op[i].v);
}
for (int i = 1; i <= q; ++i) {
read(qry[i].l);
read(qry[i].r);
qry[i].id = i;
}
sort(qry + 1, qry + q + 1,
[](const query &x, const query &y) { return x.r < y.r; });
bs = max(round(sqrt(n) * 4), 1.0);
bn = (n + bs - 1) / bs;
for (int i = 1; i <= bn; ++i) {
st[i] = ed[i - 1] + 1;
ed[i] = min(st[i] + bs - 1, n);
fill(bel + st[i], bel + ed[i] + 1, i);
}
blk2::init();
for (int i = 1; i <= bn; ++i) solve(i);
blk1::init();
auto small_query = [](int l, int r) {
if (tag[bel[l]]) {
blk1::update(tag[bel[l]], op[tag[bel[l]]].v * (r - l + 1ll));
} else {
for (int i = l; i <= r; ++i)
if (val[i]) blk1::update(val[i], op[val[i]].v);
}
};
for (int i = 1, ptr = 1; i <= m; ++i) {
int l = op[i].l, r = op[i].r;
if (op[i].t == 1) {
if (bel[l] == bel[r]) {
push_tag(bel[l]);
fill(val + l, val + r + 1, i);
} else {
push_tag(bel[l]);
fill(val + l, val + ed[bel[l]] + 1, i);
fill(tag + bel[l] + 1, tag + bel[r], i);
push_tag(bel[r]);
fill(val + st[bel[r]], val + r + 1, i);
}
} else {
if (bel[l] == bel[r]) {
small_query(l, r);
} else {
small_query(l, ed[bel[l]]);
small_query(st[bel[r]], r);
for (int j = bel[l] + 1; j < bel[r]; ++j) {
if (tag[j])
blk1::update(tag[j], op[tag[j]].v * (ed[j] - st[j] + 1ll));
}
}
}
for (auto &j : buc[i]) blk1::update(j.first, j.second);
for (; ptr <= q && qry[ptr].r == i; ++ptr)
ans[qry[ptr].id] += blk1::query(qry[ptr].l);
}
for (int i = 1; i <= q; ++i) {
write(ans[i]);
io::putchar('\n');
}
io::flush();
return 0;
}
/*
g++ mfsn.cpp -o mfsn -std=c++14 -O2 -Wall -Wextra -Wshadow -g
-fsanitize=address,undefined
*/
详细
Test #1:
score: 0
Wrong Answer
time: 4ms
memory: 36352kb
input:
100 100 100 2 80 86 2 15 49 1 11 100 25 2 22 36 2 37 100 1 14 16 49 2 74 90 2 28 76 1 43 45 78 1 54 56 27 1 73 75 29 2 34 81 2 51 90 1 13 14 52 1 72 73 2 2 18 58 2 44 58 1 83 85 30 1 86 88 69 1 29 31 25 1 92 94 19 1 48 49 16 1 55 57 91 1 98 100 42 2 13 96 2 50 83 1 23 25 39 1 84 85 55 1 43 45 5 1 90...
output:
9462 20657 3656 7815 8340 26421 4652 272 3039 2059 846 975 18941 1106 7450 3014 25776 2728 15817 3906 18482 25364 4447 7638 8990 13001 7154 19162 284 11815 21401 3157 3178 20178 1330 1051 11127 26477 1650 28655 1345 4212 1008 27300 32527 33056 13945 15817 4220 1693 5800 50252 14601 9462 15176 10670 ...
result:
wrong answer 1st numbers differ - expected: '8086', found: '9462'
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 36468kb
input:
100 100 100 1 56 92 5 1 5 9 91 1 70 92 77 1 45 52 90 1 37 38 36 1 9 10 1 2 1 72 1 79 80 86 2 40 98 1 96 97 89 2 46 78 2 41 58 1 57 58 65 1 73 74 44 1 20 21 54 1 95 96 61 1 23 24 40 1 60 61 48 1 17 18 65 1 43 44 68 1 44 45 7 1 28 29 4 1 10 11 37 1 14 15 44 1 69 70 18 1 33 34 52 1 15 16 67 1 62 63 64 ...
output:
2486 3731 9121 8306 2537 2673 9121 2196 2486 6093 14327 0 9306 2196 2535 2845 4256 2143 6488 2639 2673 4857 7256 2196 2845 5149 2535 9554 2486 2673 11492 2461 4682 2673 9610 2673 2603 4032 2673 7256 2535 2407 5935 8250 3378 6093 2603 17407 6770 1002 7285 2486 8123 9121 4857 11492 7525 2673 3731 4857...
result:
wrong answer 1st numbers differ - expected: '0', found: '2486'
Test #3:
score: 0
Wrong Answer
time: 3ms
memory: 36568kb
input:
5000 5000 5000 1 4070 5000 3145 2 1139 3698 1 798 799 3999 1 2423 2424 2414 1 836 838 518 1 3605 3607 2831 1 525 526 2041 1 4734 4736 1862 2 2408 3821 1 1394 1395 1129 2 601 3026 2 728 4428 1 567 569 4843 2 4235 4835 1 3568 3569 1157 1 3043 3045 4342 1 1813 1815 1888 1 2992 2993 4810 1 1862 1864 112...
output:
403801925 137290104 143748586 1548983798 917358919 69231105 1442715086 2500773088 1578504374 94834197 522554552 317083137 704253631 1751752707 998110094 157715566 104428792 1087908994 2173769210 157076537 133207698 648319339 113203207 308992443 232592626 200259134 917842379 174212577 116698454 19798...
result:
wrong answer 1st numbers differ - expected: '234959455', found: '403801925'
Test #4:
score: 0
Wrong Answer
time: 3ms
memory: 36652kb
input:
5000 5000 5000 1 3198 5000 2085 1 2688 2781 3934 1 663 664 1655 1 472 473 4369 1 822 823 75 2 798 2403 1 518 519 4434 1 4022 4023 3962 1 121 122 1996 1 568 569 2710 1 2908 2909 418 1 429 430 4757 1 1361 1362 4590 1 4439 4440 4849 1 3104 3105 2808 1 78 79 1549 1 2111 2112 2281 1 3405 3406 4240 1 2739...
output:
129616587 30987724 47623237 80153727 13081970 8320383 32626412 75983926 86915827 129550017 78363289 12082597 118805334 47664672 23282497 14047838 244115092 44417902 34796307 73862977 72740242 76969700 30005005 24369722 27241020 63962763 11082434 98993141 8547444 918224 12347693 60134058 16859521 457...
result:
wrong answer 1st numbers differ - expected: '114655447', found: '129616587'
Test #5:
score: 0
Wrong Answer
time: 5ms
memory: 34748kb
input:
4997 5000 4997 1 924 4997 4123 1 1508 1568 759 1 1148 1190 3389 1 908 952 122 1 4976 4997 4100 1 4578 4637 1736 1 2780 2821 3570 1 2830 2874 1796 1 351 391 1 1 762 801 3091 1 2060 2105 398 1 4572 4618 615 1 941 971 853 1 4395 4397 4934 1 4573 4574 4506 1 3697 3698 83 2 112 2024 1 310 311 1941 1 2116...
output:
142035799 146735876 302296390 10017275 40476282 287706172 1027693342 42720421 62229732 48969009 26301052 44704692 83856306 202105387 111939878 65854536 13341002 91899546 109604415 29544434 132250357 158497110 115320757 17030113 11798994 223401142 33155756 83152533 308546212 205217794 183816010 14584...
result:
wrong answer 1st numbers differ - expected: '133792261', found: '142035799'
Test #6:
score: 0
Wrong Answer
time: 4ms
memory: 36580kb
input:
4997 4999 4996 2 4368 4799 2 2119 4764 2 4434 4464 1 2035 4706 4296 1 519 522 2387 2 3 2084 1 4748 4755 461 2 2812 4626 1 4801 4805 2427 1 611 615 2155 2 772 2397 2 1443 2197 2 392 792 1 3032 3036 2776 2 3148 4757 1 3661 3678 3968 1 3901 3921 2378 1 143 164 531 1 3337 3360 3189 2 679 2911 1 1436 145...
output:
267807320 2450848289 1058030492 2281511103 155479328 278151687 105159193 434434859 849650292 718076654 106433018 193079781 1423721326 625379965 1562413948 913168090 84710546 875143832 313803680 179528033 170816325 2375123929 93107344 7765277 828207498 1152972685 176931606 414756813 1613717384 197977...
result:
wrong answer 1st numbers differ - expected: '170506488', found: '267807320'
Test #7:
score: 5
Accepted
time: 2182ms
memory: 54592kb
input:
499998 499998 500000 2 45317 481911 2 205023 267850 2 229212 496395 2 311928 408362 2 60781 309919 2 5271 471569 2 428188 498422 2 92261 439291 2 169892 354633 2 154209 351949 2 39872 442239 2 17793 200874 2 111458 165313 2 35630 448969 2 144408 434923 2 150127 486605 2 87239 425125 2 221549 283735 ...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 500000 numbers
Test #8:
score: 5
Accepted
time: 2028ms
memory: 52612kb
input:
499996 500000 499996 2 416226 432058 2 352324 435508 2 284349 418508 2 331919 481387 2 123642 260653 2 443789 449866 2 304455 480845 2 25402 269023 2 88509 334117 2 91159 399658 2 354630 412055 2 27378 126849 2 43994 304769 2 352338 413477 2 441505 499446 2 230203 287653 2 386 34219 2 77130 483544 2...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 499996 numbers
Test #9:
score: 0
Wrong Answer
time: 3486ms
memory: 74832kb
input:
499999 499997 499996 1 242721 499999 95404 2 46103 133768 2 374074 441419 1 24121 24525 460791 1 296358 334367 213389 1 333891 339996 192126 2 271641 289312 1 159292 235107 359363 2 281766 283959 2 68186 255669 2 112532 201134 2 281439 287449 2 265345 398433 1 495720 499897 85179 2 336233 383598 1 3...
output:
2478283948816807 4710671892849998 2474249669838031 649754261474213 4149292953859075 3962392875052666 3442641092553156 4535329108843073 3177821682794559 5762060175752914 5668702987582118 5052875539102295 5332336105123100 793303667338950 5741554271457439 5523166514102800 3541304098079892 4631829657416...
result:
wrong answer 1st numbers differ - expected: '2468271622976502', found: '2478283948816807'
Test #10:
score: 0
Wrong Answer
time: 4308ms
memory: 65944kb
input:
499996 499998 499996 2 127334 135648 2 250092 494065 2 202618 237080 1 365995 485247 159366 1 461761 461763 167619 1 161295 165395 156081 2 118953 278863 1 31995 32188 13920 2 211226 376698 2 125014 312511 1 248692 248694 369316 2 23909 438451 1 90793 222688 109394 1 405548 405549 283104 2 54420 263...
output:
6078143011742285 3405073606484989 1901386148997689 4928417421150675 3232040276995623 3607174289927206 894956344243582 3317273371830280 4689053561773100 2258712049718419 4269271521154328 3637985420957077 3736789942843586 2874471219771044 3348579408658774 1709448201030743 5218398392507292 613193772232...
result:
wrong answer 1st numbers differ - expected: '6052992577626026', found: '6078143011742285'
Test #11:
score: 0
Wrong Answer
time: 2515ms
memory: 82208kb
input:
499999 499996 500000 1 263967 499999 193060 1 473673 473677 256364 1 112817 112820 147747 2 47560 75007 1 19751 19754 272463 1 147343 147345 432368 1 385248 385251 111981 1 98114 98117 384182 1 186894 186898 304739 1 13283 13285 1641 1 127923 127925 168790 2 59949 123247 2 76677 91972 1 138037 13803...
output:
995376103608139 1136900343632929 1847133828216440 1435323501127065 1347637966938343 1194251899323248 1023036437962884 563602615959187 994029901151899 1523557552760895 1873267663142969 1765877919849596 1047883698678223 1655022175416598 1373974815120186 269908953852057 1269226607256448 752170070035193...
result:
wrong answer 1st numbers differ - expected: '990441926198121', found: '995376103608139'
Test #12:
score: 0
Wrong Answer
time: 3756ms
memory: 67940kb
input:
499999 499995 499997 1 163879 499999 440480 2 420164 470414 1 443882 499999 62525 1 313171 499999 294789 1 469407 469540 44668 2 25119 191405 2 172689 455667 2 110136 338451 2 218391 398188 1 486533 486654 93435 2 95706 256203 2 196989 304612 2 326480 401308 2 54460 198784 1 271793 271898 320340 2 9...
output:
9518517165720455 7741998798088357 1199888833481784 10742092721383561 7676367356232535 6387604414651343 8994986174994491 11527142209817384 8374513870200554 10843269726138323 4626203977296260 9184891318465499 12554871853010304 9071274145533677 11815421415355536 12041658338721437 9700648355910522 10372...
result:
wrong answer 1st numbers differ - expected: '9516852927305017', found: '9518517165720455'
Test #13:
score: 0
Wrong Answer
time: 1094ms
memory: 52392kb
input:
200000 200000 200000 2 31803 80740 2 112818 127167 1 131322 154428 90611 2 11014 192282 2 41925 115417 2 5816 159028 2 111819 126655 2 37293 172866 2 27835 145099 2 124446 162824 2 104521 118016 2 40376 127391 1 195318 195319 149596 2 41040 179839 2 61847 94626 2 69878 181705 2 28968 179132 2 132543...
output:
14383354292679 28522944929495 13078903724902 71599327115020 3695957556370 64622715090944 16197031080007 42258419646066 5772781753844 79305501029739 7515143873184 32260180428562 73183875363699 43539061861643 15531950355841 54193362137167 12238170499264 26538098391799 14252350401076 63585093433287 239...
result:
wrong answer 1st numbers differ - expected: '11850130543160', found: '14383354292679'
Test #14:
score: 0
Wrong Answer
time: 885ms
memory: 57644kb
input:
199995 199998 199998 1 159195 199995 13044 2 86976 157151 1 64762 102114 152625 1 61813 63647 178420 1 82889 85481 125381 1 51586 54321 77506 2 45182 109756 1 181575 184132 133556 2 28331 132281 2 17325 40861 2 42257 191103 2 147228 198059 2 75171 155696 1 139100 140799 154126 1 188327 190311 76827 ...
output:
79508765743624 173827431657334 287282887633958 266174007030076 147326400046449 225752529686242 164876285450718 189529859609187 48727770274867 146176149577102 1971530792752 435256889363945 107876790537 530410617512 47447973589569 267700296070433 417177186653333 229580008419958 15673488633893 20672697...
result:
wrong answer 1st numbers differ - expected: '79495501365687', found: '79508765743624'
Test #15:
score: 0
Wrong Answer
time: 972ms
memory: 57248kb
input:
199999 199996 200000 1 179926 199999 32711 1 1042 1044 112146 2 26640 43359 1 178347 178351 169789 2 32064 164957 2 81951 117742 1 179853 179856 73377 2 66862 193241 2 10596 28181 2 49117 162750 1 13331 13333 43998 2 26996 197910 1 161366 161369 84391 2 127515 184183 1 66412 66416 97202 2 49708 5634...
output:
32949030762099 19220200564255 6493955794891 33662502009313 115310652689420 95739635748783 26391143716192 65364866760938 79196353685115 113226085308198 276687654143668 3733580388009 15807312279930 36177974472005 15613244784687 308269997461509 221122397097993 247807332626124 1508030595767 369223538035...
result:
wrong answer 1st numbers differ - expected: '30619262894537', found: '32949030762099'
Test #16:
score: 0
Wrong Answer
time: 637ms
memory: 63092kb
input:
200000 200000 200000 1 59821 200000 173244 1 190307 190309 110936 1 112341 112342 4761 1 124738 124740 84834 1 3047 3049 102534 2 114052 180833 2 72832 109679 2 84797 91295 1 191583 191584 141834 1 185318 185320 87703 1 117000 117002 109533 1 80539 80540 105603 1 24207 24209 111543 1 83298 83299 140...
output:
33627333309630 46461927610509 9095722040249 3721600972882 22833145756217 41623015021824 3970885600869 53438741774766 11621889131884 23438329209033 24442030012399 28764090603060 10224216585322 7081184663633 28868003397793 46129781015668 3717461007744 4643641493269 59971520370542 42181753779981 486430...
result:
wrong answer 1st numbers differ - expected: '33260996367776', found: '33627333309630'
Test #17:
score: 0
Wrong Answer
time: 3994ms
memory: 72284kb
input:
500000 500000 500000 2 430331 460074 1 364723 500000 100669 1 250319 250342 82754 1 438542 441692 403146 1 463281 463283 433598 2 257762 468063 2 48944 155558 2 353640 481169 1 84674 84675 290827 2 146697 229831 2 468564 488452 2 5108 66751 1 23182 45112 201883 2 282890 447793 1 32871 33375 376198 1...
output:
1965027093426060 12762593693269 1202594102679312 682819843202267 225603956916103 64639274841202 292637466485115 733896462134459 96192740132980 1244671052675 1703501681647946 56417537509485 1222444650581441 259791114871365 554667143992602 14421248988587 13855775558348 1259915075343305 132926905273107...
result:
wrong answer 1st numbers differ - expected: '1942220657726821', found: '1965027093426060'
Test #18:
score: 0
Wrong Answer
time: 3556ms
memory: 75632kb
input:
500000 499995 499999 2 227886 411572 2 211683 333769 1 250096 500000 235662 1 426728 426927 304290 2 57626 245045 2 274989 390864 2 128937 178776 1 131741 131862 102941 1 98436 98438 22052 1 166478 166479 223278 1 450334 450336 468682 1 235946 235947 469845 1 472838 472839 386149 1 94197 94199 37254...
output:
1951026261073182 1012782591965328 400724532941733 285620335349582 162382317448210 446151571089735 658156979476819 998022440592414 11304428050394 1879051332433131 38789666910427 45269117786530 554365288135906 995924166821974 677341021388542 1236275501451498 2494612615849566 793596685948861 3558575881...
result:
wrong answer 1st numbers differ - expected: '1934994488313802', found: '1951026261073182'
Test #19:
score: 0
Wrong Answer
time: 4679ms
memory: 67852kb
input:
500000 500000 500000 1 483553 500000 33628 1 469113 469115 99122 2 331771 461807 2 132277 227909 1 409018 409020 67790 2 239961 327023 2 71363 250145 2 194504 394975 2 112739 357223 2 29586 226312 1 365927 365929 56596 2 37108 464107 2 260079 467849 1 132248 132250 77986 2 192853 237448 2 361959 386...
output:
2477874806617205 2243614734744588 921853085173083 97254335671634 2291309491951615 121263266371437 1014011506277876 143743476437820 770825716702101 335706021302902 1401532431896979 876978544894756 672127384131955 907816296083297 150578274516228 771041510891209 579276893646332 92950042449187 172625888...
result:
wrong answer 1st numbers differ - expected: '2430481205529290', found: '2477874806617205'
Test #20:
score: 0
Wrong Answer
time: 3935ms
memory: 69032kb
input:
499999 499999 499996 2 212908 238055 1 460268 499999 317714 2 420753 465452 1 184130 194219 347230 1 24358 31202 484414 2 261874 280744 1 382916 389593 121902 2 998 230297 1 83691 94553 138191 2 357537 469176 1 478043 489289 9664 2 49390 163924 1 496313 499999 485644 2 307553 482205 1 148359 158827 ...
output:
168479021312144 2054926372192334 2032631064873784 3223998986999444 1343006841644879 348930029556688 865045509953963 60564250202806 168689047814228 360331882978991 1141556513663194 1569764564452394 104216064625373 2134053498089311 680731393840222 2985562579384393 2022229681981268 897873974831871 6745...
result:
wrong answer 1st numbers differ - expected: '168449195555655', found: '168479021312144'