QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#356370 | #1098. 多项式复合逆 | NOI_AK_ME | 7 | 243ms | 22020kb | C++23 | 3.7kb | 2024-03-17 18:15:10 | 2024-03-17 18:15:11 |
Judging History
answer
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef unsigned long long ull;
const int mod = 998244353, o = 15, len = 1 << o, b = 130;
int n, a[len], f[len], iv[len];
inline void reduce(int &x) {
x += (x >> 31) & mod;
}
inline int power(int a, int n) {
int tp = 1;
while (n) {
if (n & 1)
tp = 1ll * tp * a % mod;
a = 1ll * a * a % mod, n >>= 1;
}
return tp;
}
namespace poly {
int w[len], r[len], up, l;
void init() {
const int w0 = power(3, (mod - 1) >> o);
w[len >> 1] = 1;
for (int i = (len >> 1) + 1; i < len; i++)
w[i] = 1ll * w[i - 1] * w0 % mod;
for (int i = (len >> 1) - 1; i; i--)
w[i] = w[i << 1];
iv[1] = 1;
for (int i = 2, j; i <= n; i++) {
j = mod / i + 1;
iv[i] = 1ll * j * iv[i * j - mod] % mod;
}
}
void ntt(int *a, int n, bool op) {
static ull t[len], x, y;
for (int i = 0; i < n; i++)
t[i] = a[r[i]];
for (int l = 1; l < n; l <<= 1) {
int *k = w + l;
for (ull *f = t; f != t + n; f += l)
for (int *j = k; j != k + l; j++, f++) {
x = *f, y = f[l] * *j % mod;
f[l] = x + mod - y, *f += y;
}
}
if (op) {
for (int i = 0, x = mod - ((mod - 1) >> l); i < n; i++)
a[i] = t[i] * x % mod;
reverse(a + 1, a + n);
} else
for (int i = 0; i < n; i++)
a[i] = t[i] % mod;
}
inline void pre(int n) {
up = 1, l = 0;
while (up <= n)
up <<= 1, l++;
for (int i = 0; i < up; i++)
r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
}
void inv(int *a, int n, int *f) {
static int x[len];
if (!n) {
f[0] = power(a[0], mod - 2);
return;
}
int lt = (n == 1 ? 0 : (n + 1) >> 1);
inv(a, lt, f);
memcpy(x, a, (n + 1) << 2);
pre(n + lt * 2), ntt(x, up, 0), ntt(f, up, 0);
for (int i = 0; i < up; i++)
reduce(f[i] = (2 * f[i] - 1ll * f[i] * f[i] % mod * x[i]) % mod);
ntt(f, up, 1);
fill(x, x + up, 0), fill(f + n + 1, f + up, 0);
}
void inver(int *a, int n, int *f) {
static int x[len], y[len], g[b][len], py[len];
for (int i = 0; i < n; i++)
x[i] = a[i + 1];
inv(x, n - 1, y);
g[0][0] = 1, memcpy(g[1], y, n << 2);
pre((n - 1) << 1);
ntt(y, up, 0);
memset(x, 0, sizeof x);
for (int t = 2; t < b; t++) {
memcpy(x, g[t - 1], n << 2);
ntt(x, up, 0);
for (int i = 0; i < up; i++)
g[t][i] = 1ll * x[i] * y[i] % mod;
ntt(g[t], up, 1);
fill(g[t] + n, g[t] + up, 0), fill(x, x + up, 0);
}
memcpy(x, g[b - 1], n << 2);
ntt(x, up, 0);
py[0] = 1;
for (int i = 0; i < up; i++)
y[i] = 1ll * x[i] * y[i] % mod;
ntt(y, up, 1), fill(y + n, y + up, 0), ntt(y, up, 0);
for (int t = 0; t * b <= n; t++) {
for (int j = 0; j < b && t * b + j <= n; j++) {
ull s = 0;
int p = t * b + j;
for (int i = 0; i < p; i++) {
s += 1ll * py[i] * g[j][p - 1 - i];
if (!(i & 15))
s %= mod;
}
f[p] = s % mod * iv[p] % mod;
}
ntt(py, up, 0);
for (int i = 0; i < up; i++)
py[i] = 1ll * py[i] * y[i] % mod;
ntt(py, up, 1);
fill(py + n, py + up, 0);
}
}
}
int main() {
cin >> n, n--;
for (int i = 0; i <= n; i++)
scanf("%d", a + i);
poly::init();
poly::inver(a, n, f);
for (int i = 0; i <= n; i++)
printf("%d%c", f[i], " \n"[i == n]);
}
详细
Subtask #1:
score: 1
Accepted
Test #1:
score: 1
Accepted
time: 0ms
memory: 20508kb
input:
10 0 482489159 284392228 175130719 106560389 524766645 688673066 704125885 103606190 744337759
output:
0 403565917 722348898 212373570 70344818 552960467 627234437 521499134 749213359 527708013
result:
ok 10 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 18516kb
input:
7 0 67723255 963748660 450953230 692314616 881897597 514354565
output:
0 463521861 789917981 241619069 614032541 389515910 287070433
result:
ok 7 numbers
Test #3:
score: 0
Accepted
time: 2ms
memory: 20588kb
input:
5 0 421312558 393838585 0 0
output:
0 7288836 523801396 123359649 983069534
result:
ok 5 number(s): "0 7288836 523801396 123359649 983069534"
Test #4:
score: 0
Accepted
time: 0ms
memory: 20464kb
input:
10 0 801878424 341342216 941798983 984836848 353869485 962101344 493428223 408956490 449562621
output:
0 387089923 872325296 890930829 103170501 343666664 227474888 984491691 410312427 952874418
result:
ok 10 numbers
Test #5:
score: 0
Accepted
time: 3ms
memory: 20396kb
input:
9 0 598468320 644453085 494305366 629585356 241251239 353077090 285526227 504587856
output:
0 124097070 263818072 530512145 612083778 891229246 386703541 848843206 787008182
result:
ok 9 numbers
Subtask #2:
score: 1
Accepted
Dependency #1:
100%
Accepted
Test #6:
score: 1
Accepted
time: 8ms
memory: 18788kb
input:
997 0 968319609 509860895 153515242 600756696 542768627 798866409 385818355 420946077 848827116 910394784 459460677 709888679 9530403 294892032 654097038 207202500 409309123 522776440 975506175 88876107 669381603 722740509 549393530 497060306 288411117 634087922 909331640 754393456 200677518 1611984...
output:
0 934142440 662194953 989223213 333166939 46525108 839821872 148595111 635585457 13949441 147828538 93803320 412368226 941840091 841559911 792071754 684666095 837450133 187154480 728832113 190400411 18465971 188977178 456550469 273454749 281159729 954560558 725174428 984287710 863132378 457970341 61...
result:
ok 997 numbers
Test #7:
score: 0
Accepted
time: 8ms
memory: 20588kb
input:
996 0 343376890 102769591 584195155 493738676 903423994 997618982 432164648 569623303 777023137 938928191 982320914 48511790 446086547 457634250 476784356 408387060 56044740 625518122 493022802 295015975 587461279 420806714 900219263 521422309 604797831 127758873 655883342 36459995 628084663 2279260...
output:
0 610046618 923310701 473576498 242643450 604425119 870716402 29763465 225593941 898674727 810474884 673362 58778068 299759156 7608667 507797631 423816862 407454955 638713875 100455597 101715449 241303974 151704642 205063964 383052445 485026175 590544505 944202856 562733668 382985916 579573499 97092...
result:
ok 996 numbers
Test #8:
score: 0
Accepted
time: 7ms
memory: 20532kb
input:
998 0 426727698 0 15604032 535570299 646260380 65982964 878366540 0 483759262 821784857 0 0 210627770 0 0 398387211 0 530011358 144730461 88692974 0 0 0 306183169 0 0 139296312 331419517 0 764893071 70056120 335720216 601196174 842723536 47469344 253514001 0 158822334 0 338061633 0 657406579 3168350...
output:
0 665890480 0 653173226 219894443 617644225 293264450 725384586 978998855 653486899 748172993 148448011 904711088 333170692 556022353 835118394 692177611 772760727 296639357 632577737 588107841 811145081 138554291 834737530 40548053 342166235 766276178 146695328 927470674 837667085 216292198 1729931...
result:
ok 998 numbers
Test #9:
score: 0
Accepted
time: 7ms
memory: 20656kb
input:
998 0 489693425 265084187 698012574 771306095 391413405 476076652 347567482 554594725 152576930 180724631 250869925 197660145 660684107 845040665 270057155 164096794 592411882 950908957 886527128 618482499 487905342 170560185 884330287 111888373 170569656 570591145 600290429 876919780 769810482 4694...
output:
0 682223983 490241581 812026825 295044971 101302222 944166700 949694819 539107896 293601563 621267734 77029035 446807283 747081403 722818871 158617062 676313154 731432024 201007678 307426873 575365262 326036816 119139118 806589026 669340006 687419624 130958270 987132107 654482768 296518568 424772753...
result:
ok 998 numbers
Test #10:
score: 0
Accepted
time: 7ms
memory: 20652kb
input:
1000 0 664564139 406922557 976480332 635941105 379827055 280282511 981622877 379929911 994923629 664793246 303907334 13837744 356744373 549270882 150702198 181765521 3019770 932002787 646642365 737346718 327232923 385928331 434050032 719438478 2101905 164601268 258488988 476909337 324936975 22999863...
output:
0 552143786 761342934 717745684 822668616 97326581 335913756 812315876 109128869 319376547 244840876 780790937 490933868 988185599 819146952 886989582 963515634 187304358 15108977 899828850 297534264 722357102 702518988 952483021 884250953 937802982 884668898 441283413 70700852 531062759 33516438 62...
result:
ok 1000 numbers
Subtask #3:
score: 1
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Test #11:
score: 1
Accepted
time: 11ms
memory: 20772kb
input:
1997 0 685183886 579079874 968503536 195860044 153330993 918416932 535084982 745990387 399748400 162388638 808320325 180886911 397309509 216418046 319198312 349438003 141596877 254822443 252158341 663124362 718635588 927200614 399935085 21169885 915884845 660270181 262636228 994770254 852325473 9017...
output:
0 428816988 696860837 837565504 197447424 642096292 68783842 860447554 202809780 223322542 762568697 329119759 391868440 280333806 494761529 641416742 432084129 301664342 625368357 924852940 601238944 710303223 413714877 68876210 580652282 995437338 643977613 53853085 249507845 345488241 281348777 7...
result:
ok 1997 numbers
Test #12:
score: 0
Accepted
time: 15ms
memory: 20616kb
input:
2000 0 124099488 387009336 281376613 80816790 472340621 418342229 432324085 657740855 529408829 752476445 397438588 209604222 855877953 564629941 244821890 952372625 500542762 740784377 641164521 38620013 549410041 652511561 530198945 17617103 528217396 914504265 222676077 980986753 207779032 177719...
output:
0 831429995 764545387 93142402 720689657 439120295 808319414 316268973 312667414 416073284 703873172 221558347 82670922 41458437 244115473 153267780 839757906 697017790 849050261 13213124 603992565 420418966 926829161 609188295 263441717 437960360 18222829 191893514 602853904 295751479 958748025 956...
result:
ok 2000 numbers
Test #13:
score: 0
Accepted
time: 14ms
memory: 18992kb
input:
1997 0 209746029 0 40611169 970387530 0 0 0 0 0 992946798 0 0 955367110 0 0 0 0 538752156 0 276740355 476738384 595518855 434637990 0 663996114 698813951 161724196 0 0 672922325 0 188570740 0 631166892 60645694 0 37501601 7296453 448970082 138248519 739273969 0 441460697 801084136 81308290 8977152 7...
output:
0 372722143 0 892365184 157472137 966041124 356146560 817242801 391929701 665391953 356731041 119091702 147084774 796617441 245769999 923355339 957696572 31032114 538082110 553671435 110778110 783736669 986393336 925671933 334110154 669393422 399715800 553777972 309543158 263107289 232181855 9021076...
result:
ok 1997 numbers
Test #14:
score: 0
Accepted
time: 10ms
memory: 20612kb
input:
1996 0 222603514 52680703 994877972 648815254 236243939 266700003 932069799 322982293 909513007 117784588 343952427 794696099 582470055 864130762 185048458 140184719 395805795 804599571 218256446 707878940 438199174 46919990 48946686 105058131 919822918 811379407 370440670 389834339 967661435 911990...
output:
0 318977037 879652452 477185577 387131819 635499453 964900783 444234107 118651109 148961323 92553221 632657137 854767699 923935714 533344045 2320064 715107892 816644241 87532842 488281683 235505702 1995894 595377738 572841325 241039855 484206017 160302477 493432493 793550325 934660701 744435013 9738...
result:
ok 1996 numbers
Test #15:
score: 0
Accepted
time: 14ms
memory: 20596kb
input:
1996 0 914435946 731966111 748087835 201475658 857820621 812144870 475335839 228242555 844404536 261632152 133082691 334188322 427196877 184224668 677631169 588630478 112706344 146034045 779162059 893152563 366557561 991770192 483159400 186918807 30233796 637311678 304428112 788947665 174633174 7108...
output:
0 253924649 695312604 368049828 644761782 139224726 370746536 110438781 188683221 255244094 897979688 451714234 793829708 236464270 597685598 29867847 346734362 314365383 172694650 954560018 250492126 759454887 901303945 338128757 904749475 868213043 863494852 695607100 617616888 458145158 501461208...
result:
ok 1996 numbers
Subtask #4:
score: 1
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Test #16:
score: 1
Accepted
time: 27ms
memory: 20972kb
input:
3996 0 62756732 557525501 500152560 536867575 943307688 757910862 229314731 648479267 909564616 87868870 849097336 224676326 331340940 432834552 591042196 719598173 474522791 428418453 981244909 973601131 409696517 68108878 252229954 28872345 816225334 213583178 367818800 92815417 747866164 51260936...
output:
0 290739126 44180941 630281548 502729775 982197016 46974584 8289121 216092085 981249658 543589307 805180518 959816943 282072344 889983191 152439429 145940788 281243843 203760831 90579837 39754337 394476637 679676126 405594567 55067986 108642406 79770423 27788063 218458145 348486580 410820999 4934532...
result:
ok 3996 numbers
Test #17:
score: 0
Accepted
time: 23ms
memory: 19344kb
input:
3998 0 239768459 523166573 387991607 229278267 642448452 172569321 623879153 956043821 272981673 507916358 174583946 383548682 199826869 443041143 493426166 290939874 309811049 800571105 193749506 584656257 919268539 943433590 108610603 500716681 516403717 668611514 703914880 234060577 946569122 958...
output:
0 492280878 565175743 523705173 793169364 512896702 190951005 717637909 887114698 594151869 729116541 235030325 985278157 118203577 1879646 430648883 987723891 147451243 548297222 757589020 486337831 786781684 736508891 666433731 767437006 154602450 150376824 717644837 338684070 20758913 142913625 2...
result:
ok 3998 numbers
Test #18:
score: 0
Accepted
time: 28ms
memory: 20864kb
input:
4000 0 990262363 784728715 0 48653967 661794470 0 0 761855953 0 488058298 0 806096107 599220192 0 0 350782943 106090546 660651509 0 932348800 0 0 325769216 433507093 873985641 637364549 592323817 596544869 0 791731947 576500187 0 0 519734314 820936952 0 141231662 0 0 0 0 0 0 0 544352502 0 307705901 ...
output:
0 124022449 370137895 646695328 247483662 577122650 260204752 191272848 473865171 176418754 433378360 964318657 183416144 361926209 333990969 99995251 602188684 681989610 721280608 825321580 296755220 956934909 122371610 786676216 548732205 531416788 809766633 409263683 770014522 134863829 403214015...
result:
ok 4000 numbers
Test #19:
score: 0
Accepted
time: 24ms
memory: 20660kb
input:
3996 0 211439350 853180827 920012514 221446345 822427295 428733276 678983398 879708095 442805484 451418507 228643259 447068770 122397201 395681807 698907010 18379137 763777976 783439003 68988362 517030006 757426258 960730022 74340886 282530925 20179244 803685505 791858278 783902983 943271398 6645719...
output:
0 316233882 463291215 389210872 625590305 974457260 139261992 522147303 492567001 40153852 805428937 921213818 124916295 97494661 216604085 948888670 904357978 264401205 355804109 81367315 424005429 183745098 893297589 783737674 174882447 246032001 729345771 569267889 30810622 108243087 644439386 47...
result:
ok 3996 numbers
Test #20:
score: 0
Accepted
time: 29ms
memory: 19364kb
input:
3998 0 861660425 178495165 534405937 647219498 53979446 906373810 857736018 749942607 191193878 830712635 242085593 389574943 958113576 874167106 675012572 246072352 79650223 142850806 273757699 161229643 694297458 259049524 54827 763682219 135151812 732506569 837996603 723186425 335497349 112887012...
output:
0 736311932 185101090 430146188 21352733 678637743 89180426 771623521 541044937 550873552 651244308 594704587 412250498 864621175 253842830 925964912 181798176 994158013 625654127 707494224 849772481 922592511 974453848 693983984 85980419 807015907 816696904 660539615 34859521 3736978 441097791 2071...
result:
ok 3998 numbers
Subtask #5:
score: 1
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Test #21:
score: 1
Accepted
time: 77ms
memory: 21280kb
input:
6996 0 648833046 373590860 177304722 884907483 219479322 187111957 947100467 547518093 137435215 818046593 159962385 778093152 660344727 261355738 867979465 671025981 562473011 833205795 549153691 297531523 657998150 544044104 205553050 776466305 970701245 870614285 496487021 879448778 473401445 935...
output:
0 575377182 642392483 328401592 308859679 621668697 422643363 850018903 496835183 958853996 648501450 777254327 954174347 593443386 114866814 661028390 668749290 116187865 650203064 613047777 330800019 284042620 130259494 68072114 13793670 405626734 501155649 227339686 637451342 867646510 213419575 ...
result:
ok 6996 numbers
Test #22:
score: 0
Accepted
time: 67ms
memory: 20024kb
input:
6998 0 71733047 226583996 639643323 95546912 922784610 511111467 513679421 247554079 215856527 400660640 275953074 939261729 169632215 896590020 130632460 788973399 964257933 479606084 744401319 943941554 612360191 919006827 315645133 140962416 583494302 830807545 32863860 853144901 223203937 748539...
output:
0 369477988 749485208 952172075 233135318 640367437 919686167 229681866 737084793 630098535 965074229 426128144 955854374 546719922 733372615 818941581 2507671 645875056 335309109 543522945 621905633 200506728 629199608 706236275 20767689 385850472 349016800 136669711 650036774 346247670 10859536 88...
result:
ok 6998 numbers
Test #23:
score: 0
Accepted
time: 72ms
memory: 20100kb
input:
7000 0 409399599 0 583277833 0 176262911 891896787 990889754 546706976 0 90892406 0 0 0 417191238 441917207 0 0 0 0 0 0 0 598773940 0 0 376340781 0 540553072 0 0 947056910 0 0 746134911 0 0 553840341 0 0 243587086 66769341 81640851 822612335 0 0 0 0 0 230470096 807408119 0 0 539731217 456987966 0 0 ...
output:
0 653781446 0 103485026 0 238793611 457763788 701310698 13825675 317582929 546087918 3795306 577482301 451796621 765995558 897279159 486120010 513799701 940234953 633048227 300007811 601970149 170424441 414386260 236159069 932885007 87151753 608291097 482325749 948514801 540135912 21402672 709486581...
result:
ok 7000 numbers
Test #24:
score: 0
Accepted
time: 74ms
memory: 21076kb
input:
6999 0 539709872 699306399 71797653 94911604 700896867 642741772 333867759 677720853 134919676 181711912 604530454 485419807 856768846 976815479 882622084 985900277 212772766 301836268 263362460 49567001 649953172 795098596 511504695 220972547 675891756 854763758 351530886 978461941 540206965 340620...
output:
0 835536509 359472053 981542167 419578370 134684386 233544866 609052055 446360923 390053516 132442013 187371717 551939784 583834583 527751541 460458057 71465123 48866157 108709039 237811597 913575599 930042884 682399727 426128239 83141961 863420710 635986486 934859770 285874182 607939155 234651713 5...
result:
ok 6999 numbers
Test #25:
score: 0
Accepted
time: 78ms
memory: 21220kb
input:
6996 0 918611323 506491294 336427641 493829955 457740219 481529030 680402730 86426146 187901281 760955514 540603745 447236723 541542115 70957421 952944889 476824155 166175140 273798732 741046256 163719033 172848020 794802895 595350826 481041570 358805295 782327795 34315004 560381040 550466608 590507...
output:
0 872932248 433369118 315680623 511433941 768770967 540550084 663139730 220444413 64815286 694828477 963226665 139272703 147342699 762620708 218795863 718545427 334126932 209297572 183525613 341005839 215609511 681931322 445675792 557085697 286376464 197906027 838869745 312397527 227309350 861493951...
result:
ok 6996 numbers
Subtask #6:
score: 1
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Test #26:
score: 1
Accepted
time: 175ms
memory: 21964kb
input:
9997 0 20595644 821349252 669562559 237124612 81576518 424529115 951962182 953029849 752367214 692527496 390991794 341328219 618863342 640342295 263085958 954712231 378445670 166704317 698914287 692461027 990715383 134552584 64562858 646514727 450350949 773296738 731381607 25704644 230292060 7009351...
output:
0 686303159 772381119 360295262 567746060 734090809 922717477 348917508 699488855 870998586 276041930 446318237 156328537 789251099 647746555 377081353 192835575 364598977 58905888 352724362 94938296 337635485 993349704 46646338 394806369 668470304 401473022 750548577 612942428 595875095 411298544 9...
result:
ok 9997 numbers
Test #27:
score: 0
Accepted
time: 175ms
memory: 21412kb
input:
9996 0 225855649 979486462 416992765 391797931 54716805 255467950 104292552 251448530 55399662 594325487 862420526 104971766 776602006 880735693 835009166 575281166 838437905 162399226 698318784 702160436 568909572 350265309 109105127 913042871 845190853 552826785 12144581 762978308 775497047 533158...
output:
0 82706381 380313181 900183157 178875165 14810860 963435209 58363926 665485961 807445472 428210594 95167994 796451546 662323597 974125299 144534548 290100326 368602031 825171402 711877759 370066848 930114209 647504015 487526025 449065811 156294661 472621396 241213636 213234940 627215293 205435202 34...
result:
ok 9996 numbers
Test #28:
score: 0
Accepted
time: 174ms
memory: 22020kb
input:
9995 0 236172788 0 0 0 603680253 368168998 0 0 0 456240536 0 0 352429390 497506995 857754066 701206174 969355733 0 0 537815016 497073529 888716552 0 0 0 633095207 387274332 170170652 0 790291212 0 0 731164908 103216449 0 0 181757082 596190496 128190693 206963190 523842527 754978950 0 0 455126019 217...
output:
0 131758850 0 0 0 499144450 400393866 0 0 753905787 293987969 156883830 0 524804088 645192969 382935193 78763243 509483549 758019989 540042299 35533996 679573529 583973364 812392891 854381680 358150742 739559588 816702007 346127901 100893882 4082573 439823947 402465841 751800219 497976123 722570743 ...
result:
ok 9995 numbers
Test #29:
score: 0
Accepted
time: 170ms
memory: 21616kb
input:
10000 0 44245861 650300672 217035181 707559151 564258816 401264798 793434473 360506062 810684683 362326252 768625224 66270699 234024001 707079634 169179254 820683920 733777920 26838286 919511645 787936432 771713095 879261355 214124749 519231156 432783358 336479228 961568372 150807696 784351554 57637...
output:
0 593088375 394086836 361086731 567555653 840865960 829858552 609979159 369747311 604589372 587011765 895784317 700119620 348599384 870257123 197494584 766939548 681484143 59373113 702341632 658847633 846053088 84719369 395624086 153395915 929850949 661494219 125073568 839416807 644340028 386047844 ...
result:
ok 10000 numbers
Test #30:
score: 0
Accepted
time: 174ms
memory: 21924kb
input:
9999 0 844573640 298432836 275132432 673698532 453840204 987579097 756375030 571701291 35627930 507935715 92095639 748042990 843429153 547834731 237766597 917908047 177519769 882983339 117723049 205100810 264293657 367861783 843445601 17730082 175931954 937868340 734059988 612390955 816773812 891540...
output:
0 492805694 673069558 450853602 15160831 252085049 95418331 885420150 641922435 893505262 597585185 393120709 483694161 810230514 722129068 749632730 207712261 311205826 671218284 787273515 847428024 543673583 655310359 811729194 353034934 924914759 584923589 485673025 816825807 172358192 554440584 ...
result:
ok 9999 numbers
Subtask #7:
score: 1
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Test #31:
score: 1
Accepted
time: 243ms
memory: 21480kb
input:
15000 0 942217174 264005048 140822954 785809300 605253307 517762985 259589364 24027037 702942772 913700892 265487071 24548547 985247026 123110978 990368083 153945923 420828539 476634256 386918494 796181087 23494850 938519147 637365198 895550976 234222512 289620106 352239387 672314288 878778491 34559...
output:
0 435194502 871718319 885382792 989813248 117146102 966306723 304083011 279828612 498760694 36561474 397974814 953950412 756328318 711184156 572696251 656228238 206164545 882919314 993073034 366419076 310980765 77651481 911645990 495833715 771357894 351769851 119598808 285090396 53705710 743988228 1...
result:
ok 15000 numbers
Test #32:
score: 0
Accepted
time: 239ms
memory: 21624kb
input:
14999 0 458778691 609893083 239737850 297572961 365663120 683481665 887380275 502566974 600072237 600333171 787427804 892101125 957636708 28019715 224316344 300766642 641392269 723322245 642103593 368448010 334481811 501307866 670620314 425485301 918006940 617885859 73058945 101936462 314454363 7261...
output:
0 167891926 7561084 279719246 151942820 250822920 939916920 215114833 752950051 843046553 794993982 262052498 577244187 605563312 566276919 347014141 311006767 838585730 494280923 175274260 166745289 533747491 708208878 613038260 365608797 834024475 766483533 961121448 166725658 853869445 560986390 ...
result:
ok 14999 numbers
Test #33:
score: 0
Accepted
time: 242ms
memory: 21868kb
input:
14998 0 397729928 0 0 0 0 117568309 594795519 0 0 0 0 0 0 0 0 765550685 54930190 0 0 899680179 732642794 751962734 0 664595900 864939643 0 907864118 0 0 572282002 705340031 924780988 667710442 520565160 331619644 0 449136521 293258452 0 3885599 229671026 699130563 940022472 0 0 0 657621943 0 0 77481...
output:
0 924772328 0 0 0 0 198096762 46709037 0 0 0 952939741 238684527 132702751 0 0 113263919 97826566 217655193 435881216 888462191 424418140 61074121 113711720 295326437 525804512 612625915 745124226 739739130 31498068 990551724 394156958 680982312 553465636 958981968 671404437 355944811 874478454 4321...
result:
ok 14998 numbers
Test #34:
score: 0
Accepted
time: 234ms
memory: 21568kb
input:
14999 0 797796306 131862929 771817171 506922082 59141324 504807188 373088593 570763025 893943941 134902570 600935342 18685170 723221318 706068845 237772003 372797134 752506360 938409539 701313971 94955414 670223948 895987852 219224778 727444554 75292068 650349850 17756333 324669323 98803235 21353826...
output:
0 615026365 381263923 823447041 355709771 546163756 152795144 196296664 121456856 661508042 456907426 241465384 82771283 376669109 82556804 731449012 355689338 663142912 275359673 61834538 403490705 430827021 130604376 676094999 712221525 633655770 314604730 215768691 995581446 148516400 194899307 4...
result:
ok 14999 numbers
Test #35:
score: 0
Accepted
time: 240ms
memory: 22016kb
input:
14998 0 209748865 959877141 374982077 637873882 895593736 4686285 21237299 804578819 323349831 660061446 505769007 655717478 212435314 94656914 167093243 822522510 47884289 393865883 399654694 534747165 490795082 26423238 704185611 530482548 184768612 306934273 70338842 973899839 497910675 348841464...
output:
0 113122200 361760185 278369372 568028149 291910193 20438389 536104560 931882023 649009985 474698353 112394964 438716486 89493619 888252390 228320118 231522985 538092925 508969670 580406309 306109047 737413077 590941128 373627241 669904859 437768919 228382862 442683962 392014988 997524521 476506956 ...
result:
ok 14998 numbers
Subtask #8:
score: 0
Runtime Error
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Dependency #7:
100%
Accepted
Test #36:
score: 0
Runtime Error
input:
19999 0 382382671 162342098 739097772 295023970 381422128 73160295 982735270 185867013 600844767 215121085 963096836 934238095 240781441 857348186 855859105 105375942 80240190 800723316 691499596 174030335 350407417 271247108 983237186 91628145 742718737 286491507 15049061 159448643 463347612 519440...
output:
result:
Subtask #9:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Dependency #7:
100%
Accepted
Dependency #8:
0%
Subtask #10:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Dependency #7:
100%
Accepted
Dependency #8:
0%