QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#553454 | #8187. Gnutella Chessmaster | ohwphil | AC ✓ | 108ms | 13944kb | C++17 | 8.3kb | 2024-09-08 13:41:36 | 2024-09-08 13:41:37 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
// ref: https://judge.yosupo.jp/submission/102040
template<int M> struct MINT {
long long v;
static MINT<M> w;
MINT<M>() : v(0) {}
MINT<M>(const long long v) : v(v) { normalize(); }
void normalize() { v %= M; if (v < 0) v += M; }
friend istream& operator >> (istream& in, MINT<M>& a) { in >> a.v; a.normalize(); return in; }
friend ostream& operator << (ostream& out, const MINT<M>& a) { return out << a.v; }
friend MINT<M> pow(MINT<M> a, long long b) {
MINT<M> res = 1;
for (; b; b >>= 1, a *= a) if (b & 1) res *= a;
return res;
}
MINT<M> power(long long b) const { return pow(*this, b); }
MINT<M> mul_inv() const { return power(M - 2); }
MINT<M>& operator += (const MINT<M>& t) { if ((v += t.v) >= M) v -= M; return *this; }
MINT<M>& operator -= (const MINT<M>& t) { if ((v -= t.v) < 0) v += M; return *this; }
MINT<M>& operator *= (const MINT<M>& t) { v *= t.v; normalize(); return *this; }
MINT<M>& operator /= (const MINT<M>& t) { *this *= t.mul_inv(); normalize(); return *this; }
MINT<M> operator + (const MINT<M>& t) const { return MINT<M>(*this) += t; }
MINT<M> operator - (const MINT<M>& t) const { return MINT<M>(*this) -= t; }
MINT<M> operator * (const MINT<M>& t) const { return MINT<M>(*this) *= t; }
MINT<M> operator / (const MINT<M>& t) const { return MINT<M>(*this) /= t; }
MINT<M> operator - () const { return -v; }
bool operator == (const MINT<M>& t) const { return v == t.v; }
bool operator != (const MINT<M>& t) const { return v != t.v; }
operator int32_t() const { return v; }
operator int64_t() const { return v; }
};
template<int M>
void NTT(vector<MINT<M>>& a, bool inv_fft = false) {
int n = a.size(); vector<MINT<M>> root(n / 2);
for (int i = 1, j = 0; i < n; i++) {
int bit = n / 2;
while (j >= bit) j -= bit, bit >>= 1;
if (i < (j += bit)) swap(a[i], a[j]);
}
auto ang = MINT<M>::w.power((M - 1) / n); if (inv_fft) ang = ang.mul_inv();
root[0] = 1; for (int i = 1; i < n / 2; i++) root[i] = root[i - 1] * ang;
for (int i = 2; i <= n; i <<= 1) {
int step = n / i;
for (int j = 0; j < n; j += i) {
for (int k = 0; k < i / 2; k++) {
auto u = a[j + k], v = a[j + k + i / 2] * root[k * step];
a[j + k] = u + v; a[j + k + i / 2] = u - v;
}
}
}
auto inv = MINT<M>(n).mul_inv();
if (inv_fft) for (int i = 0; i < n; i++) a[i] = a[i] * inv;
}
template<typename T>
struct Poly {
vector<T> a;
Poly() : a() {}
Poly(T a0) : a(1, a0) { normalize(); }
Poly(const vector<T>& a) : a(a) { normalize(); }
void normalize() { while (!a.empty() && a.back() == T(0)) a.pop_back(); }
int size() const { return a.size(); }
int deg() const { return size() - 1; }
void push_back(const T& x) { a.push_back(x); }
T get(int idx) const { return 0 <= idx && idx < size() ? a[idx] : T(0); }
T& operator [] (int idx) { return a[idx]; }
Poly reversed() const { auto b = a; reverse(b.begin(), b.end()); return b; }
Poly trim(int sz) const { return vector<T>(a.begin(), a.begin() + min(sz, size())); }
Poly inv(int n) const {
Poly q(T(1) / a[0]);
for (int i = 1; i < n; i <<= 1) {
Poly p = Poly(2) - q * trim(i * 2);
q = (p * q).trim(i * 2);
}
return q.trim(n);
}
Poly operator *= (const T& x) { for (auto& i : a) i *= x; normalize(); return *this; }
Poly operator /= (const T& x) { return *this *= T(1) / x; }
Poly operator += (const Poly& t) {
a.resize(max(size(), t.size()));
for (int i = 0; i < t.size(); i++) a[i] += t.a[i];
normalize(); return *this;
}
Poly operator -= (const Poly& t) {
a.resize(max(size(), t.size()));
for (int i = 0; i < t.size(); i++) a[i] -= t.a[i];
normalize(); return *this;
}
Poly operator *= (const Poly& t) {
auto b = t.a;
int n = 2; while (n < a.size() + b.size()) n <<= 1;
a.resize(n); b.resize(n); NTT(a); NTT(b);
for (int i = 0; i < n; i++) a[i] *= b[i];
NTT(a, true); normalize(); return *this;
}
Poly operator /= (const Poly& t) {
if (deg() < t.deg()) return *this = Poly();
int sz = deg() - t.deg() + 1;
Poly ra = reversed().trim(sz), rb = t.reversed().trim(sz).inv(sz);
*this = (ra * rb).trim(sz);
for (int i = sz - size(); i; i--) a.push_back(T(0));
reverse(a.begin(), a.end()); normalize();
return *this;
}
Poly operator %= (const Poly& t) {
if (deg() < t.deg()) return *this;
Poly tmp = *this; tmp /= t; tmp *= t;
*this -= tmp; normalize();
return *this;
}
Poly operator + (const Poly& t) const { return Poly(*this) += t; }
Poly operator - (const Poly& t) const { return Poly(*this) -= t; }
Poly operator * (const Poly& t) const { return Poly(*this) *= t; }
Poly operator / (const Poly& t) const { return Poly(*this) /= t; }
Poly operator % (const Poly& t) const { return Poly(*this) %= t; }
Poly operator * (const T x) const { return Poly(*this) *= x; }
Poly operator / (const T x) const { return Poly(*this) /= x; }
T eval(T x) const {
T res = 0;
for (int i = deg(); i >= 0; i--) res = res * x + a[i];
return res;
}
Poly derivative() const {
vector<T> res;
for (int i = 1; i < size(); i++) res.push_back(T(i) * a[i]);
return res;
}
Poly integral() const {
vector<T> res{ T(0) };
for (int i = 0; i < size(); i++) res.push_back(a[i] / T(i + 1));
return res;
}
Poly ln(int n) const {
assert(size() > 0 && a[0] == T(1));
return (derivative() * inv(n)).integral().trim(n);
}
Poly exp(int n) const {
if (size() == 0) return Poly(1);
assert(size() > 0 && a[0] == T(0));
Poly res(1);
for (int i = 1; i < n; i <<= 1) {
auto t = Poly(1) + trim(i * 2) - res.ln(i * 2);
res = (res * t).trim(i * 2);
}
return res.trim(n);
}
Poly pow(long long n, int k) const {
// compute f(x)^n mod x^k
Poly acc(1), t = *this;
t = t.trim(k);
for (; n; n >>= 1) {
if (n & 1) acc = (acc * t).trim(k);
t = (t * t).trim(k);
}
return acc;
}
};
using ModInt = MINT<998244353>;
template<> ModInt ModInt::w = ModInt(3);
using T = ModInt;
// solution references
// https://openworks.wooster.edu/cgi/viewcontent.cgi?article=7688&context=independentstudy
// https://codeforces.com/blog/entry/117906
vector<ModInt> factorial, inv_factorial;
int n;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n;
if (n == 1) {
cout << "1\n";
return 0;
}
factorial.resize(n + 1);
inv_factorial.resize(n + 1);
factorial[0] = 1;
for (int i = 1; i <= n; i++) {
factorial[i] = factorial[i - 1] * ModInt(i);
}
inv_factorial[n] = factorial[n].mul_inv();
for (int i = n - 1; i >= 0; i--) {
inv_factorial[i] = inv_factorial[i + 1] * ModInt(i + 1);
}
Poly<ModInt> exp_my;
exp_my.a.resize(n + 1);
for (int i = 0; i <= n; i++) {
if (i & 1) {
exp_my[i] = -inv_factorial[i];
} else {
exp_my[i] = inv_factorial[i];
}
}
Poly<ModInt> poly1;
poly1.a.resize(n + 1);
for (int i = 0; i <= n; i++) {
poly1[i] = inv_factorial[i];
poly1[i] *= ModInt(i).power(n - n / 2);
poly1[i] *= ModInt(i + 1).power(n / 2);
}
Poly<ModInt> poly2;
poly2.a.resize(n + 1);
for (int i = 0; i <= n; i++) {
poly2[i] = inv_factorial[i];
poly2[i] *= ModInt(i).power(n - (n + 1) / 2);
poly2[i] *= ModInt(i + 1).power((n + 1) / 2);
}
poly1 *= exp_my;
poly2 *= exp_my;
poly1.a.resize(n + 1);
poly2.a.resize(n + 1);
poly1 *= poly2;
for (int i = 0; i < 2 * n - 1; i++) {
cout << poly1[2 * n - 1 - i] << " ";
}
cout << "\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3788kb
input:
2
output:
4 4 0
result:
ok 3 number(s): "4 4 0"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
3
output:
9 26 26 8 0
result:
ok 5 number(s): "9 26 26 8 0"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
10
output:
100 4380 110960 1809464 20014112 154215760 837543200 214861037 625796024 941559921 770927213 837612209 756883449 146369278 295974400 17275136 246784 1024 0
result:
ok 19 numbers
Test #4:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
1
output:
1
result:
ok 1 number(s): "1"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
4
output:
16 92 232 260 112 16 0
result:
ok 7 numbers
Test #6:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
5
output:
25 240 1124 2728 3368 1960 440 32 0
result:
ok 9 numbers
Test #7:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
6
output:
36 520 3896 16428 39680 53744 38368 12944 1600 64 0
result:
ok 11 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
7
output:
49 994 10894 70792 282248 692320 1022320 867328 389312 81184 5792 128 0
result:
ok 13 numbers
Test #9:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
8
output:
64 1736 26192 242856 1444928 5599888 14082528 22522960 22057472 12448832 3672448 489536 20224 256 0
result:
ok 15 numbers
Test #10:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
9
output:
81 2832 56296 706048 5865552 33001664 126490352 328097824 565532992 627961728 428329024 167227648 33457664 2928256 71552 512 0
result:
ok 17 numbers
Test #11:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
11
output:
121 6490 204130 4199064 59673360 603563504 419840828 501078377 722542566 248489316 784306479 919606871 470619532 62105739 180808314 806829030 593909758 102232576 866816 2048 0
result:
ok 21 numbers
Test #12:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
13
output:
169 12896 589196 18024072 391202680 240183234 385909662 336190433 988842813 800482366 337667649 141299740 796972253 565015696 400590931 256602955 447316980 633893532 102483067 777298055 770883392 568059901 10434560 8192 0
result:
ok 25 numbers
Test #13:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
17
output:
289 38624 3172944 179645376 462845593 282750293 443780178 321325768 110858454 933996107 385988001 840535917 730020126 488446312 619258378 213106575 619889433 192064447 69795707 287178495 46452168 850440229 319584647 445349980 30374195 435538727 553919897 366388458 274493709 872312509 506429439 13107...
result:
ok 33 numbers
Test #14:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
19
output:
361 60762 6342186 460615272 801577992 790479776 242169000 889882477 32466748 904685657 466843389 722398074 395511203 107658168 384155822 389276363 827827829 86915193 786722841 822807443 645820134 962826041 245340569 776247072 238140204 641532139 18600844 346662097 534432013 838598382 469515197 77244...
result:
ok 37 numbers
Test #15:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
20
output:
400 74860 8720520 709686228 5631685 916594136 43344235 203768154 527627153 275613837 636800989 342016709 91582097 354751314 955178089 365021350 424792927 894697234 913532302 417399017 720353696 220649235 401797145 476383862 643505654 521535489 548955919 802045570 136858082 242207809 691002449 828943...
result:
ok 39 numbers
Test #16:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
32
output:
1024 502944 157844800 641212797 414286331 908025227 781573531 940065820 160211972 294216766 139284580 745125505 324154398 692046648 242237870 868955672 700884579 256351032 772522906 231274738 872783425 200305689 601685132 187960420 550094018 388017821 236843711 757384815 413162967 716970098 12818958...
result:
ok 63 numbers
Test #17:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
44
output:
1936 1818212 105742839 182033252 390140537 822556169 705314001 955859327 154176263 663782691 255682512 91299711 445833476 138383466 705430330 61417932 322320727 439537449 619378343 369488842 239229549 991317732 858556543 434961840 998125008 627564526 228740559 700224836 982548359 536563109 651436125...
result:
ok 87 numbers
Test #18:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
66
output:
4356 9297860 985082740 143783880 7080770 662357612 310027332 793475619 253703875 510672393 418525766 886261678 596069130 761734332 335801566 974411247 997971031 495148042 613741075 57017333 480830540 661722178 265807188 981607010 222841588 157496722 395692027 407547647 635364103 626172067 527237312 ...
result:
ok 131 numbers
Test #19:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
99
output:
9801 47387802 955241956 225154549 528290012 773389846 770043896 292530982 396744771 804758953 548230214 997138425 847135753 937973073 272019841 903064669 871544842 482389705 547276054 671157090 730226462 927629610 499892121 687523838 415682939 95381478 518515952 606556158 364022662 971161160 2089599...
result:
ok 197 numbers
Test #20:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
100
output:
10000 49338300 404250120 323314481 854301309 874563226 411294018 497211425 278018270 769378031 691513062 537942562 292040352 437956561 381339144 686237385 905534648 248197879 675972000 963982813 133134984 228662944 589155694 452011764 657458782 139192518 144381969 167042609 944594485 120867174 66171...
result:
ok 199 numbers
Test #21:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
127
output:
16129 128714754 798689760 627451455 489144740 910196825 609857383 660163362 618378580 252305876 640376761 31773971 990409596 44491238 570025381 757382777 429970143 145560410 363048960 386359107 229159357 525248423 286055007 673825456 250370560 2107546 621516582 774701804 356462982 834429454 95949073...
result:
ok 253 numbers
Test #22:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
128
output:
16384 132827776 681595449 503618406 371716913 328057550 644224018 508126507 5824646 144436400 135619074 254292674 930621396 43113294 706945804 457434239 537962554 467704390 479302589 484488576 785460704 340110444 18750684 621603183 283792242 938134105 802684217 454544315 83662745 898403196 30185210 ...
result:
ok 255 numbers
Test #23:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
129
output:
16641 137038592 880797591 912661588 224453360 559140732 812792057 555967713 157808559 820278835 12701424 645196381 839659511 72343866 418958047 329869387 466185108 577267191 989930626 270539910 720089576 912387743 737799995 23062076 250743449 752040723 188191303 307234888 646871155 744722975 8451644...
result:
ok 257 numbers
Test #24:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
200
output:
40000 794686600 706944231 452709484 377924271 928282200 98394737 723913884 155106189 883621491 745214091 629039213 95799159 993233836 56104867 266092900 361233645 680418125 22754197 935611465 859618235 89200948 373454277 345639427 113553321 707232751 249471080 379077475 429681221 870724748 480607266...
result:
ok 399 numbers
Test #25:
score: 0
Accepted
time: 1ms
memory: 3576kb
input:
255
output:
65025 106614784 457238657 433850361 214074479 512341895 128422297 625902909 724661104 473602346 720459084 427491892 153913087 525737738 324150952 545520039 802480015 257894623 971658250 878575212 880064476 693843977 16436893 611204283 835668837 972637544 370246273 752077653 344173801 390662992 18143...
result:
ok 509 numbers
Test #26:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
256
output:
65536 139842814 55964998 655695108 403364695 987581312 436240698 425493274 440503489 789677217 974424331 415335093 588402657 741218987 746037245 247914663 411826718 38601442 275286734 873471289 820018571 981721272 587444189 5994104 652037645 749166573 884375476 876810373 943386047 316683175 39692625...
result:
ok 511 numbers
Test #27:
score: 0
Accepted
time: 1ms
memory: 3688kb
input:
666
output:
443556 346298666 20586090 976565809 569539335 150558311 871073770 210178627 870953306 547531327 182728255 455833858 149522728 103242908 662628564 978072261 424348907 838784475 128262505 776675073 28550473 898649422 476166775 845519656 481156247 712426906 451232999 715122410 554676341 665874540 48531...
result:
ok 1331 numbers
Test #28:
score: 0
Accepted
time: 1ms
memory: 3624kb
input:
777
output:
603729 251450458 994709684 319448659 784637151 951545577 354227466 592240762 715683078 864358434 264824977 586090171 862853751 197232244 376086390 874355027 102775762 762493788 537907781 211769585 503449835 372137474 689147163 257056060 542924451 515787456 881392095 572399621 101447505 741953192 370...
result:
ok 1553 numbers
Test #29:
score: 0
Accepted
time: 1ms
memory: 3648kb
input:
999
output:
998001 213140208 345832696 915534069 289000886 71540101 124451179 51336488 357583443 685853810 55839300 341778744 977786867 382804264 158653465 30638063 157668107 129118794 694719549 254034713 968162727 483633264 530356827 89675751 530042149 980561707 717445183 107241129 10766705 545890127 3101873 3...
result:
ok 1997 numbers
Test #30:
score: 0
Accepted
time: 0ms
memory: 3856kb
input:
1000
output:
1000000 211656500 492366400 584531443 641094698 804128678 959002114 553211446 94429976 431378212 386810421 209693595 778842813 262552326 905960056 575224683 958375227 312440349 670999293 569681007 543693216 845480647 912832125 595919273 876432828 905571483 215830964 714014593 208191250 151366194 614...
result:
ok 1999 numbers
Test #31:
score: 0
Accepted
time: 3ms
memory: 3776kb
input:
2345
output:
5499025 619143599 23434396 106576199 163943045 865587671 202573351 749468965 379686168 908607514 167903888 353837701 31721303 488678283 95611903 375450895 23266694 692930609 257793652 479384376 234065555 90154327 570521550 206004493 47903900 288372112 396946458 247568133 773172176 145711214 36313778...
result:
ok 4689 numbers
Test #32:
score: 0
Accepted
time: 3ms
memory: 3860kb
input:
5678
output:
32239684 387084406 619451651 953385367 252078973 384356751 446880939 197362439 787839676 945830448 769642722 550024436 614708064 323083364 88506593 95488219 945728869 332219034 8913366 497446897 479447772 956597276 146159595 532207736 398834558 258414379 471787506 967159634 567835740 54884309 741742...
result:
ok 11355 numbers
Test #33:
score: 0
Accepted
time: 11ms
memory: 4316kb
input:
10000
output:
100000000 882961875 942085987 555416924 50637987 901430787 90910437 84526006 366910508 755067140 846111611 659077820 78543277 719430724 654552283 262190275 512516262 529308287 908986287 190570053 54567698 800384352 308191895 282505222 167939889 832781536 216213297 629240693 360843621 597413129 21205...
result:
ok 19999 numbers
Test #34:
score: 0
Accepted
time: 11ms
memory: 4360kb
input:
12347
output:
152448409 670271500 308233592 668691553 688069568 666238902 880227528 970292864 307828455 25105226 285001719 89469594 899037037 243455298 856965072 925212319 250898623 210354652 224373297 369335481 545616417 549109813 714016064 429920717 412652919 968051610 298781276 188391203 265678313 62691197 114...
result:
ok 24693 numbers
Test #35:
score: 0
Accepted
time: 42ms
memory: 7608kb
input:
32768
output:
75497471 876563368 795532764 257754460 324975631 452979782 349971163 994311299 41629286 544176992 987428019 138214118 93076025 576224522 698643387 462335289 720595446 756125488 757471403 44790842 785200416 938616485 355045056 934170252 726418703 167088376 201913184 545929024 368896481 187847216 9665...
result:
ok 65535 numbers
Test #36:
score: 0
Accepted
time: 52ms
memory: 8292kb
input:
45678
output:
89990978 327892357 310756244 265798629 293323193 402247900 286989378 509005230 731963970 545641109 415783057 509143184 533808639 724572994 325323802 102260725 72905860 39859294 986119359 476078304 416218514 44490542 285922602 36346104 115347660 160492972 129068616 523821036 389416743 875964468 94762...
result:
ok 91355 numbers
Test #37:
score: 0
Accepted
time: 48ms
memory: 8436kb
input:
50000
output:
503511294 348665849 472331790 964158732 896967923 454209430 945469256 183030312 26194039 355848339 522490603 946654565 330239540 386215849 135570480 140063288 970244710 516544225 396281276 928897855 951397458 830373298 537426440 921303808 633653772 566365121 475180190 489323293 511073381 692965066 3...
result:
ok 99999 numbers
Test #38:
score: 0
Accepted
time: 58ms
memory: 9440kb
input:
65535
output:
301858813 86144765 769277904 124494019 887129892 875056405 800554089 540244326 198401784 713195698 924055449 596803598 442236571 977984042 226625780 205931904 324371076 963672156 619092317 106431482 996111243 247612498 310344187 698148469 523929595 655080552 368727253 551604931 820805887 494545026 3...
result:
ok 131069 numbers
Test #39:
score: 0
Accepted
time: 90ms
memory: 12420kb
input:
65536
output:
301989884 606002221 67690527 543037802 613932468 928583162 886812060 806532567 727217548 291761800 959364141 682897062 321873359 635144796 462875051 325648700 191615539 941445324 510566298 683884180 199236352 211761897 350676988 373781092 30567356 441744474 919618338 819313253 186281752 421021804 76...
result:
ok 131071 numbers
Test #40:
score: 0
Accepted
time: 93ms
memory: 12340kb
input:
65537
output:
302120957 941048133 860932329 41526621 331488970 931937012 359333401 85940773 273883137 733758662 483641509 991980805 274575339 249129290 590113766 4976652 693414596 706644015 500568203 812379893 716283393 751808038 251815948 253452767 179710527 208355516 786292033 686970450 810670889 253827703 1079...
result:
ok 131073 numbers
Test #41:
score: 0
Accepted
time: 107ms
memory: 12904kb
input:
77777
output:
59795611 832074074 600756483 767606215 229133764 188089637 783026659 583678956 499194788 213888526 453060539 394399174 207488804 138188009 590142328 319621749 797303216 345665066 363834673 301720733 269551367 201874949 364289972 867868300 880273855 228542642 360897798 461220483 468974187 395303992 7...
result:
ok 155553 numbers
Test #42:
score: 0
Accepted
time: 103ms
memory: 13944kb
input:
99991
output:
15756551 919381936 777292554 289739235 958082991 583764198 100710723 607109071 205067385 170444266 69356896 700245684 69640127 955841198 847566674 211478886 980412796 382684511 527303444 264241657 918310280 673232793 357639985 131794601 614265903 97753625 255390185 491932062 445078224 590720469 4925...
result:
ok 199981 numbers
Test #43:
score: 0
Accepted
time: 108ms
memory: 13940kb
input:
99998
output:
17156474 58616485 829051873 711029546 975132700 12418168 134595225 110142953 670901744 329589049 408273863 107668137 464830475 626731014 152791202 821053974 682975336 159219695 691849101 681461189 566922268 891974345 433442560 134122637 287407951 977700776 349954291 31814891 908160957 364907279 7631...
result:
ok 199995 numbers
Test #44:
score: 0
Accepted
time: 105ms
memory: 13944kb
input:
99999
output:
17356471 336205800 716407969 265808066 467982896 707717390 42173201 36454520 35077388 552299776 107496575 858937527 307770847 235544733 317781094 110806988 982682780 518329361 127379267 430658803 725441402 441858236 739451999 131830944 606313613 57218088 296558292 161895535 169981585 919178151 34967...
result:
ok 199997 numbers
Test #45:
score: 0
Accepted
time: 104ms
memory: 13916kb
input:
100000
output:
17556470 717533947 17197166 533038101 985218121 771030483 607669380 105632566 887065213 726120835 481963731 859558224 189988204 808441939 688787372 518867264 431165945 441998729 732424606 647108796 835466385 269399868 637478868 348688444 177916448 728740136 194776182 851567226 383023187 229491295 14...
result:
ok 199999 numbers