QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#868081 | #9683. 士兵 | cooluo# | 0 | 483ms | 73916kb | C++23 | 8.4kb | 2025-01-24 11:52:47 | 2025-01-24 11:52:48 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ul unsigned ll
#define LL __int128_t
#define db double
#define DB long db
#define pii pair<int, int>
#define fi first
#define se second
#define mkpr make_pair
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define rsz resize
#define eb emplace_back
#define all(c) (c).begin(), (c).end()
#define bit(k) (1 << (k))
#define Bit(k) (1ll << (k))
#define BIT(k) ((LL)1 << (k))
#define lowbit(x) ((x) & -(x))
#define bin(s, k) ((s) >> (k) & 1)
#define lg2(x) (31 - __builtin_clz(x))
#define LG2(x) (63 - __builtin_clzll(x))
#define popcnt(x) __builtin_popcount(x)
#define mem(a, x) memset(a, x, sizeof(a))
#define req(i, l, r) for (int i(l), i##End(r); i < i##End; i = -~i)
#define rep(i, l, r) for (int i(l), i##End(r); i <= i##End; i = -~i)
#define per(i, r, l) for (int i(r), i##End(l); i >= i##End; i = ~-i)
// #define FILERR
#ifdef JYR
#ifdef FILERR
auto filerr = fopen("Test.err", "w");
#else
auto filerr = stderr;
#endif
#define errs(x) fputs(x "\n", filerr)
#define errm(x, ...) fprintf(filerr, x, ##__VA_ARGS__)
#else
#define errs(x) 0
#define errm(x, ...) 0
#endif
template<typename T, typename U> void chkmx(T &_a, U _b) { if (_a < _b) _a = _b; }
template<typename T, typename U> void chkmn(T &_a, U _b) { if (_b < _a) _a = _b; }
bool Mbe;
struct FastIO {
char buf[1 << 20], *p1, *p2;
char puf[1 << 20], *pf;
FastIO() : p1(buf), p2(buf), pf(puf) {}
~FastIO() { fwrite(puf, 1, pf - puf, stdout); }
char gc() {
if (p1 == p2) p2 = (p1 = buf) + fread(buf, 1, 1 << 20, stdin);
return p1 == p2 ? EOF : *p1++;
}
bool blank(char c) { return c == ' ' || c == '\r' || c == '\n' || c == '\t'; }
char rd() {
char c = gc(); while (blank(c)) c = gc();
return c;
}
template<typename T> T rd() {
T x = 0; int f = 0; char c = gc();
while (!isdigit(c)) f = (c == '-'), c = gc();
while (isdigit(c)) x = (x << 1) + (x << 3) + (c - '0'), c = gc();
return f ? -x : x;
}
int rds(char *s) {
char c = gc(), *S = s;
while (blank(c)) c = gc();
while (!blank(c) && c != EOF) *s++ = c, c = gc();
return *s = 0, abs(s - S);
}
int rdl(char *s) {
char c = gc(), *S = s;
while (c == '\r' || c == '\n') c = gc();
while (c != '\r' && c != '\n' && c != EOF) *s++ = c, c = gc();
return *s = 0, abs(s - S);
}
void rd(char &c) { c = rd(); }
void rd(char *s) {
char c = gc();
while (blank(c)) c = gc();
if (c == EOF) { *s = 0; return; }
while (!blank(c) && c != EOF) *s++ = c, c = gc();
*s = 0;
}
template<typename T> void rd(T &x) {
x = 0; int f = 0; char c = gc();
while (!isdigit(c)) f = (c == '-'), c = gc();
while (isdigit(c)) x = (x << 1) + (x << 3) + (c - '0'), c = gc();
if (f) x = -x;
}
template<typename T, typename... Ts>
void rd(T& x, Ts&... xs) { rd(x), rd(xs...); }
void pc(const char &c) {
if (pf - puf == 1 << 20) fwrite(pf = puf, 1, 1 << 20, stdout);
*pf++ = c;
}
void prt(char c) { pc(c); }
void prt(char* s) { while (*s) pc(*s++); }
void prt(const char* s) { while (*s) pc(*s++); }
template<typename T> void prt(T x) {
static int st[41], tp = 0;
if (x == 0) { pc('0'); return; }
if (x < 0) x = -x, pc('-');
while (x) st[++tp] = x % 10, x /= 10;
while (tp) pc(st[tp--] + '0');
}
template<typename T> void prt(T *x) { while (*x) pc(*x++); }
template<typename T, typename... Ts>
void prt(T x, Ts... xs) { prt(x), prt(xs...); }
void prts(const char *s, char c = '\n') {
while (*s) pc(*s++);
if (c) pc(c);
}
} IO;
#define rd IO.rd
#define rdl IO.rdl
#define ri rd<int>()
#define rl rd<ll>()
#define prt IO.prt
#define prs IO.prts
#define edl IO.pc('\n')
#define MC
#define N 1000005
#define mod 998244353
#define inf 0x3f3f3f3f
#define INF 0x3f3f3f3f3f3f3f3f
int n, m;
ll w;
int a[N];
ll b[N];
ll f[N], g[N], h[N];
vi _;
struct SegTree {
#define lc (i << 1)
#define rc (lc | 1)
ll mx[N << 2], xm[N << 2], tg[N << 2];
void psu(int i) { mx[i] = max(mx[lc], mx[rc]), xm[i] = max(xm[lc], xm[rc]); }
void chg(int i, ll k) { mx[i] += k, xm[i] += k, tg[i] += k; }
void psd(int i) { if (ll &k = tg[i]; k) chg(lc, k), chg(rc, k), k = 0; }
void bld(int i = 1, int l = 0, int r = m) {
if (l == r) { xm[i] = (mx[i] = !l ? 0 : -INF) + _[l] * w, tg[i] = 0; return; }
int t = (l + r) >> 1;
bld(lc, l, t), bld(rc, t + 1, r), psu(i);
}
void mdfA(int L, int R, ll k, int i = 1, int l = 0, int r = m) {
// errm("mdfA(%d, %d, %lld, %d, %d, %d)\n", L, R, k, i, l, r);
if (L <= l && r <= R) return chg(i, k);
int t = (l + r) >> 1; psd(i);
if (L <= t) mdfA(L, R, k, lc, l, t);
if (t < R) mdfA(L, R, k, rc, t + 1, r);
return psu(i);
}
void mdfX(int p, ll k, int i = 1, int l = 0, int r = m) {
// errm("mdfX(%d, %lld, %d, %d, %d)\n", p, k, i, l, r);
if (l == r) { chkmx(mx[i], k), chkmx(xm[i], k + _[l] * w); return; }
int t = (l + r) >> 1; psd(i);
return p <= t ? mdfX(p, k, lc, l, t) : mdfX(p, k, rc, t + 1, r);
}
ll qryX(int L, int R, int i = 1, int l = 0, int r = m) {
// errm("qryX(%d, %d, %d, %d, %d)\n", L, R, i, l, r);
if (L <= l && r <= R) return mx[i];
int t = (l + r) >> 1; psd(i);
ll res = -INF;
if (L <= t) chkmx(res, qryX(L, R, lc, l, t));
if (t < R) chkmx(res, qryX(L, R, rc, t + 1, r));
return res;
}
ll qryM(int L, int R, int i = 1, int l = 0, int r = m) {
// errm("qryM(%d, %d, %d, %d, %d)\n", L, R, i, l, r);
if (L <= l && r <= R) return xm[i];
int t = (l + r) >> 1; psd(i);
ll res = -INF;
if (L <= t) chkmx(res, qryM(L, R, lc, l, t));
if (t < R) chkmx(res, qryM(L, R, rc, t + 1, r));
return res;
}
// void dbg(int i = 1, int l = 0, int r = m) {
// errm("dbg(%d, %d, %d): %lld %lld %lld\n", i, l, r, mx[i], xm[i], tg[i]);
// if (l == r) return;
// int t = (l + r) >> 1;
// dbg(lc, l, t), dbg(rc, t + 1, r);
// }
} T;
void mslv() {
rd(n, w), _.rsz(1), _[0] = 0;
rep(i, 1, n) rd(a[i], b[i]), _.eb(a[i]), b[i] < 0 && _.eb(a[i] - 1);
sort(all(_)), _.rsz(unique(all(_)) - _.begin()), m = _.size() - 1;
// errm("_:"); for (auto x : _) errm(" | %d", x); errs(" |");
rep(i, 1, n) ;
T.bld();
// T.dbg();
// f[0] = 0; rep(j, 1, m) f[j] = -INF;
rep(i, 1, n) {
// errm("---------- i = %d: [%d %lld] ----------\n", i, a[i], b[i]);
int u = lower_bound(all(_), a[i]) - _.begin();
if (b[i] >= 0) {
ll x = T.qryM(0, u) - a[i] * w;
// errm("x = %lld\n", x);
T.mdfX(u, x), T.mdfA(u, m, b[i]);
// rep(j, 0, m) g[j] = -INF;
// rep(j, 0, m) h[j] = f[j] + _[j] * w;
// rep(j, 1, m) chkmx(h[j], h[j - 1]);
// per(j, m, 1) chkmx(f[j - 1], f[j]);
// rep(j, 0, m) g[j] = max(h[j] - _[j] * w, f[j]);
// rep(j, a[i], m) g[j] += b[i];
// rep(j, 0, m) chkmx(ans, f[j] = g[j]);
} else {
int v = lower_bound(all(_), a[i] - 1) - _.begin();
ll x = T.qryX(v + 1, m);
ll y = T.qryM(0, u) - a[i] * w;
// errm("x = %lld | y = %lld\n", x, y);
T.mdfX(v, x), T.mdfX(u, y), T.mdfA(u, m, b[i]);
}
// T.dbg();
}
prt(T.qryX(0, m)), edl;
}
/*
设 f[i][j] 表示前 i 个人中第 i 个人被打了 j 次的最大收益。
f[i][j] <- f[i - 1][k] - max(j - k, 0) w + [j >= a[i]] b[i]
f[i][j] <- f[i - 1][k] + k w - j w + [j >= a[i]] b[i] (j >= k)
f[i][j] <- f[i - 1][k] + [j >= a[i]] b[i] (j < k)
*/
void mprw() {}
bool Med;
int main() {
#ifdef JYR
errs("Running!");
freopen("Test.in", "r", stdin);
freopen("Test.out", "w", stdout);
#endif
mprw();
#ifdef MC
int _ = ri;
while (_--) mslv();
#else
mslv();
#endif
errm("%.3lfMB %.0lfms\n", abs(&Med - &Mbe) / 1048576., clock() * 1000. / CLOCKS_PER_SEC);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Pretests
Pretest #1:
score: 0
Wrong Answer
time: 348ms
memory: 42828kb
input:
12 400000 118854 575347104 558989454 753280595 156565820 338294357 76686917 725507896 659121018 404923436 448316941 379515124 944270358 857895847 620370818 799710995 658443721 82223041 865458489 453111401 812175871 33813900 482205729 724184279 456173736 653137936 556586052 121834020 855923855 258587...
output:
81232181472899 3596230018017 1255950331902 0 574136641 160444094850 496816266 153707744 0 0 23215116577 0
result:
wrong answer 1st numbers differ - expected: '81234057210117', found: '81232181472899'
Pretest #2:
score: 0
Wrong Answer
time: 2ms
memory: 13972kb
input:
6 4000 51 3075 1498 3954 -2738 2503 885 4040 909 1892 669 2743 1571 3586 2631 967 -1719 3489 -2279 2907 245 4030 -4658 1774 -743 3852 4766 4644 -4569 4746 1211 4060 3192 4906 106 944 395 4944 -4270 2898 3887 86 2879 983 2796 3706 -2218 1852 -4547 2291 -3742 3098 -2269 721 -2673 4075 3643 3782 2168 1...
output:
108031 116994 952 64713 3099 10714
result:
wrong answer 1st numbers differ - expected: '170777', found: '108031'
Pretest #3:
score: 0
Wrong Answer
time: 1ms
memory: 13904kb
input:
6 4000 36 435 265 2118 -79 1737 4687 4048 2974 4466 -3154 2187 -4709 208 -2583 1945 2987 657 -400 1575 1621 303 2449 1804 -938 783 4462 3111 3805 3119 1971 4139 -2153 152 2994 1617 1495 4401 -3356 1232 2631 4301 -3929 2547 250 4690 -217 4231 4423 2017 162 837 1314 1618 1888 4163 -3839 420 -1829 4629...
output:
339381 29509 26201 22021 34637 8272
result:
wrong answer 1st numbers differ - expected: '415140', found: '339381'
Pretest #4:
score: 0
Wrong Answer
time: 2ms
memory: 13972kb
input:
6 4000 32 446 4398 2556 3962 3313 -868 4076 -2970 1678 4224 2571 -575 1104 2429 2951 4868 3328 3365 4667 -3378 831 -1195 2945 -4961 698 3057 3801 -3441 104 2355 2715 -3494 3082 -1840 912 -1814 2121 4594 163 1216 1230 1372 3089 2211 1340 -1277 1663 -366 2494 533 694 -2414 3952 4319 3888 -3166 2641 35...
output:
461637 13298 28982 30152 14497 1078
result:
wrong answer 1st numbers differ - expected: '575577', found: '461637'
Pretest #5:
score: 0
Wrong Answer
time: 2ms
memory: 13976kb
input:
6 4000 46 516659486 -482380425 673478892 456921262 52550600 -195263188 84439410 -303576348 793884230 142261456 53871638 178448676 993952009 -729105040 311375304 -242828177 568873186 -649783202 489039312 897071106 897230314 -704163306 716138246 -386384513 64567041 749326984 650543362 620074174 105881...
output:
61415615049 11808840316 12434734755 5044516369 306009835 1256029628
result:
wrong answer 1st numbers differ - expected: '79751428359', found: '61415615049'
Pretest #6:
score: 0
Wrong Answer
time: 3ms
memory: 13976kb
input:
6 4000 35 424901005 812509425 391052046 540295317 43630273 974715906 248214780 -497460124 710808061 424650511 907365812 -576714804 747107504 -52205724 91849350 -796566435 273319577 774655777 234930090 991689494 444767327 -807843308 607616079 -672362322 312265896 -314102261 642591629 -707633585 65568...
output:
72346276739 14931613790 11246757963 4758826524 2937647543 5515616832
result:
wrong answer 1st numbers differ - expected: '95546896689', found: '72346276739'
Pretest #7:
score: 0
Wrong Answer
time: 3ms
memory: 13972kb
input:
6 4000 40 14001651 711116958 741772728 738937997 788768825 564411725 947708176 -165263187 497778726 84697508 895270695 -771416999 262683857 -350735833 834495653 -901441423 568102240 -879535453 410576049 589435444 768690384 -569970739 964672319 687805492 358660605 622685701 991982318 188915396 294812...
output:
68809516669 23563960449 11760967920 11443520813 1434376265 1305528641
result:
wrong answer 1st numbers differ - expected: '90677176825', found: '68809516669'
Pretest #8:
score: 0
Wrong Answer
time: 2ms
memory: 13976kb
input:
6 4000 50 334507865 -18039520 919528260 907094776 793331560 -620095164 424070114 -87066389 112166511 364917771 221141157 864989806 670270571 721851931 603061573 -716257172 258687986 -381908800 858436449 -160514586 58718349 -731962226 824187732 -742617091 218776242 -178041535 971169198 -39636315 5718...
output:
43781180153 9431048890 7176966403 11390921584 2258178001 979156665
result:
wrong answer 1st numbers differ - expected: '58212243338', found: '43781180153'
Pretest #9:
score: 0
Wrong Answer
time: 70ms
memory: 29416kb
input:
10 80000 282 707215735 23971672 786777910 511305418 569380161 -706014700 134031534 -949049809 766980562 507367098 415614969 -29247396 150373496 -783614840 631884479 114962704 730747609 -846196416 659478795 789156496 209675154 359713105 300350698 -970113661 834622635 564356337 314196292 -13299579 829...
output:
160682954810 62590144467 82853736696 73107577395 54487537584 4696445050 7787192166 937850961 2954848989 893708703
result:
wrong answer 1st numbers differ - expected: '196901287832', found: '160682954810'
Pretest #10:
score: 0
Wrong Answer
time: 74ms
memory: 28228kb
input:
10 80000 179 859590212 -659437715 517527341 926074005 506878720 -610794582 988933800 -65415134 408808753 -37118596 39785747 -646779914 742569765 -157276072 86248685 -701199978 932832850 415585166 285080712 -416416156 255428968 -817927911 585329914 -248798054 503588003 -543319008 847335211 160691684 ...
output:
204159561141 162144102503 57755850678 68871262956 18578171053 10245440750 11118047171 10612072813 4159715647 0
result:
wrong answer 1st numbers differ - expected: '259205958931', found: '204159561141'
Pretest #11:
score: 0
Wrong Answer
time: 74ms
memory: 29212kb
input:
10 80000 221 162126823 408340766 88426894 566630494 678590294 -423802128 771152713 210049141 956463082 -395043643 978464487 -130557602 882582268 -218636011 246484551 399087608 118384980 2618343 766893082 918114874 778987437 -511500969 184596523 -744472780 420419514 114027779 324712316 -589029996 701...
output:
232858062931 148572740728 59440293522 36269281510 27659359438 23356322748 13695705031 5591669917 636170501 3538940889
result:
wrong answer 1st numbers differ - expected: '281157563327', found: '232858062931'
Pretest #12:
score: 0
Wrong Answer
time: 74ms
memory: 26872kb
input:
10 80000 275 84318287 -341078083 912184010 954838417 919943336 -713415456 546735658 -746621039 754120823 -5444025 772501655 -509982892 264369788 -987671846 105716545 542834802 152712380 356168227 360074430 -266287289 972225871 740237836 84711073 526319146 909389801 -255890190 964316908 360539521 153...
output:
102870281852 60728635386 102222591100 37316919500 27247344566 11721361086 9387878126 4240631284 2557973849 6698156798
result:
wrong answer 1st numbers differ - expected: '139929335100', found: '102870281852'
Pretest #13:
score: 0
Wrong Answer
time: 168ms
memory: 40796kb
input:
11 160000 239 990997118 -816156461 800247677 -67866660 140936075 563552111 824163400 -417813932 438494730 727584238 774212899 805488738 825488046 566305088 140689106 -399782718 303116773 -19636922 550181252 -33234997 592347234 970214447 119454139 498356336 809847220 36540102 688586424 -294464168 652...
output:
527035518310 210330476265 171291923520 87369902378 33174707894 29237046712 17237244113 5190185623 5392979963 235489485 2459955144
result:
wrong answer 1st numbers differ - expected: '630826770695', found: '527035518310'
Pretest #14:
score: 0
Wrong Answer
time: 165ms
memory: 42356kb
input:
11 160000 305 938415408 -806760394 680636409 -494353228 618390098 -606648901 255988120 -480144564 952276984 -8627971 599366310 -861285208 61797698 -992716895 167965910 755833598 35995914 448158682 79707572 -950980887 79409669 -625603941 654846185 307306231 33523324 -21046011 17739839 -607297470 2840...
output:
382985626661 102310572889 148707305199 81619248758 24375008386 34778250492 9688957067 4692656409 3639921874 215483569 4714344685
result:
wrong answer 1st numbers differ - expected: '459880805076', found: '382985626661'
Pretest #15:
score: 0
Wrong Answer
time: 163ms
memory: 44512kb
input:
11 160000 225 397559931 -226507744 217623280 421755343 747805749 -697658036 997667403 -205957498 729340308 843690574 252149847 -859902590 637081511 -773177966 678619117 640399159 404230217 -288120393 167887327 -333759363 541541693 883199387 658110815 -760166466 129147754 -904234842 390572752 7882028...
output:
432891940532 173158671281 129581411552 80350308181 26537527782 20412343311 28617590398 12126940125 2133863508 1110032808 0
result:
wrong answer 1st numbers differ - expected: '549627247739', found: '432891940532'
Pretest #16:
score: 0
Wrong Answer
time: 167ms
memory: 44724kb
input:
11 160000 242 583718724 392646563 896167366 -753610627 974533707 -391731504 310166581 950178413 554581008 477213090 657051704 -404856474 115148377 815225593 826380629 -429069038 962531896 727686865 856743945 684511183 263888529 607776708 652355785 309098588 398241253 202560927 669365404 -307668040 4...
output:
326787887678 161437359754 84517866265 60253604470 33087865675 25954456622 12417992170 8861924326 6590699455 1142948409 6929387926
result:
wrong answer 1st numbers differ - expected: '425715033259', found: '326787887678'
Pretest #17:
score: 0
Wrong Answer
time: 162ms
memory: 43224kb
input:
11 160000 292 386839075 -123017669 153216089 -182300313 545182875 -832535439 707816968 -445367998 405676383 981846153 297942381 -562254518 376769658 756995706 256483717 -487394859 529292273 724367705 448187502 -362289914 178970027 -664574464 974263761 -802699900 522772198 -977811802 579831126 -41107...
output:
414434918038 367372945017 153056176681 47104283888 69799900409 35547589711 19480103261 2149247446 4311895703 2117707498 1367598181
result:
wrong answer 1st numbers differ - expected: '506745084525', found: '414434918038'
Pretest #18:
score: 0
Wrong Answer
time: 475ms
memory: 71024kb
input:
12 400000 336 45705493 722123592 938091861 -390860019 804181152 430304600 235050476 -304142941 60485462 -8204129 66881115 -543105756 547797553 -785178118 365088453 23201405 15540939 934940628 221358926 -653197348 210521291 674427330 868262148 -985426423 670595688 -435965497 9460431 247148660 5550959...
output:
916811248622 371447851945 269759959514 158949434919 40806848470 25410852231 21223457215 41427487832 8223538628 6219600268 9711470706 5242703564
result:
wrong answer 1st numbers differ - expected: '1105279094936', found: '916811248622'
Pretest #19:
score: 0
Wrong Answer
time: 475ms
memory: 72148kb
input:
12 400000 569 903716789 107187051 230624559 62546242 618006046 -85005609 134126782 530046083 318214666 -95089464 139248671 40874771 433443417 -878051769 900065108 -532971087 865911058 61111442 609842060 378331924 779288410 -554764743 791336683 922279054 619848096 147983628 492061207 -375443646 46723...
output:
1162942231368 299668381902 195547049694 79844160615 91479081136 59060730336 52001589027 19387363721 4653584151 12531983333 0 5226465715
result:
wrong answer 1st numbers differ - expected: '1289892953701', found: '1162942231368'
Pretest #20:
score: 0
Wrong Answer
time: 472ms
memory: 71160kb
input:
12 400000 562 761075977 -464080042 633749254 578125271 793689841 65299293 724254913 -919956635 913445549 -817897955 528523541 -974962512 155889920 92272768 344903489 -216219506 534021193 -346500838 515034147 -281723116 183658127 859092817 286622402 397145124 296168631 -439946759 492717672 651641625 ...
output:
1077095653781 362113178042 224456822660 100434628719 59003440354 48926421706 25368372758 31083436200 31742072316 13187223584 8045628967 1174558295
result:
wrong answer 1st numbers differ - expected: '1191790248782', found: '1077095653781'
Final Tests
Test #1:
score: 0
Wrong Answer
time: 351ms
memory: 42932kb
input:
12 400000 338945 439686460 445883865 168980618 168779284 555471206 388535833 14335989 853031296 567350453 584853938 843591955 552880955 764445098 687796665 117631532 542123112 464467245 39301839 656135877 999251791 635977617 46308268 282407922 326654668 825974310 212720943 274164974 29903884 5067815...
output:
0 13673914334339 11444441980775 3155051575036 347252224 356885987 679943198096 358648470161 116430731900 93257708866 47910713561 690899303
result:
wrong answer 1st numbers differ - expected: '12874512', found: '0'
Test #2:
score: 0
Wrong Answer
time: 2ms
memory: 13976kb
input:
6 4000 37 2909 -4260 4993 -1892 1819 1570 1831 1725 4907 -2592 4484 2039 1139 -4357 826 -3059 2623 2352 4184 347 1611 -4676 247 -3909 312 -3114 2854 -1366 3720 -4023 832 1097 982 -1747 3814 -1821 527 -4196 4787 -2553 3925 -3445 2856 4250 4881 -4962 4969 -1033 2891 2574 1109 4480 3408 4927 4259 -4277...
output:
431787 95379 125289 17420 30043 921
result:
wrong answer 1st numbers differ - expected: '561256', found: '431787'
Test #3:
score: 0
Wrong Answer
time: 2ms
memory: 16020kb
input:
6 4000 61 3632 4786 1849 -2174 1853 3361 3641 -3128 3705 -4325 4051 -4313 3793 -3583 3321 -1696 2844 -888 4107 4645 4513 1876 929 -909 3875 4866 2560 -3020 1203 959 4674 -241 3325 -1713 1998 4743 3508 3348 4084 -2761 3852 -1987 3756 -513 3957 950 3936 2967 1462 3782 4609 -66 4746 3227 1130 2052 3575...
output:
214466 62659 37893 39750 4089 12312
result:
wrong answer 1st numbers differ - expected: '271112', found: '214466'
Test #4:
score: 0
Wrong Answer
time: 1ms
memory: 13972kb
input:
6 4000 55 3098 -682 92 3759 3561 982 86 -3329 4364 -3972 4144 -4387 4377 -605 2739 -1413 4794 -2466 2213 -1887 825 86 82 512 1976 885 4085 -3736 1013 3638 4252 1280 745 3452 1051 -3016 2153 -4916 3265 -1113 2194 -3242 4119 -1370 662 3999 4271 2904 3422 3759 30 -2445 266 3142 3135 -692 3369 4817 4967...
output:
355468 32762 33955 23434 0 20435
result:
wrong answer 1st numbers differ - expected: '414004', found: '355468'
Test #5:
score: 0
Wrong Answer
time: 3ms
memory: 13908kb
input:
6 4000 35 912751290 -787674652 441103059 134143272 476764967 895596715 784922230 -714304721 731819621 944877642 98260827 -961821449 447615336 84829876 491396459 -136321301 133818978 610416148 549839446 786191379 940549547 -24893947 715268014 -765574242 34153451 -77136742 745540801 -147098317 6328555...
output:
79462256610 9350971668 5254772788 7673548690 456297764 0
result:
wrong answer 1st numbers differ - expected: '103426038097', found: '79462256610'
Test #6:
score: 0
Wrong Answer
time: 3ms
memory: 16024kb
input:
6 4000 43 939347813 -516048535 485012273 290768013 460161740 347545206 123073493 -169171572 712219097 959302385 832751674 -630388695 884845098 -560525612 570363766 -115947667 799929418 508081124 487207381 -204280517 258697661 747934320 358307423 25831338 344530131 -133886212 225796580 656187723 1205...
output:
62573167145 18097859859 6732542601 3961918766 814078770 10529532660
result:
wrong answer 1st numbers differ - expected: '82188374544', found: '62573167145'
Test #7:
score: 0
Wrong Answer
time: 3ms
memory: 13972kb
input:
6 4000 58 962464872 872076468 543576630 -744464500 869152803 823720080 586246435 914755120 530499904 899995316 433720449 -469077450 75540200 251660709 27918770 -779252703 64247973 -946250902 624132850 605351820 128981150 -497151991 245046991 876246333 37831722 307845717 211763391 510923355 463821485...
output:
56164401946 4268280576 11602836558 6145563539 1073810951 438152763
result:
wrong answer 1st numbers differ - expected: '71444264404', found: '56164401946'
Test #8:
score: 0
Wrong Answer
time: 2ms
memory: 16032kb
input:
6 4000 37 629909902 916378287 157939580 -420188871 579836868 -56525766 662831010 -989725679 326398341 247671081 494231347 732949692 61928235 394476639 941259163 -333955479 286566117 -149708552 305479878 -358675115 741587203 286781746 934392299 308297699 697320743 -482209788 546712054 -377228881 2507...
output:
73317845392 17752986690 6070084836 8352962568 2862726659 711494047
result:
wrong answer 1st numbers differ - expected: '90516662937', found: '73317845392'
Test #9:
score: 0
Wrong Answer
time: 72ms
memory: 25444kb
input:
10 80000 237 264997088 -870920578 816050147 54087263 897260059 -426896694 813555584 748250297 772043752 125360353 634427479 -776377086 24345946 320907247 881595821 884365063 979805463 94178093 692479675 -844751623 522005670 -699575240 703260207 -342067746 851938295 466251063 487485877 906218845 1600...
output:
241952117039 41445750231 29585933729 60374801776 25647613519 6471502262 9822252810 8333989865 1542837949 2105131330
result:
wrong answer 1st numbers differ - expected: '293952148602', found: '241952117039'
Test #10:
score: 0
Wrong Answer
time: 72ms
memory: 29308kb
input:
10 80000 265 736083740 -390163657 664749364 826158935 610569097 -763018195 342623347 -962242954 909234111 608577422 778068353 601280379 804152209 -479930490 533151631 -467620058 933145708 822573112 217749710 188852945 510441837 -593084022 240267139 539956024 390062495 776608439 279685042 -694023002 ...
output:
251823433394 221245598709 40936147776 21970479986 33525024792 12734378251 21194685429 4798936953 693956906 2704245232
result:
wrong answer 1st numbers differ - expected: '306517355337', found: '251823433394'
Test #11:
score: 0
Wrong Answer
time: 76ms
memory: 29240kb
input:
10 80000 196 258770200 -737255790 27156633 -254375883 434192233 -776174944 935723808 -595901203 256013669 891507268 703081059 -769492877 182312847 125196243 506813682 387998138 283521792 972221980 138182663 607202222 125897941 -829780547 435451196 -420098776 634648183 324568497 548298101 -985921994 ...
output:
387019957440 90401599184 33294091594 61581918229 56022968098 12561138035 7592855823 3187214300 6634150659 10676501313
result:
wrong answer 1st numbers differ - expected: '448984813035', found: '387019957440'
Test #12:
score: 0
Wrong Answer
time: 73ms
memory: 29312kb
input:
10 80000 180 894166061 989998029 480059448 -757455323 938477839 -650016293 237168779 323813560 720424368 330139353 145402542 547879868 777468821 -420857344 338097937 -415201909 168726158 732766617 208974280 -795941790 221290062 910987021 775390176 -763168249 828736401 467126707 397370116 -925733899 ...
output:
301628307586 90672587738 59436687935 78773064051 40378455551 11124952253 9759464531 5962847463 4551108982 10114947034
result:
wrong answer 1st numbers differ - expected: '371001866603', found: '301628307586'
Test #13:
score: 0
Wrong Answer
time: 162ms
memory: 40704kb
input:
11 160000 295 988915989 -3899851 46931101 67937031 146467094 -277568191 645443482 797333741 999303646 868099421 610537523 -38291082 223105710 -824077625 434575450 464420336 696713133 -659851120 658082627 551131765 647586994 917856846 720190327 12726078 197257451 423665181 565089338 -249672137 687916...
output:
292923989845 168028973167 127486919985 92798775542 29906794031 28990655416 15924105394 14141122678 3116996556 4752211018 291597817
result:
wrong answer 1st numbers differ - expected: '367633997006', found: '292923989845'
Test #14:
score: 0
Wrong Answer
time: 162ms
memory: 42592kb
input:
11 160000 317 184856348 -943902660 87628622 -866907989 810103694 267124878 727964353 -489372288 856047166 -902537646 940149541 759493210 615821588 943449077 624770271 371797819 741270525 895969836 336069714 499609541 666768356 -874821669 748630940 678062650 146244725 96539613 17128870 -989132501 425...
output:
258462722317 112979318447 94234598391 131454515286 77420628626 22602750562 7593839229 314479122 5342812135 3219419451 3259975447
result:
wrong answer 1st numbers differ - expected: '344408232063', found: '258462722317'
Test #15:
score: 0
Wrong Answer
time: 165ms
memory: 42840kb
input:
11 160000 234 406467278 764345050 557817485 -515557393 76453413 994055890 469787844 535791718 461084412 947070009 963693304 251108077 901143335 -483303189 438524233 -381628549 374424981 -866870581 198880137 382501681 730791425 -892673204 494411680 -365675939 360798755 316681353 593500815 -962007099 ...
output:
364001575112 133850261360 76742070641 64269703766 34220882700 30503436105 18946122914 9128391809 2607427468 3906545314 1187185346
result:
wrong answer 1st numbers differ - expected: '461294665684', found: '364001575112'
Test #16:
score: 0
Wrong Answer
time: 162ms
memory: 44728kb
input:
11 160000 374 904007381 414783219 301381234 -472394440 430343742 753880138 566437082 -18963134 948466000 851898618 173900018 -875345957 882792351 910533526 568212694 -560946427 759948487 555871821 51355650 -883024836 258202975 -444480134 861483056 -612892170 657133514 921124055 947687025 -789901671 ...
output:
288162734459 187258562595 69876136850 98855622287 31625848088 14495343670 27621381726 9236756775 5936419406 3505672203 5631480829
result:
wrong answer 1st numbers differ - expected: '360326748631', found: '288162734459'
Test #17:
score: 0
Wrong Answer
time: 175ms
memory: 41252kb
input:
11 160000 219 432734303 -939034339 164015421 -600885105 91766857 472647958 696293400 -33456988 894271515 634068102 194015547 716089975 498629722 862316187 820363603 490319846 547467311 -629592068 811765350 -368113828 1205475 985954229 197145337 701625301 178008855 78944385 488588367 565224075 351423...
output:
489939228536 117791722792 120527604675 100658159442 42539108870 33236596599 23314478030 4289313309 3734970450 851080678 3511940758
result:
wrong answer 1st numbers differ - expected: '603403666308', found: '489939228536'
Test #18:
score: 0
Wrong Answer
time: 471ms
memory: 73696kb
input:
12 400000 588 48964279 -358979588 756950325 -897359550 253996235 443579519 536668456 843154491 723445953 -505231175 616169331 -284840996 837895317 -803224446 664880535 -792108051 502337933 176736160 25872558 -90218681 937248070 358234861 912623995 -824795645 612804675 -431530785 468888104 770945454 ...
output:
636844279748 236615019527 216020070575 116616362406 58784548315 25840392751 32897941242 37756893739 19993343330 10888130411 5276768909 86623780
result:
wrong answer 1st numbers differ - expected: '762810668697', found: '636844279748'
Test #19:
score: 0
Wrong Answer
time: 476ms
memory: 73916kb
input:
12 400000 560 788369819 127016864 21463537 492741216 608039603 -422253226 203884354 -332776938 783320422 537830359 951406523 -106003704 727075786 310381973 96083881 925047525 411207060 306303495 822835487 901458845 121318150 700345068 296586402 477853701 865282522 -307413243 152280867 -293528922 237...
output:
666265384830 532503010896 322109455905 118849673211 99593613055 41762714578 36800703153 17842435865 7527256871 6173784435 0 1932462009
result:
wrong answer 1st numbers differ - expected: '766969796245', found: '666265384830'
Test #20:
score: 0
Wrong Answer
time: 483ms
memory: 72688kb
input:
12 400000 401 544939371 57300598 347046053 228019171 397026162 -940871193 99989498 777648286 634242693 265395002 592864182 -164697797 617759241 92290665 689980075 896816346 794540133 717813879 228042581 -376406487 859173625 -727231154 233030753 554619370 755012045 -446138228 156623943 112443554 7530...
output:
774488680448 260228784624 138032679110 119232038773 69276194810 43058488700 22979216562 8905005838 6540951452 2307725106 2210077292 3779537355
result:
wrong answer 1st numbers differ - expected: '918053116446', found: '774488680448'