QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#202441 | #2287. Hamiltooonian Hike | MaGnsi0 | AC ✓ | 59ms | 37184kb | C++17 | 855b | 2023-10-06 02:35:35 | 2023-10-06 02:35:36 |
Judging History
answer
/**
* author: MaGnsi0
* created: 05.10.2023 21:31:17
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n, m;
cin >> n >> m;
vector<vector<int>> adj(n);
for (int i = 0; i < m; ++i) {
int u, v;
cin >> u >> v;
adj[u - 1].push_back(v - 1);
adj[v - 1].push_back(u - 1);
}
vector<int> ans;
vector<bool> done(n, false);
function<void(int, int)> dfs = [&](int v, int x) {
done[v] = true;
if (x) { ans.push_back(v); }
for (int u : adj[v]) {
if (done[u]) { continue; }
dfs(u, x ^ 1);
}
if (!x) { ans.push_back(v); }
};
dfs(0, 0);
for (int i = 0; i < n; ++i) {
cout << ans[i] + 1 << " ";
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3612kb
input:
20 19 4 2 12 15 18 3 11 8 16 15 13 19 7 11 6 3 8 15 1 13 5 11 10 6 6 14 1 3 13 2 9 2 8 1 17 19 19 20
output:
13 17 20 19 4 9 2 3 18 10 14 6 8 7 5 11 12 16 15 1
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 3696kb
input:
2000 1999 1552 641 425 719 1627 372 1088 1365 569 1453 1596 795 1848 1709 1546 1607 58 1802 212 311 1665 124 1412 1642 1595 352 1742 429 1084 1915 1357 426 680 1007 464 763 1213 373 1854 1995 834 553 334 1998 1596 124 1376 399 1760 1549 1072 1283 624 1517 1627 46 56 644 467 1595 721 989 1428 1788 17...
output:
1984 1818 1215 720 1475 1445 1611 1724 889 151 1018 696 276 1762 234 156 132 595 747 1399 1961 1576 329 1957 1114 1699 98 1081 1831 1911 70 1259 1833 1231 94 1123 577 511 1165 113 773 733 143 322 429 772 1742 707 1413 233 1536 638 1435 1096 99 657 521 670 613 189 1473 783 24 404 1815 1218 1751 492 4...
result:
ok correct
Test #3:
score: 0
Accepted
time: 47ms
memory: 15096kb
input:
200000 199999 50280 198510 191798 6231 40237 180940 191599 184777 9863 65820 17810 154709 77404 175228 122826 90005 87138 75202 37817 64072 123791 54062 167660 83856 63655 159052 141353 154079 122594 118522 16604 1213 63451 135856 180813 77094 92002 100314 71994 109293 47303 183494 49890 154751 1465...
output:
69113 141794 167190 62041 8285 31339 161805 6793 7824 111152 115449 87183 7688 156139 121388 76002 130339 45398 18107 123455 39516 136245 90083 27848 141268 161461 191063 115741 69590 61393 188166 42451 7403 85944 90016 170581 179176 42581 5695 41291 181299 76044 178706 179698 62075 126247 72297 138...
result:
ok correct
Test #4:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
10 45 3 2 4 3 8 5 9 4 1 9 1 7 1 4 6 7 2 1 8 4 6 9 9 10 2 5 7 3 10 8 3 5 7 5 10 5 10 2 9 7 3 10 6 2 4 10 4 6 4 2 1 6 6 3 7 10 10 6 8 1 9 8 9 5 8 6 4 5 8 2 2 9 1 10 9 3 2 7 4 7 6 5 1 5 8 7 3 1 3 8
output:
9 3 5 10 6 7 8 2 4 1
result:
ok correct
Test #5:
score: 0
Accepted
time: 0ms
memory: 3956kb
input:
250 31125 96 167 57 11 75 125 116 139 165 58 72 78 89 203 130 165 105 7 32 208 104 73 196 39 41 24 14 3 160 144 236 185 208 23 30 57 109 22 106 18 34 177 211 210 49 12 136 161 112 64 241 233 119 165 247 244 34 182 167 97 59 60 87 242 7 233 79 164 215 217 56 244 45 12 191 5 90 40 176 15 19 88 243 206...
output:
126 34 91 169 29 106 87 132 191 107 57 51 225 88 208 247 56 35 130 58 233 105 37 65 236 60 211 149 154 239 219 116 160 198 203 172 147 80 23 230 99 24 190 67 237 39 243 13 103 85 240 110 79 122 183 217 104 95 213 174 55 193 81 232 224 156 90 14 136 53 12 143 212 75 151 113 112 140 120 181 192 102 11...
result:
ok correct
Test #6:
score: 0
Accepted
time: 17ms
memory: 6016kb
input:
632 199396 494 26 162 140 125 556 162 61 173 315 553 153 240 84 280 372 228 488 64 276 114 516 27 59 188 78 228 476 169 509 5 337 139 257 520 354 39 70 235 422 359 604 556 415 605 124 602 347 239 461 184 624 382 174 178 362 296 260 434 242 154 85 591 250 450 436 220 275 628 471 322 152 273 552 518 1...
output:
344 356 466 607 125 112 310 215 245 89 438 493 16 60 530 308 505 34 371 140 61 94 632 463 98 319 332 614 333 366 168 483 115 13 174 120 73 225 471 404 309 394 495 224 565 591 21 337 330 176 170 23 352 590 549 84 429 231 267 363 347 384 374 242 200 625 192 433 95 449 26 553 406 541 336 538 114 228 42...
result:
ok correct
Test #7:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
8 8 4 7 1 6 6 2 3 5 8 1 7 3 5 8 2 4
output:
6 4 3 8 5 7 2 1
result:
ok correct
Test #8:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
10 10 3 7 6 8 9 10 10 4 8 5 2 3 7 6 4 1 5 9 1 2
output:
4 9 8 7 2 3 6 5 10 1
result:
ok correct
Test #9:
score: 0
Accepted
time: 1ms
memory: 3720kb
input:
1000 1000 243 733 134 194 793 815 687 452 427 31 824 227 561 5 828 897 67 267 131 771 323 293 209 666 519 499 834 928 299 378 192 400 464 571 830 439 685 436 808 831 937 559 733 748 784 819 877 980 308 334 100 515 511 65 458 541 894 826 588 888 664 73 275 749 160 601 686 883 988 530 982 832 762 695 ...
output:
689 352 313 218 963 114 336 813 559 115 830 108 516 962 661 722 88 177 935 399 71 283 511 172 200 290 928 725 335 51 731 528 539 677 766 478 39 771 40 803 598 107 31 52 871 84 394 211 26 255 983 360 970 975 318 710 308 720 527 59 912 64 836 889 628 841 388 36 459 730 999 785 235 234 581 818 242 994 ...
result:
ok correct
Test #10:
score: 0
Accepted
time: 32ms
memory: 20252kb
input:
100000 100000 55329 56512 66644 62052 44553 16022 20617 63426 38017 76778 21174 26480 58132 91792 55527 24463 95855 20432 33579 83011 37423 93228 9826 52609 83126 23259 34666 38496 48569 48313 68478 65405 87255 76797 89471 96765 46331 69110 43524 99392 75533 98111 7256 79438 35281 23581 84755 64968 ...
output:
14356 25969 86855 53856 93724 25101 83624 32729 65345 50938 20723 38065 69278 43322 51455 11633 66 66313 28424 2730 32660 39453 23728 53741 11564 19256 90905 26840 75947 49403 80947 57117 24276 93779 59467 51678 95036 1111 3186 28131 14305 43048 10235 36929 7592 14806 18137 50265 31130 85765 45542 5...
result:
ok correct
Test #11:
score: 0
Accepted
time: 58ms
memory: 37184kb
input:
200000 200000 58429 74463 26511 142830 74190 96117 23984 74761 9515 139488 40731 141597 63233 74104 65574 135355 167516 125143 21031 65763 160015 175914 122664 5339 108399 152558 144696 163786 118581 50456 89076 151890 72546 1827 159826 80693 96679 145159 73344 111401 82570 2087 199250 64484 82969 1...
output:
178899 54074 115438 105047 124870 85089 50665 161022 75311 159473 23916 42188 51639 112498 25947 99946 73882 23438 137881 12857 48250 174431 26941 164351 49732 162791 118981 166392 4824 72230 46122 87758 158571 47125 167292 78456 148937 178163 122231 91578 138805 175419 122260 41672 193486 147587 38...
result:
ok correct
Test #12:
score: 0
Accepted
time: 44ms
memory: 15964kb
input:
200000 199999 78277 79477 103556 79477 56053 79477 79477 150497 27248 161401 106404 161401 79477 163745 79477 69570 161401 20878 174250 79477 62881 79477 90135 79477 106947 161401 15548 161401 79477 35901 41069 161401 161401 62096 79477 126720 55796 79477 81588 79477 161401 169250 85077 161401 15466...
output:
79477 78277 103556 56053 150497 163745 69570 174250 62881 90135 35901 126720 55796 81588 154665 194924 59689 186253 63084 25695 163711 194901 154857 166275 102612 30049 10700 129944 69295 129430 36564 129065 143651 118212 133753 140007 142107 98087 30676 105854 43771 36494 15728 163473 529 191777 52...
result:
ok correct
Test #13:
score: 0
Accepted
time: 44ms
memory: 16628kb
input:
200000 199999 183266 148384 148384 186800 59430 148384 148384 29176 148384 100277 39628 148384 102214 148384 177293 148384 188442 148384 93452 148384 148384 87921 70186 27207 148384 7535 148384 177812 148384 181504 77784 148384 45288 148384 197800 148384 123159 148384 148384 67130 152556 148384 8298...
output:
148384 183266 186800 59430 29176 100277 39628 102214 177293 188442 93452 87921 7535 177812 181504 77784 45288 197800 123159 67130 152556 8298 183411 120184 69365 46172 162741 101594 193827 19642 22817 168524 56061 89849 170103 63979 31824 80550 169445 21733 59583 21081 168055 79635 106951 64364 1314...
result:
ok correct
Test #14:
score: 0
Accepted
time: 35ms
memory: 16552kb
input:
200000 199999 108368 75661 108368 49818 108368 199538 179210 108368 101064 108368 108368 175967 108368 52024 108368 37440 17326 108368 178601 108368 139402 108368 108368 153317 72995 108368 108368 4395 108368 187384 108368 35875 108368 181470 54640 108368 108368 8967 108368 93800 114990 108368 10836...
output:
108368 75661 49818 199538 179210 101064 175967 52024 37440 17326 178601 139402 153317 72995 4395 187384 35875 181470 54640 8967 93800 114990 182864 148875 25758 83646 38540 110255 47521 40246 39881 103928 31855 127931 98663 142721 198610 47875 62479 98101 118119 2177 57437 169671 44793 55935 152569 ...
result:
ok correct
Test #15:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
2 1 2 1
output:
2 1
result:
ok correct
Test #16:
score: 0
Accepted
time: 42ms
memory: 14060kb
input:
100000 199997 41021 258 2036 1592 42590 89521 23250 70212 59619 10636 9295 1649 9265 7289 53222 17606 38396 6027 4871 16482 4652 38224 97918 1585 22726 74855 54920 46405 62429 97925 922 5990 1793 93 1086 9721 29033 46120 12340 4410 94216 26569 99593 18248 97 110 34414 51392 12253 34 56613 19912 41 3...
output:
21875 12805 69350 32196 1407 94620 557 8466 13891 35049 53242 17034 27307 19628 39054 14036 65039 28597 37643 1448 11008 4132 101 28460 9121 41400 15185 30876 98529 84772 34732 457 2988 53031 173 45 19573 790 43311 89944 220 1655 65847 2802 13495 61522 20445 27 2545 40663 13281 404 14728 1396 45163 ...
result:
ok correct
Test #17:
score: 0
Accepted
time: 48ms
memory: 14128kb
input:
100000 199997 30466 7102 52772 77117 23899 4370 15222 95660 21281 462 22491 11483 38830 58854 1123 18822 7090 64 34784 40086 60808 3511 47200 83309 62371 16741 97492 86190 25383 92879 15623 85326 5686 70958 63123 97562 7644 93316 24115 829 80627 10537 304 6189 33485 31155 15835 1874 11968 68795 4027...
output:
69058 61241 1060 97717 1374 20708 2730 4189 20590 83203 84358 72450 45218 2832 63737 5381 7324 5187 7368 38552 5142 4973 34843 22245 30995 61526 61126 14560 93205 38637 41632 959 1677 29270 19763 529 2467 2273 81786 96396 52142 30237 65997 94939 9979 98959 29078 2047 37379 22634 31786 75583 62 543 3...
result:
ok correct
Test #18:
score: 0
Accepted
time: 41ms
memory: 13968kb
input:
100000 199997 69652 70247 1805 49829 28327 38841 19165 22308 41050 12257 39968 96648 15666 19287 59926 640 14087 68156 88934 645 4032 48590 19061 65002 31270 2777 10729 20156 4473 14739 10199 54928 22846 23732 41440 49741 35682 55216 3424 12 2737 4 56218 1071 9343 3150 160 46121 782 72407 26977 9823...
output:
255 42540 24177 69588 22470 70720 12264 64720 66880 15048 4938 69322 1609 43678 15 14197 24414 81162 45283 3839 91210 45506 11 72254 4648 36283 97855 10363 62898 55584 55 99622 21347 83661 11117 24940 25497 45678 23629 581 864 602 12957 25122 421 54 40355 51866 21275 79665 7209 32769 10195 10070 300...
result:
ok correct
Test #19:
score: 0
Accepted
time: 41ms
memory: 11592kb
input:
60000 179994 7871 17006 19271 43520 11533 10759 44148 13510 1977 4943 904 389 1381 26262 5177 35505 48370 3483 55938 11204 13827 3976 908 776 1662 449 12502 793 11712 3433 15311 12483 218 979 25763 51564 21513 28240 28615 33024 13661 40819 29381 571 39831 54153 10643 22910 20830 11846 16686 17689 14...
output:
6051 242 17084 4098 28616 10830 5527 4882 5789 12759 2066 24356 26223 21806 559 775 11797 1126 473 604 9527 1063 213 2697 27773 54813 10440 24452 55390 54947 34623 48024 48495 14198 11204 18046 272 171 29644 4369 51787 191 6436 17857 31617 46057 4890 2593 49834 13436 43051 3714 37015 54046 15499 339...
result:
ok correct
Test #20:
score: 0
Accepted
time: 33ms
memory: 11488kb
input:
60000 179994 38419 3729 7587 39462 46 25605 5584 14545 2264 19539 33638 425 36518 5402 22621 51369 19 58594 87 3544 9423 4224 560 12584 8869 27611 30956 2215 18327 12752 11 5811 2825 5579 669 10304 1909 28020 2373 23734 50753 51 32551 10474 38860 38518 43995 3849 5641 2054 31089 5980 20296 452 2791 ...
output:
17763 3723 259 45465 42672 3324 2698 6139 1346 29998 2720 45916 1787 5982 27750 1386 15030 8360 54940 12522 20381 2482 11036 1817 21373 4028 3471 55587 24770 51898 545 52072 16685 39844 3569 989 28462 1717 1503 14183 7515 38281 24140 5758 387 26369 38278 415 27243 9551 32469 7996 8503 17789 9402 151...
result:
ok correct
Test #21:
score: 0
Accepted
time: 29ms
memory: 8480kb
input:
20000 199945 2205 13948 27 2735 8254 1031 945 19329 10277 888 705 2075 14324 10 11739 602 398 8244 1496 1161 11435 149 6741 8998 1364 59 977 19284 13396 1904 9195 13950 242 2267 2463 15456 4397 7923 373 9259 13572 108 4347 16285 16251 11455 2950 5193 18562 10888 16144 11936 811 19500 11239 42 2563 5...
output:
13149 7048 6836 4517 6130 2733 6244 7213 10919 64 17016 7289 13948 19437 18042 3640 11485 4957 119 1122 5719 2254 25 1673 3163 1364 11239 12343 12 6515 388 3639 12389 12280 12911 10517 4944 12246 17985 4081 7354 18158 2513 3451 4430 1533 2082 3062 1717 19751 2543 4825 2628 210 1025 449 6928 2144 187...
result:
ok correct
Test #22:
score: 0
Accepted
time: 11ms
memory: 5744kb
input:
1000 179900 759 337 70 724 534 217 54 164 608 356 10 280 919 344 484 352 121 657 436 635 350 437 284 201 394 776 40 12 431 495 280 217 174 507 195 443 73 294 253 451 111 738 399 690 552 345 88 244 89 20 187 487 173 93 61 118 212 944 129 815 168 940 160 277 363 80 276 224 30 527 896 70 18 15 92 715 2...
output:
631 164 477 887 285 344 703 568 53 188 21 341 514 160 719 995 788 493 430 399 209 900 203 181 367 30 573 15 55 222 724 413 270 273 759 388 525 121 153 637 342 264 85 552 529 618 561 751 402 686 243 276 541 664 763 835 661 218 732 743 5 184 366 394 437 953 93 532 891 268 508 187 39 300 69 223 14 937 ...
result:
ok correct
Test #23:
score: 0
Accepted
time: 55ms
memory: 15784kb
input:
200000 199999 10666 2168 1951 11564 134939 119724 21699 21348 87728 28981 69127 89493 1566 13387 160131 124297 90719 62886 9110 61733 92067 6758 133646 14526 191975 175951 172911 145972 101295 1132 60122 61536 12418 7766 52489 7004 76841 18457 45777 115877 61714 75397 22952 26977 19402 6866 96842 11...
output:
184252 16731 3700 79088 123931 93110 185540 11832 33426 53574 41789 182579 84758 150803 58508 194159 49917 54914 151322 116843 104212 8657 54472 71102 48310 163399 170740 181246 21592 80631 196017 169602 816 70640 84786 26799 93715 80499 37426 32699 87945 114716 98257 42363 179407 114965 176958 30 1...
result:
ok correct
Test #24:
score: 0
Accepted
time: 53ms
memory: 15796kb
input:
200000 199999 145083 143777 136983 175041 3518 25154 197584 114967 139061 16188 126760 7456 104100 30868 37 26259 120362 13010 191775 114330 188539 191143 180045 153486 34413 138581 122726 117665 29617 49973 4316 49573 2586 72794 111849 23272 143039 27826 9038 61335 4139 54520 5643 95504 45545 1 230...
output:
45545 95411 50484 157381 12573 104813 48122 81907 143593 157050 50297 155581 153619 199993 143999 48105 116708 188998 111370 36745 147668 5727 96591 92794 69251 82625 138682 195289 11347 14780 90050 64587 155791 65163 165085 6181 152625 70110 37479 144813 83938 27997 116425 98809 182138 161947 16949...
result:
ok correct
Test #25:
score: 0
Accepted
time: 46ms
memory: 15736kb
input:
200000 199999 406 22042 44768 152065 35424 54868 30603 118121 350 35192 167917 10867 31430 115018 96713 61523 178290 819 8 141160 38793 178245 121981 23907 17866 77742 197457 189516 184502 173402 22451 6791 118931 64995 15867 93582 8980 17733 51360 2454 48696 9 139092 161954 7142 194344 2437 96890 1...
output:
68867 170272 78458 1754 87513 18153 3222 98825 173737 110101 127817 195007 170097 171507 105716 92637 9670 94378 192298 129897 187139 84614 34670 86142 154733 185718 44608 98633 117090 76739 152776 83610 62205 113215 198041 30792 21870 105800 111547 81158 131682 115351 77624 13661 39289 197272 89411...
result:
ok correct
Test #26:
score: 0
Accepted
time: 55ms
memory: 15384kb
input:
200000 199999 21730 49585 192148 70525 178826 103295 442 130905 77149 29290 99851 138882 133840 72976 4455 62306 90629 46794 172230 62490 102916 12693 31285 93644 74018 6338 189260 22221 167003 85742 154899 49532 75539 116497 34623 73964 173861 155388 193935 23235 88066 129145 43423 161101 20621 607...
output:
154421 99765 130906 161259 125878 4508 35888 175368 128527 173525 47416 166680 98640 58758 97402 199460 59760 80775 39877 165399 160051 39550 158074 166098 19232 79552 175185 67947 86061 63197 24457 30920 107329 175478 180149 196761 5183 167 119083 17930 173849 191073 63003 132153 146467 40842 83548...
result:
ok correct
Test #27:
score: 0
Accepted
time: 54ms
memory: 15384kb
input:
200000 199999 22258 163483 86895 143728 198052 167150 143120 1902 112687 4688 1659 35232 82592 7058 102332 36581 93034 95111 36424 156396 197617 54120 119477 39311 10202 112548 103695 79403 40934 110721 68991 98591 142924 42164 97331 145991 177799 166623 111274 118066 9822 59665 131075 152755 185229...
output:
78615 70317 20928 67638 52481 148204 67702 198058 39658 158997 71272 13761 108070 110469 152168 51277 181405 104180 118863 178650 107548 46200 68257 52300 16639 33401 29673 171493 162830 160494 118519 103641 131207 21349 70246 123826 113061 40713 25857 116039 57214 76482 154844 82035 48873 76616 132...
result:
ok correct
Test #28:
score: 0
Accepted
time: 56ms
memory: 15356kb
input:
200000 199999 28593 123668 130171 56134 28008 148584 154422 126627 158161 94856 125701 136808 32781 14993 141178 77962 129070 24140 169197 145944 178754 9996 45549 12765 64244 84510 81262 22438 107089 90281 196210 135348 157991 151385 22036 107199 87707 158088 157471 40412 189181 122394 151947 45118...
output:
125869 23879 174868 187589 21161 57842 2117 199783 14937 119675 12426 50169 45473 29686 51598 181933 70202 71444 17509 93822 180360 8824 18795 152710 116831 22749 94591 81691 67377 42764 198221 92956 94596 53884 102080 86931 76218 3855 175523 51271 137835 138263 37548 144477 154261 145417 43310 8717...
result:
ok correct
Test #29:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
5 4 4 5 5 2 3 1 2 3
output:
3 5 4 2 1
result:
ok correct
Test #30:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
10 9 6 5 3 9 8 6 10 7 1 8 2 10 5 3 4 2 9 4
output:
8 5 9 2 7 10 4 3 6 1
result:
ok correct
Test #31:
score: 0
Accepted
time: 1ms
memory: 3780kb
input:
1000 999 330 224 14 913 185 75 893 164 252 192 876 379 200 971 79 217 555 625 499 226 677 202 426 798 142 107 397 898 507 860 166 755 656 936 420 265 150 388 126 669 625 510 900 45 506 899 528 105 368 204 341 278 284 670 261 69 995 163 15 483 355 72 344 608 576 419 88 13 128 50 276 727 396 474 227 8...
output:
579 184 398 145 356 157 576 327 217 949 548 584 207 859 651 888 969 544 898 649 390 571 583 958 286 756 332 719 833 984 378 768 352 304 254 531 632 317 648 399 342 38 740 524 61 631 380 224 542 335 274 523 817 236 582 804 244 172 526 998 834 118 950 739 764 754 426 653 902 53 716 769 438 343 540 799...
result:
ok correct
Test #32:
score: 0
Accepted
time: 26ms
memory: 16220kb
input:
100000 99999 66582 29508 40936 5410 28636 73651 89784 47300 50800 91460 87559 84757 407 6311 92671 10354 81434 37969 22478 16901 9941 62403 53967 49160 61861 40483 75780 82734 54838 89051 14790 86648 44799 64226 65921 15609 9022 67349 70072 4286 45324 11622 91136 97381 42362 70004 57558 95460 39941 ...
output:
6624 20474 23279 60736 56366 91628 468 484 76891 86872 41356 52552 86754 95473 36245 39456 33229 56547 65170 4856 69540 37774 10288 82699 50555 84513 62825 27049 11544 33569 30447 75650 40315 6909 84018 49901 92898 4342 97662 86453 53791 7161 38262 25077 14924 64187 91112 29707 46824 91919 88447 118...
result:
ok correct
Test #33:
score: 0
Accepted
time: 58ms
memory: 30228kb
input:
200000 199999 158265 9720 34864 73859 112266 182332 77843 45223 120214 14357 50224 54732 138307 180719 101095 20724 13240 173941 188607 2405 136373 140461 62799 3273 36107 17527 113513 119025 184989 40314 19666 90320 27234 107126 118655 133322 85140 151558 17885 79265 143955 67009 123759 72277 85025...
output:
41410 24630 46632 104951 162205 20370 121048 148691 51488 144845 79332 180794 3118 87762 168288 185709 50507 190499 152811 28804 21052 69482 100050 5029 192947 191774 53208 83670 187524 170495 67117 73927 741 96498 76558 43044 69807 194973 11806 43602 63008 138425 146559 192628 107048 155574 36579 1...
result:
ok correct
Test #34:
score: 0
Accepted
time: 59ms
memory: 18580kb
input:
200000 199999 115588 147155 115588 33139 115588 165469 115588 181386 115588 148484 115588 172598 115588 197626 115588 167408 115588 37426 115588 151245 147155 82269 33139 194268 165469 34755 181386 114748 148484 113593 172598 63669 197626 70789 167408 98124 37426 27226 151245 111154 82269 68010 1942...
output:
193393 180985 183743 168023 176185 137933 109620 145180 195825 84692 63412 149540 8701 7648 188918 121757 15605 150215 4859 106401 154470 93848 104393 63163 114168 148224 60370 8537 129251 107515 37449 159915 196559 52733 57436 188281 182834 17599 166710 94541 1237 105976 172435 33118 71097 59503 56...
result:
ok correct
Test #35:
score: 0
Accepted
time: 57ms
memory: 15248kb
input:
200000 199999 183297 185790 183297 139963 183297 193542 183297 122684 183297 151834 183297 21124 183297 125859 183297 18434 183297 66920 183297 79463 183297 38758 183297 74789 183297 76982 183297 33255 183297 94770 183297 182206 183297 180515 183297 42738 183297 65109 183297 96034 183297 10407 18329...
output:
103755 182913 37844 108340 54383 93728 124044 73010 106033 88930 79931 121212 79647 35441 92470 42344 195184 175977 11787 124203 44889 155006 13677 127682 106178 186038 141902 12086 139779 173546 176186 138467 196876 69242 108990 79279 37504 151702 105121 164405 65700 19093 26857 160962 55001 64569 ...
result:
ok correct
Test #36:
score: 0
Accepted
time: 52ms
memory: 15456kb
input:
200000 199999 164560 32310 164560 130100 164560 57762 164560 39351 164560 37138 164560 76719 164560 110421 164560 56233 164560 139730 164560 6571 164560 13479 164560 176760 164560 194390 164560 191302 164560 191205 164560 141751 164560 162319 164560 35954 164560 451 164560 31362 164560 189399 164560...
output:
39950 164560 170455 103602 59114 32310 47259 55146 29151 130100 195490 128600 68839 57762 113165 123694 44713 39351 151586 61427 152465 37138 69931 171994 151948 76719 16032 12644 30867 110421 111941 80466 30202 56233 63453 79909 32861 139730 176273 88425 94773 6571 51103 56009 199382 13479 123573 1...
result:
ok correct
Test #37:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
10 9 2 6 9 8 1 3 10 5 9 4 1 7 2 5 7 5 9 10
output:
3 7 10 8 4 9 2 6 5 1
result:
ok correct
Test #38:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
100 99 59 6 6 61 15 79 74 78 89 96 19 5 31 34 6 62 8 19 49 2 24 64 55 88 84 83 43 35 20 53 19 33 84 54 83 90 86 25 61 55 49 26 86 85 51 20 9 43 55 45 63 55 61 86 94 14 77 82 67 47 91 22 11 88 59 4 52 3 19 36 44 21 85 21 2 84 14 46 15 92 50 97 77 100 69 56 86 2 16 38 31 49 48 96 41 80 12 25 22 99 24 ...
output:
98 67 47 18 15 23 92 93 38 16 79 86 21 44 85 6 4 59 62 55 11 60 56 69 20 51 53 73 96 89 42 22 91 99 71 75 48 95 76 74 78 66 9 35 43 80 41 88 45 63 13 61 49 17 26 34 31 84 90 83 54 28 58 30 7 68 40 19 5 8 33 24 64 70 36 57 81 2 77 65 82 100 87 12 10 27 37 97 39 32 72 50 29 3 46 94 14 52 25 1
result:
ok correct
Test #39:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
1000 999 540 661 757 811 117 892 657 358 595 563 137 939 924 135 818 123 665 263 674 175 912 492 571 918 17 826 727 592 612 826 357 815 592 923 992 108 143 421 452 207 931 820 791 608 22 300 204 717 145 777 21 402 91 873 466 909 589 729 10 284 735 581 70 967 428 506 956 324 859 226 242 911 245 809 2...
output:
434 206 141 462 264 104 710 838 883 164 957 925 987 214 963 726 337 461 827 541 72 637 446 764 621 534 450 124 451 890 336 736 321 139 547 90 47 754 185 442 723 100 527 405 891 952 97 467 381 940 507 144 870 983 205 96 608 699 473 298 115 287 524 85 356 114 896 631 535 791 757 775 448 580 585 86 378...
result:
ok correct
Test #40:
score: 0
Accepted
time: 3ms
memory: 4000kb
input:
10000 9999 6859 5892 2722 6905 2719 7754 8220 9301 7343 6628 5883 9363 8549 3025 8923 9014 6621 696 7446 3913 5772 5418 2994 6557 7676 7764 8677 829 784 4103 9310 5239 162 442 6569 1569 2949 10 109 3773 1828 7624 1036 1312 1042 9407 976 1936 3610 9886 202 9293 8612 6035 8218 7825 6547 4676 3052 1464...
output:
7416 3910 647 5865 9997 8077 3871 6131 2428 5780 519 8428 9689 6759 6643 5398 9099 5269 7529 8494 6482 4978 2691 7066 9341 7884 8508 1862 9203 7388 9092 4196 8447 2283 7406 4458 184 4167 9166 5840 2000 1547 6563 5806 8742 4535 2739 9880 9290 2029 5697 5897 5247 7049 8966 3027 6435 764 9154 3562 9822...
result:
ok correct
Test #41:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
11 10 5 7 2 8 11 1 7 11 4 1 11 6 10 11 9 10 11 8 3 6
output:
11 5 7 3 6 9 10 2 8 4 1
result:
ok correct
Test #42:
score: 0
Accepted
time: 42ms
memory: 14336kb
input:
164001 164000 29879 74427 149488 137738 123856 88120 28468 82478 6468 40535 30755 36478 70021 131612 45557 85686 2381 9443 36944 10318 132084 144572 125435 158058 121996 17702 7009 114567 122917 34514 8727 91189 3560 116957 22499 78877 64731 42717 135109 148424 94520 31798 58576 8144 26166 132580 16...
output:
138243 51766 160565 117763 65139 104216 84562 57780 37980 134602 62012 123875 156563 6816 29709 40469 35641 41705 99072 41870 157460 100174 74127 1019 137676 93547 152510 132607 145237 15063 26703 51579 141584 75875 55135 4170 23742 33130 70782 16142 110546 103874 27093 152881 19739 107252 59838 495...
result:
ok correct
Test #43:
score: 0
Accepted
time: 41ms
memory: 13696kb
input:
160401 160400 130258 124211 12155 155194 129078 101499 86097 25708 33393 22655 94922 94117 11619 62546 118650 30795 22013 74015 85255 49912 119421 18396 50919 114896 20613 21301 40597 96962 139739 98673 129930 158023 27901 6379 74416 32634 63840 38734 107744 109928 79527 128639 77462 9313 8844 63840...
output:
139739 98673 134076 79523 31382 30122 66995 59753 24336 102949 10935 57574 78132 123382 151686 79952 47570 119489 81531 17878 142470 111829 159482 132951 9137 130121 85356 157804 86667 35112 96040 56899 148827 93562 75990 11040 75793 46602 85018 109207 128138 148630 66143 145358 16269 3253 1104 8239...
result:
ok correct
Test #44:
score: 0
Accepted
time: 39ms
memory: 13552kb
input:
160041 160040 11607 60324 35586 54434 61026 47969 30982 6224 77476 124949 4815 64228 139991 118037 139120 106589 120247 39036 143307 69155 91895 35586 1446 33330 82777 140360 37345 155788 88193 142734 77331 62339 125677 30982 30528 152239 52969 15920 114658 42458 106319 1446 49873 28904 15920 100140...
output:
82777 140360 131725 68002 52424 41717 143996 58947 141581 130314 944 126245 54201 130478 30726 21352 64405 120906 120643 72698 33916 80524 92911 98551 18410 40598 158876 135612 112615 104230 96825 45023 17395 71087 19374 6775 62594 98356 101641 98106 159405 113915 52151 57723 72408 124592 32851 1671...
result:
ok correct