QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#544520 | #8943. Challenge Matrix Multiplication | ucup-team4821# | ML | 2257ms | 246020kb | C++20 | 2.4kb | 2024-09-02 18:11:45 | 2024-09-02 18:11:47 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 1000005, K = 61;
int n, m, k, in[N], ans[N], last[K][K], sum[K];
vector<int> e[N], ch[K];
vector<int> to[K];
bitset<N> mark[K];
int main() {
ios::sync_with_stdio(0), cin.tie(0);
cin >> n >> m;
for(int i=1;i!=K;++i)
to[i].reserve(N);
for (int i = 1; i <= m; ++i) {
int u, v;
cin >> u >> v;
e[u].push_back(v);
++in[v];
}
while (m > 0) {
for (int i = 1; i <= n; ++i) {
if (!in[i] && !e[i].empty()) {
int u = i;
ch[++k].push_back(u);
while (!e[u].empty()) {
int v = e[u].back();
e[u].pop_back();
--in[v];
u = v;
ch[k].push_back(v);
--m;
}
break;
}
}
}
assert(k <= 60);
for (int u = n; u >= 1; --u) {
vector<int> seq;
for (int i = 1; i <= k; ++i) {
if (!ch[i].empty() && ch[i].back() == u) {
seq.push_back(i);
}
}
if (seq.empty()) {
ans[u] = 1;
continue;
}
int t = seq.size();
int i = seq[0];
for (int y = 1; y < t; ++y) {
int j = seq[y];
for (int o = last[i][j]; o < (int) to[j].size(); ++o) {
int x = to[j][o];
if (!mark[i][x]) {
mark[i][x] = 1;
to[i].push_back(x);
}
}
}
mark[i][u] = 1;
to[i].push_back(u);
for (int y = 1; y < t; ++y) {
int j = seq[y];
for (int o = last[j][i]; o < (int) to[i].size(); ++o) {
int x = to[i][o];
if (!mark[j][x]) {
mark[j][x] = 1;
to[j].push_back(x);
}
}
}
ans[u] = to[i].size();
for (int x = 0; x < t; ++x) {
for (int y = 0; y < t; ++y) {
last[seq[x]][seq[y]] = ans[u];
}
}
for (auto j : seq) {
assert(to[j].size() == ans[u]);
ch[j].pop_back();
}
}
for (int i = 1; i <= n; ++i) cout << ans[i] << " \n"[i == n];
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 7684kb
input:
4 6 1 3 2 3 2 4 1 2 1 3 1 3
output:
4 3 1 1
result:
ok 4 number(s): "4 3 1 1"
Test #2:
score: 0
Accepted
time: 0ms
memory: 5916kb
input:
5 7 1 4 1 5 1 2 2 4 3 4 2 5 1 4
output:
4 3 2 1 1
result:
ok 5 number(s): "4 3 2 1 1"
Test #3:
score: 0
Accepted
time: 2ms
memory: 5736kb
input:
100 900 89 90 34 35 45 46 97 98 41 42 59 61 19 20 25 29 2 3 28 29 54 55 77 78 69 74 60 61 43 44 13 14 92 93 65 66 68 69 72 73 78 81 54 56 55 60 14 15 9 10 92 93 10 11 18 19 16 17 97 98 76 77 39 40 71 72 7 8 63 64 7 8 16 24 13 24 83 84 90 91 1 4 4 5 96 97 81 82 91 92 80 81 66 67 19 20 3 4 9 10 47 48 ...
output:
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
result:
ok 100 numbers
Test #4:
score: 0
Accepted
time: 2ms
memory: 5808kb
input:
100 900 71 72 22 26 21 22 15 22 97 98 43 44 64 65 87 88 79 81 90 93 54 55 96 97 64 67 64 88 24 25 71 72 47 48 49 51 72 75 12 14 66 67 6 7 90 91 14 15 73 74 99 100 66 73 84 85 34 35 94 95 88 89 16 17 17 20 56 57 13 14 13 14 48 51 80 81 7 9 26 27 42 44 86 87 31 36 82 83 54 55 7 8 20 21 41 42 17 18 91 ...
output:
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
result:
ok 100 numbers
Test #5:
score: 0
Accepted
time: 0ms
memory: 6056kb
input:
100 916 93 97 2 3 77 78 47 50 23 24 25 31 31 32 59 61 69 74 8 9 4 5 30 31 73 74 3 4 12 15 36 37 80 84 44 47 84 85 9 18 78 79 74 76 45 46 89 96 76 78 20 21 22 24 35 36 20 22 36 37 25 26 82 83 40 42 95 96 29 30 92 93 93 94 21 22 34 35 65 66 32 33 71 72 9 11 87 88 69 71 12 13 46 47 3 4 3 4 59 62 64 65 ...
output:
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
result:
ok 100 numbers
Test #6:
score: 0
Accepted
time: 2ms
memory: 5756kb
input:
100 843 62 64 78 80 10 11 31 37 37 48 64 66 24 25 77 79 68 69 10 11 76 78 89 90 37 41 20 21 42 43 30 36 47 48 66 68 10 11 18 21 59 62 30 31 42 49 56 66 78 83 37 39 65 67 96 97 24 73 26 28 21 22 82 83 94 96 39 40 8 10 89 90 51 52 92 93 85 87 34 62 6 7 97 98 13 14 5 6 29 30 7 10 41 42 70 71 21 23 48 5...
output:
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
result:
ok 100 numbers
Test #7:
score: 0
Accepted
time: 2ms
memory: 5820kb
input:
100 910 74 75 90 91 66 67 84 85 56 57 86 87 29 30 92 93 30 53 91 92 55 58 43 44 58 59 65 66 75 76 46 47 50 51 99 100 57 58 37 39 75 77 35 36 2 3 39 41 70 71 85 86 4 5 56 57 28 29 67 69 98 99 3 4 80 81 9 12 9 10 79 80 68 70 3 4 72 73 81 82 54 55 97 98 7 8 94 97 69 70 56 57 69 71 6 7 49 50 26 27 80 81...
output:
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
result:
ok 100 numbers
Test #8:
score: 0
Accepted
time: 317ms
memory: 63908kb
input:
300000 1000000 291518 291525 162078 162095 107433 107434 117028 117029 252973 252975 34296 34301 17712 17713 168224 168227 5479 5480 96730 96733 18177 18182 170140 170142 114143 114145 290862 290865 239489 239490 132218 132219 143908 143914 118103 118105 76237 76240 265590 265591 42005 42010 95874 9...
output:
296803 296802 296801 296800 296799 296797 296796 296796 296795 1 296794 296793 296792 296791 296790 296789 296788 296787 296786 296785 296784 296782 296782 296781 296780 296779 296778 296777 296776 296775 296774 296773 296772 296769 296770 296768 296768 296767 296766 296765 296764 296763 296762 2967...
result:
ok 300000 numbers
Test #9:
score: 0
Accepted
time: 834ms
memory: 143532kb
input:
300000 1000000 187606 187608 36565 36566 128950 128958 172669 172683 41451 41458 138127 138132 22729 22733 13633 13640 158041 158044 74504 74505 190220 190247 97877 97879 277477 277483 35531 35584 77716 77731 142348 142349 231107 231110 232636 232640 211702 211714 257036 257048 124062 124078 289660 ...
output:
291171 291174 291182 291188 291184 291166 291172 291157 1 291156 291183 291171 291181 291130 291178 291174 291173 291171 291155 291170 291165 291154 291150 291170 291169 291162 291164 291156 291164 291162 291160 291155 291157 291154 291156 291136 291155 291137 291149 291149 291153 291149 291145 2911...
result:
ok 300000 numbers
Test #10:
score: 0
Accepted
time: 674ms
memory: 136136kb
input:
300000 1000000 127190 127320 86211 86214 154425 154446 21608 21646 295649 295653 49413 49419 274753 274755 272272 272286 248246 248258 167611 167613 99630 99631 118018 118023 233539 233541 76885 76896 272148 272174 115623 115633 250825 250830 142266 142340 291868 291898 54308 54309 159123 159124 261...
output:
291386 291384 291383 291385 291378 291381 291366 291378 291380 291379 291378 291367 291376 291375 291365 291370 291373 291372 291369 291371 291366 291368 291364 291366 291363 291345 291363 291360 291357 291355 291351 291345 291355 291354 291353 291348 291350 291348 291345 291343 291348 291347 291345...
result:
ok 300000 numbers
Test #11:
score: 0
Accepted
time: 157ms
memory: 39656kb
input:
300000 622182 178651 178654 168896 168899 51002 51003 52671 52672 260458 260461 288275 288282 97920 97921 48060 48061 21907 21908 271103 271104 262840 262842 192846 192847 109062 109063 20122 20123 230639 230640 45404 45408 10054 10055 133116 133117 114713 114714 26310 26311 141682 141684 111622 111...
output:
299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 299958 299957...
result:
ok 300000 numbers
Test #12:
score: 0
Accepted
time: 449ms
memory: 96392kb
input:
700000 1000000 238263 238265 271765 271767 535443 535465 91436 91438 44996 45004 491072 491073 182658 182667 204466 204475 425640 425642 490507 490517 654032 654033 695412 695416 573184 573188 178765 178767 550768 550776 191441 191444 422916 422924 200846 200863 686525 686526 23786 23805 432819 4328...
output:
556560 1 556556 556558 556521 556557 556531 1 556556 556555 556555 1 556554 556553 556536 556552 556551 556549 556548 1 556541 556536 556540 556535 556537 556535 1 556536 556535 556531 556530 556241 556534 556530 556520 1 556529 556527 556530 556529 556513 556504 556525 556508 556526 1 556524 556496...
result:
ok 700000 numbers
Test #13:
score: 0
Accepted
time: 1553ms
memory: 212228kb
input:
700001 1000000 306352 306425 265123 265158 497711 497717 155684 155790 407614 407617 2099 2259 425834 425842 518856 518924 236978 236981 443915 443961 374152 374389 197908 197911 417118 417128 504272 504442 538611 538618 88243 88266 443775 443788 177312 177318 187300 187375 97432 97435 296402 296410...
output:
538889 1 538877 1 538869 538884 1 1 538877 538884 538851 538873 1 538883 538839 538876 538867 538714 1 1 538871 538850 538848 538845 1 1 538874 538848 538846 538866 538824 538868 538871 538810 538869 538787 538713 1 538867 538844 538825 538845 538845 538868 538826 538866 538866 538865 538844 538841 ...
result:
ok 700001 numbers
Test #14:
score: 0
Accepted
time: 1793ms
memory: 228500kb
input:
700001 1000000 589017 589042 590183 590194 552179 552193 577163 577185 5113 5129 515920 515923 63347 63349 552589 552591 694996 695011 556536 556716 228821 228823 10040 10068 615065 615080 381081 381154 160649 160677 269486 269797 667012 667041 59793 59811 187067 187095 611138 611146 549273 549277 3...
output:
538204 538252 538262 538261 538235 538105 538104 1 538261 538260 538185 538249 538050 538196 538238 538189 538190 538180 538238 538220 538114 538188 538233 538187 538191 1 538232 538221 538179 538220 538237 538215 538184 1 1 538013 538153 538211 538193 538207 538174 538220 538219 538198 538176 53820...
result:
ok 700001 numbers
Test #15:
score: 0
Accepted
time: 974ms
memory: 172348kb
input:
700000 1000000 120040 120043 263318 263322 22898 22912 466234 466235 513410 513421 38408 38414 570568 570571 109994 109995 176710 176727 139257 139264 170772 170781 678637 678645 224587 224593 60721 60726 586667 586677 14214 14224 330172 330196 599744 599745 81126 81189 273040 273056 511669 511677 5...
output:
1 540166 540123 540173 540168 540164 540167 540131 1 540132 540139 1 540162 1 540161 1 540141 540162 1 1 540074 540161 540160 1 540159 540135 540134 540148 540131 540147 1 1 540115 1 1 540146 540127 540138 1 540131 540137 1 540130 1 540126 540049 540123 540123 540128 540104 540125 540122 540048 5401...
result:
ok 700000 numbers
Test #16:
score: 0
Accepted
time: 542ms
memory: 109772kb
input:
700000 1000000 578333 578337 482970 482971 632615 632616 274899 274902 121483 121486 485898 485903 425408 425410 15506 15514 264010 264014 163025 163029 29696 29708 510561 510573 376805 376848 379761 379778 133594 133601 531948 531962 327842 327846 398006 398020 317404 317408 295029 295038 457342 45...
output:
545970 545963 1 545954 1 545962 545958 545962 545957 545949 545961 1 545948 1 1 545961 545961 545960 545956 545954 545955 1 545960 1 1 1 545919 1 545953 1 545947 545946 545945 545932 1 545934 545921 545936 545947 545933 545932 545942 545941 545926 545931 545936 1 545936 1 1 545920 545935 545932 5458...
result:
ok 700000 numbers
Test #17:
score: 0
Accepted
time: 209ms
memory: 56112kb
input:
700000 699998 243102 243103 86877 86878 618685 618686 212104 212105 441355 441356 470247 470248 540407 540408 27727 27728 50635 50636 66825 66826 399558 399559 277400 277401 389887 389888 30764 30765 454928 454929 376639 376640 619550 619551 449154 449155 56046 56047 47092 47093 492584 492585 342756...
output:
699999 699998 699997 699996 699995 699994 699993 699992 699991 699990 699989 699988 699987 699986 699985 699984 699983 699982 699981 699980 699979 699978 699977 699976 699975 699974 699973 699972 699971 699970 699969 699968 699967 699966 699965 699964 699963 699962 699961 699960 699959 699958 699957...
result:
ok 700000 numbers
Test #18:
score: 0
Accepted
time: 512ms
memory: 108036kb
input:
1000000 1000000 855434 855439 742537 742538 875464 875468 313713 313721 499109 499113 53966 53996 386316 386327 670014 670024 756822 756889 160756 160761 849007 849035 766125 766142 789030 789056 280721 280790 316643 316648 738437 738519 345352 345353 416793 416845 277161 277171 367258 367267 374694...
output:
660512 660505 660480 1 660510 660509 1 660508 660479 660508 660486 660485 660507 660504 660487 660488 1 1 660484 660487 660486 660447 660485 1 660470 1 1 660483 660487 660483 660480 1 1 660469 660479 660482 660481 660482 660480 660472 660475 660479 660478 1 660477 1 660473 660478 660475 660468 66047...
result:
ok 1000000 numbers
Test #19:
score: 0
Accepted
time: 1980ms
memory: 229876kb
input:
1000000 1000000 767191 767296 411052 411058 518939 518941 493475 493488 874578 874627 807369 807402 976382 976517 61774 61922 762004 762012 781188 781259 354101 354154 266537 266545 704921 704939 541522 541526 869380 869385 632577 632582 197669 197766 115346 115499 643783 643802 110485 110496 370421...
output:
638285 638150 638252 1 638262 1 638294 1 638284 638147 1 1 638269 1 1 1 1 638261 638239 1 638267 638251 638243 638261 1 638208 638246 1 1 638197 638202 638245 637954 638247 1 638251 638200 1 638245 638251 638268 1 638231 1 638238 1 638132 1 638244 1 638199 638244 638066 638243 1 1 1 1 638243 1 1 1 6...
result:
ok 1000000 numbers
Test #20:
score: 0
Accepted
time: 2257ms
memory: 246020kb
input:
1000000 1000000 368239 368287 235701 235811 449486 449489 763983 764020 294162 294183 900590 900600 335228 335400 241925 241982 165565 165585 210598 210740 992132 992136 138334 138376 742200 742261 407852 407935 572967 573022 779577 779624 641112 642260 142163 142188 610184 610202 735634 735643 8517...
output:
637172 637189 1 637184 637201 637170 637169 637200 637168 637172 1 637181 1 1 637196 1 637167 637148 637171 637185 1 1 637055 637196 637180 637190 1 1 637162 637179 1 637146 1 637187 637144 1 637156 637183 637147 1 636700 1 1 637161 1 637174 637154 637162 1 637178 637140 637160 1 1 637176 637113 1 1...
result:
ok 1000000 numbers
Test #21:
score: 0
Accepted
time: 1286ms
memory: 185576kb
input:
1000000 1000000 958691 958731 224623 224633 507702 507760 181747 181785 848190 848202 420905 420939 642870 642871 621801 621812 988528 988543 942226 942277 526176 526178 561566 561588 352214 352222 46395 46417 787559 787561 447678 447821 224044 224072 385772 385779 685720 685737 796154 796160 355933...
output:
640411 640410 1 640404 640403 640364 640393 1 640395 640362 1 1 640394 1 640324 640393 640349 1 640392 640366 640373 640361 1 1 640373 639868 1 1 640372 640343 1 640363 1 640361 1 640370 1 640339 1 640323 1 640360 640333 640365 1 1 640369 640341 1 1 1 640364 640363 640368 640362 640362 1 640355 6403...
result:
ok 1000000 numbers
Test #22:
score: 0
Accepted
time: 641ms
memory: 122276kb
input:
1000000 1000000 797897 797911 701410 701414 868242 868248 335308 335313 951737 951740 122233 122242 767448 768738 756033 756041 136033 136042 421604 421606 205530 205559 33387 33402 848923 849108 820686 820725 996799 996876 745298 745404 972785 972807 922900 922918 815937 815945 836876 836884 578928...
output:
651672 651671 651634 651633 1 1 651674 651658 1 1 1 651671 651658 651670 1 651657 1 651656 651657 651664 651660 651660 651659 1 651659 1 651645 651634 651658 1 651656 651657 651649 1 651633 651656 651655 651632 651653 651632 651648 1 1 651648 651631 651647 651645 651644 651638 1 651645 651643 651632...
result:
ok 1000000 numbers
Test #23:
score: 0
Accepted
time: 349ms
memory: 74136kb
input:
1000000 999998 446717 446718 612899 612900 245816 245817 491104 491105 881877 881878 537565 537566 164195 164196 297224 297225 277 278 84739 84740 512122 512123 835405 835406 41111 41112 150631 150632 236550 236551 614186 614187 967156 967157 6773 6774 989302 989303 608751 608752 341454 341455 24339...
output:
999999 999998 999997 999996 999995 999994 999993 999992 999991 999990 999989 999988 999987 999986 999985 999984 999983 999982 999981 999980 999979 999978 999977 999976 999975 999974 999973 999972 999971 999970 999969 999968 999967 999966 999965 999964 999963 999962 999961 999960 999959 999958 999957...
result:
ok 1000000 numbers
Test #24:
score: 0
Accepted
time: 149ms
memory: 88412kb
input:
400000 399999 30437 30438 81024 81025 43471 43472 157260 157261 129152 129153 191949 191950 279105 279106 240249 240250 71020 71021 373961 373962 154657 154658 290847 290848 144493 144494 312527 312528 174938 174939 52771 52772 103645 103646 78597 78598 37245 37246 154070 154071 244182 244183 304343...
output:
400000 399999 399998 399997 399996 399995 399994 399993 399992 399991 399990 399989 399988 399987 399986 399985 399984 399983 399982 399981 399980 399979 399978 399977 399976 399975 399974 399973 399972 399971 399970 399969 399968 399967 399966 399965 399964 399963 399962 399961 399960 399959 399958...
result:
ok 400000 numbers
Test #25:
score: 0
Accepted
time: 135ms
memory: 55848kb
input:
400000 399999 224483 224484 232812 232813 106431 106432 396635 396636 140349 140350 227245 227246 75317 75318 123481 123482 229704 229705 140469 140470 68300 68301 258773 258774 326821 326822 359403 359404 47915 47916 340559 340560 213212 213213 159561 159562 388352 388353 313565 313566 288872 28887...
output:
400000 399999 399998 399997 399996 399995 399994 399993 399992 399991 399990 399989 399988 399987 399986 399985 399984 399983 399982 399981 399980 399979 399978 399977 399976 399975 399974 399973 399972 399971 399970 399969 399968 399967 399966 399965 399964 399963 399962 399961 399960 399959 399958...
result:
ok 400000 numbers
Test #26:
score: 0
Accepted
time: 113ms
memory: 50580kb
input:
400000 399999 18368 18369 296352 296353 159047 159048 222 223 291371 291372 210818 210819 20715 20716 73497 73498 45805 45806 388635 388636 333755 333756 327685 327686 191885 191886 392237 392238 280443 280444 205875 205876 399146 399147 372395 372396 155999 156000 363540 363541 4046 4047 259549 259...
output:
400000 399999 399998 399997 399996 399995 399994 399993 399992 399991 399990 399989 399988 399987 399986 399985 399984 399983 399982 399981 399980 399979 399978 399977 399976 399975 399974 399973 399972 399971 399970 399969 399968 399967 399966 399965 399964 399963 399962 399961 399960 399959 399958...
result:
ok 400000 numbers
Test #27:
score: 0
Accepted
time: 391ms
memory: 149388kb
input:
1000000 999999 698768 698769 107535 107536 138013 138014 952352 952353 564931 564932 779741 779742 402894 402895 814913 814914 291343 291344 515105 515106 64941 64942 161696 161697 690551 690552 41713 41714 905692 905693 648985 648986 176629 176630 811538 811539 742149 742150 892496 892497 862613 86...
output:
1000000 999999 999998 999997 999996 999995 999994 999993 999992 999991 999990 999989 999988 999987 999986 999985 999984 999983 999982 999981 999980 999979 999978 999977 999976 999975 999974 999973 999972 999971 999970 999969 999968 999967 999966 999965 999964 999963 999962 999961 999960 999959 99995...
result:
ok 1000000 numbers
Test #28:
score: 0
Accepted
time: 346ms
memory: 111064kb
input:
1000000 999999 209314 209315 597681 597682 886930 886931 802671 802672 907015 907016 134619 134620 253218 253219 929684 929685 639130 639131 252229 252230 860194 860195 265036 265037 182269 182270 91442 91443 823523 823524 65863 65864 419766 419767 115962 115963 471162 471163 171601 171602 851262 85...
output:
1000000 999999 999998 999997 999996 999995 999994 999993 999992 999991 999990 999989 999988 999987 999986 999985 999984 999983 999982 999981 999980 999979 999978 999977 999976 999975 999974 999973 999972 999971 999970 999969 999968 999967 999966 999965 999964 999963 999962 999961 999960 999959 99995...
result:
ok 1000000 numbers
Test #29:
score: 0
Accepted
time: 341ms
memory: 91820kb
input:
1000000 999999 728149 728150 231462 231463 823951 823952 439664 439665 992470 992471 924271 924272 138898 138899 761264 761265 341529 341530 797093 797094 222365 222366 401236 401237 590162 590163 520424 520425 239690 239691 464166 464167 859897 859898 67823 67824 394498 394499 153596 153597 772125 ...
output:
999996 999996 999996 999996 999996 999995 999994 999993 999992 999991 999990 999989 999988 999987 999986 999985 999984 999983 999982 999981 999980 999979 999978 999977 999976 999975 999974 999973 999972 999971 999970 999969 999968 999967 999966 999965 999964 999963 999962 999961 999960 999959 999958...
result:
ok 1000000 numbers
Test #30:
score: -100
Memory Limit Exceeded
input:
1000000 999999 221164 221165 128857 128858 243129 243130 388281 388282 386941 386942 389694 389695 183059 183060 64529 64530 254992 254993 858746 858747 420367 420368 839902 839903 250411 250412 96995 96996 908649 908650 18802 18803 704837 704838 563071 563072 353816 353817 169964 169965 781259 7812...
output:
999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951 999951...