QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#51215 | #4633. Coprime Matrices | HuangHanSheng | AC ✓ | 12ms | 4456kb | C++14 | 477b | 2022-10-01 14:26:00 | 2022-10-01 14:26:00 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3772kb
input:
3 3 2 1 3
output:
Yes 8 1 9 3 2 5 4 7 6
result:
ok OK, Accepted.
Test #2:
score: 0
Accepted
time: 2ms
memory: 3764kb
input:
1 1 1 1 1
output:
Yes 1
result:
ok OK, Accepted.
Test #3:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
8 3 4 2 9
output:
Yes 24 2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19 22 21 23
result:
ok OK, Accepted.
Test #4:
score: 0
Accepted
time: 2ms
memory: 3780kb
input:
7 6 7 2 28
output:
Yes 35 37 36 42 41 8 39 38 2 1 10 9 40 4 3 12 11 20 6 5 14 13 22 21 7 16 15 24 23 29 18 17 26 25 31 30 19 28 27 33 32 34
result:
ok OK, Accepted.
Test #5:
score: 0
Accepted
time: 2ms
memory: 3764kb
input:
6 8 1 2 7
output:
Yes 5 7 6 12 11 21 20 32 9 8 14 13 23 22 34 33 10 16 15 25 24 36 35 43 18 17 27 26 38 37 45 44 19 29 28 40 39 47 46 2 31 30 42 41 1 48 4 3
result:
ok OK, Accepted.
Test #6:
score: 0
Accepted
time: 2ms
memory: 3780kb
input:
8 8 7 3 56
output:
Yes 17 19 18 24 23 33 32 45 21 20 26 25 35 34 47 46 22 28 27 37 36 49 48 60 30 29 39 38 51 50 62 61 31 41 40 53 52 64 63 7 43 42 55 54 2 1 9 8 44 57 56 4 3 11 10 14 59 58 6 5 13 12 16 15
result:
ok OK, Accepted.
Test #7:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
2 4 2 1 8
output:
Yes 4 6 5 1 8 7 3 2
result:
ok OK, Accepted.
Test #8:
score: 0
Accepted
time: 3ms
memory: 3796kb
input:
6 6 4 2 17
output:
Yes 5 7 6 12 11 20 9 8 14 13 22 21 10 16 15 24 23 31 18 17 26 25 33 32 19 28 27 35 34 2 30 29 1 36 4 3
result:
ok OK, Accepted.
Test #9:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
8 6 3 1 33
output:
Yes 28 30 29 35 34 43 32 31 37 36 45 44 33 39 38 47 46 7 41 40 1 48 9 8 42 3 2 11 10 18 5 4 13 12 20 19 6 15 14 22 21 25 17 16 24 23 27 26
result:
ok OK, Accepted.
Test #10:
score: 0
Accepted
time: 2ms
memory: 3772kb
input:
2 8 2 4 15
output:
Yes 8 10 9 14 13 2 1 5 12 11 16 15 4 3 7 6
result:
ok OK, Accepted.
Test #11:
score: 0
Accepted
time: 8ms
memory: 4364kb
input:
295 280 79 198 74034
output:
Yes 35927 35929 35928 35934 35933 35943 35942 35956 35955 35973 35972 35994 35993 36019 36018 36048 36047 36081 36080 36118 36117 36159 36158 36204 36203 36253 36252 36306 36305 36363 36362 36424 36423 36489 36488 36558 36557 36631 36630 36708 36707 36789 36788 36874 36873 36963 36962 37056 37055 37...
result:
ok OK, Accepted.
Test #12:
score: 0
Accepted
time: 0ms
memory: 4404kb
input:
300 26 55 17 3020
output:
Yes 1532 1534 1533 1539 1538 1548 1547 1561 1560 1578 1577 1599 1598 1624 1623 1653 1652 1686 1685 1723 1722 1764 1763 1809 1808 1857 1536 1535 1541 1540 1550 1549 1563 1562 1580 1579 1601 1600 1626 1625 1655 1654 1688 1687 1725 1724 1766 1765 1811 1810 1859 1858 1537 1543 1542 1552 1551 1565 1564 1...
result:
ok OK, Accepted.
Test #13:
score: 0
Accepted
time: 11ms
memory: 4356kb
input:
288 282 125 58 43649
output:
Yes 26929 26931 26930 26936 26935 26945 26944 26958 26957 26975 26974 26996 26995 27021 27020 27050 27049 27083 27082 27120 27119 27161 27160 27206 27205 27255 27254 27308 27307 27365 27364 27426 27425 27491 27490 27560 27559 27633 27632 27710 27709 27791 27790 27876 27875 27965 27964 28058 28057 28...
result:
ok OK, Accepted.
Test #14:
score: 0
Accepted
time: 6ms
memory: 4020kb
input:
128 299 59 164 38067
output:
Yes 17790 17792 17791 17797 17796 17806 17805 17819 17818 17836 17835 17857 17856 17882 17881 17911 17910 17944 17943 17981 17980 18022 18021 18067 18066 18116 18115 18169 18168 18226 18225 18287 18286 18352 18351 18421 18420 18494 18493 18571 18570 18652 18651 18737 18736 18826 18825 18919 18918 19...
result:
ok OK, Accepted.
Test #15:
score: 0
Accepted
time: 12ms
memory: 4448kb
input:
300 300 286 253 60209
output:
Yes 62068 62070 62069 62075 62074 62084 62083 62097 62096 62114 62113 62135 62134 62160 62159 62189 62188 62222 62221 62259 62258 62300 62299 62345 62344 62394 62393 62447 62446 62504 62503 62565 62564 62630 62629 62699 62698 62772 62771 62849 62848 62930 62929 63015 63014 63104 63103 63197 63196 63...
result:
ok OK, Accepted.
Test #16:
score: 0
Accepted
time: 4ms
memory: 4248kb
input:
240 77 171 56 15870
output:
Yes 1429 1431 1430 1436 1435 1445 1444 1458 1457 1475 1474 1496 1495 1521 1520 1550 1549 1583 1582 1620 1619 1661 1660 1706 1705 1755 1754 1808 1807 1865 1864 1926 1925 1991 1990 2060 2059 2133 2132 2210 2209 2291 2290 2376 2375 2465 2464 2558 2557 2655 2654 2756 2755 2861 2860 2970 2969 3083 3082 3...
result:
ok OK, Accepted.
Test #17:
score: 0
Accepted
time: 5ms
memory: 4028kb
input:
165 141 69 107 11237
output:
Yes 19946 19948 19947 19953 19952 19962 19961 19975 19974 19992 19991 20013 20012 20038 20037 20067 20066 20100 20099 20137 20136 20178 20177 20223 20222 20272 20271 20325 20324 20382 20381 20443 20442 20508 20507 20577 20576 20650 20649 20727 20726 20808 20807 20893 20892 20982 20981 21075 21074 21...
result:
ok OK, Accepted.
Test #18:
score: 0
Accepted
time: 5ms
memory: 4356kb
input:
300 200 106 195 36560
output:
Yes 56650 56652 56651 56657 56656 56666 56665 56679 56678 56696 56695 56717 56716 56742 56741 56771 56770 56804 56803 56841 56840 56882 56881 56927 56926 56976 56975 57029 57028 57086 57085 57147 57146 57212 57211 57281 57280 57354 57353 57431 57430 57512 57511 57597 57596 57686 57685 57779 57778 57...
result:
ok OK, Accepted.
Test #19:
score: 0
Accepted
time: 3ms
memory: 4260kb
input:
247 46 55 25 776
output:
Yes 9588 9590 9589 9595 9594 9604 9603 9617 9616 9634 9633 9655 9654 9680 9679 9709 9708 9742 9741 9779 9778 9820 9819 9865 9864 9914 9913 9967 9966 10024 10023 10085 10084 10150 10149 10219 10218 10292 10291 10369 10368 10450 10449 10535 10534 10623 9592 9591 9597 9596 9606 9605 9619 9618 9636 9635...
result:
ok OK, Accepted.
Test #20:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
18 300 15 168 2858
output:
Yes 5124 5126 5125 5131 5130 5140 5139 5153 5152 5170 5169 5191 5190 5216 5215 5245 5244 5278 5277 5314 5313 5350 5349 5386 5385 22 21 58 57 94 93 130 129 166 165 202 201 238 237 274 273 310 309 346 345 382 381 418 417 454 453 490 489 526 525 562 561 598 597 634 633 670 669 706 705 742 741 778 777 8...
result:
ok OK, Accepted.
Test #21:
score: 0
Accepted
time: 4ms
memory: 4368kb
input:
300 58 71 22 15741
output:
Yes 12044 12046 12045 12051 12050 12060 12059 12073 12072 12090 12089 12111 12110 12136 12135 12165 12164 12198 12197 12235 12234 12276 12275 12321 12320 12370 12369 12423 12422 12480 12479 12541 12540 12606 12605 12675 12674 12748 12747 12825 12824 12906 12905 12991 12990 13080 13079 13173 13172 13...
result:
ok OK, Accepted.
Test #22:
score: 0
Accepted
time: 3ms
memory: 4352kb
input:
290 262 3 217 58080
output:
Yes 34423 34425 34424 34430 34429 34439 34438 34452 34451 34469 34468 34490 34489 34515 34514 34544 34543 34577 34576 34614 34613 34655 34654 34700 34699 34749 34748 34802 34801 34859 34858 34920 34919 34985 34984 35054 35053 35127 35126 35204 35203 35285 35284 35370 35369 35459 35458 35552 35551 35...
result:
ok OK, Accepted.
Test #23:
score: 0
Accepted
time: 10ms
memory: 4288kb
input:
231 272 226 145 45674
output:
Yes 54331 54333 54332 54338 54337 54347 54346 54360 54359 54377 54376 54398 54397 54423 54422 54452 54451 54485 54484 54522 54521 54563 54562 54608 54607 54657 54656 54710 54709 54767 54766 54828 54827 54893 54892 54962 54961 55035 55034 55112 55111 55193 55192 55278 55277 55367 55366 55460 55459 55...
result:
ok OK, Accepted.
Test #24:
score: 0
Accepted
time: 0ms
memory: 4380kb
input:
300 116 15 107 32192
output:
Yes 25039 25041 25040 25046 25045 25055 25054 25068 25067 25085 25084 25106 25105 25131 25130 25160 25159 25193 25192 25230 25229 25271 25270 25316 25315 25365 25364 25418 25417 25475 25474 25536 25535 25601 25600 25670 25669 25743 25742 25820 25819 25901 25900 25986 25985 26075 26074 26168 26167 26...
result:
ok OK, Accepted.
Test #25:
score: 0
Accepted
time: 2ms
memory: 4000kb
input:
126 300 67 285 17771
output:
Yes 20666 20668 20667 20673 20672 20682 20681 20695 20694 20712 20711 20733 20732 20758 20757 20787 20786 20820 20819 20857 20856 20898 20897 20943 20942 20992 20991 21045 21044 21102 21101 21163 21162 21228 21227 21297 21296 21370 21369 21447 21446 21528 21527 21613 21612 21702 21701 21795 21794 21...
result:
ok OK, Accepted.
Test #26:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
231 117 51 40 8557
output:
Yes 4451 4453 4452 4458 4457 4467 4466 4480 4479 4497 4496 4518 4517 4543 4542 4572 4571 4605 4604 4642 4641 4683 4682 4728 4727 4777 4776 4830 4829 4887 4886 4948 4947 5013 5012 5082 5081 5155 5154 5232 5231 5313 5312 5398 5397 5487 5486 5580 5579 5677 5676 5778 5777 5883 5882 5992 5991 6105 6104 6...
result:
ok OK, Accepted.
Test #27:
score: 0
Accepted
time: 3ms
memory: 4372kb
input:
300 124 203 13 3245
output:
Yes 21436 21438 21437 21443 21442 21452 21451 21465 21464 21482 21481 21503 21502 21528 21527 21557 21556 21590 21589 21627 21626 21668 21667 21713 21712 21762 21761 21815 21814 21872 21871 21933 21932 21998 21997 22067 22066 22140 22139 22217 22216 22298 22297 22383 22382 22472 22471 22565 22564 22...
result:
ok OK, Accepted.
Test #28:
score: 0
Accepted
time: 2ms
memory: 3872kb
input:
62 146 44 52 331
output:
Yes 5422 5424 5423 5429 5428 5438 5437 5451 5450 5468 5467 5489 5488 5514 5513 5543 5542 5576 5575 5613 5612 5654 5653 5699 5698 5748 5747 5801 5800 5858 5857 5919 5918 5984 5983 6053 6052 6126 6125 6203 6202 6284 6283 6369 6368 6458 6457 6551 6550 6648 6647 6749 6748 6854 6853 6963 6962 7076 7075 7...
result:
ok OK, Accepted.
Test #29:
score: 0
Accepted
time: 2ms
memory: 3720kb
input:
40 52 22 17 1571
output:
Yes 825 827 826 832 831 841 840 854 853 871 870 892 891 917 916 946 945 979 978 1016 1015 1057 1056 1102 1101 1151 1150 1204 1203 1261 1260 1322 1321 1387 1386 1456 1455 1529 1528 1606 1605 1686 1685 1766 1765 1846 1845 1926 1925 2006 2005 5 829 828 834 833 843 842 856 855 873 872 894 893 919 918 94...
result:
ok OK, Accepted.
Test #30:
score: 0
Accepted
time: 0ms
memory: 4236kb
input:
300 300 23 278 19171
output:
Yes 64277 64279 64278 64284 64283 64293 64292 64306 64305 64323 64322 64344 64343 64369 64368 64398 64397 64431 64430 64468 64467 64509 64508 64554 64553 64603 64602 64656 64655 64713 64712 64774 64773 64839 64838 64908 64907 64981 64980 65058 65057 65139 65138 65224 65223 65313 65312 65406 65405 65...
result:
ok OK, Accepted.
Test #31:
score: 0
Accepted
time: 10ms
memory: 4180kb
input:
271 253 159 69 51872
output:
Yes 26131 26133 26132 26138 26137 26147 26146 26160 26159 26177 26176 26198 26197 26223 26222 26252 26251 26285 26284 26322 26321 26363 26362 26408 26407 26457 26456 26510 26509 26567 26566 26628 26627 26693 26692 26762 26761 26835 26834 26912 26911 26993 26992 27078 27077 27167 27166 27260 27259 27...
result:
ok OK, Accepted.
Test #32:
score: 0
Accepted
time: 0ms
memory: 4032kb
input:
124 259 8 165 20677
output:
Yes 7084 7086 7085 7091 7090 7100 7099 7113 7112 7130 7129 7151 7150 7176 7175 7205 7204 7238 7237 7275 7274 7316 7315 7361 7360 7410 7409 7463 7462 7520 7519 7581 7580 7646 7645 7715 7714 7788 7787 7865 7864 7946 7945 8031 8030 8120 8119 8213 8212 8310 8309 8411 8410 8516 8515 8625 8624 8738 8737 8...
result:
ok OK, Accepted.
Test #33:
score: 0
Accepted
time: 4ms
memory: 4304kb
input:
300 179 80 58 9660
output:
Yes 322 324 323 329 328 338 337 351 350 368 367 389 388 414 413 443 442 476 475 513 512 554 553 599 598 648 647 701 700 758 757 819 818 884 883 953 952 1026 1025 1103 1102 1184 1183 1269 1268 1358 1357 1451 1450 1548 1547 1649 1648 1754 1753 1863 1862 1976 1975 2093 2092 2214 2213 2339 2338 2468 246...
result:
ok OK, Accepted.
Test #34:
score: 0
Accepted
time: 3ms
memory: 3896kb
input:
97 95 71 13 1081
output:
Yes 6835 6837 6836 6842 6841 6851 6850 6864 6863 6881 6880 6902 6901 6927 6926 6956 6955 6989 6988 7026 7025 7067 7066 7112 7111 7161 7160 7214 7213 7271 7270 7332 7331 7397 7396 7466 7465 7539 7538 7616 7615 7697 7696 7782 7781 7871 7870 7964 7963 8061 8060 8162 8161 8267 8266 8376 8375 8489 8488 8...
result:
ok OK, Accepted.
Test #35:
score: 0
Accepted
time: 8ms
memory: 4432kb
input:
288 300 233 151 62807
output:
Yes 83829 83831 83830 83836 83835 83845 83844 83858 83857 83875 83874 83896 83895 83921 83920 83950 83949 83983 83982 84020 84019 84061 84060 84106 84105 84155 84154 84208 84207 84265 84264 84326 84325 84391 84390 84460 84459 84533 84532 84610 84609 84691 84690 84776 84775 84865 84864 84958 84957 85...
result:
ok OK, Accepted.
Test #36:
score: 0
Accepted
time: 0ms
memory: 4352kb
input:
300 259 206 73 42316
output:
Yes 3612 3614 3613 3619 3618 3628 3627 3641 3640 3658 3657 3679 3678 3704 3703 3733 3732 3766 3765 3803 3802 3844 3843 3889 3888 3938 3937 3991 3990 4048 4047 4109 4108 4174 4173 4243 4242 4316 4315 4393 4392 4474 4473 4559 4558 4648 4647 4741 4740 4838 4837 4939 4938 5044 5043 5153 5152 5266 5265 5...
result:
ok OK, Accepted.
Test #37:
score: 0
Accepted
time: 4ms
memory: 4032kb
input:
149 295 129 201 30873
output:
Yes 37470 37472 37471 37477 37476 37486 37485 37499 37498 37516 37515 37537 37536 37562 37561 37591 37590 37624 37623 37661 37660 37702 37701 37747 37746 37796 37795 37849 37848 37906 37905 37967 37966 38032 38031 38101 38100 38174 38173 38251 38250 38332 38331 38417 38416 38506 38505 38599 38598 38...
result:
ok OK, Accepted.
Test #38:
score: 0
Accepted
time: 5ms
memory: 3880kb
input:
121 252 57 39 17402
output:
Yes 12919 12921 12920 12926 12925 12935 12934 12948 12947 12965 12964 12986 12985 13011 13010 13040 13039 13073 13072 13110 13109 13151 13150 13196 13195 13245 13244 13298 13297 13355 13354 13416 13415 13481 13480 13550 13549 13623 13622 13700 13699 13781 13780 13866 13865 13955 13954 14048 14047 14...
result:
ok OK, Accepted.
Test #39:
score: 0
Accepted
time: 1ms
memory: 4456kb
input:
300 37 136 22 4789
output:
Yes 10789 10791 10790 10796 10795 10805 10804 10818 10817 10835 10834 10856 10855 10881 10880 10910 10909 10943 10942 10980 10979 11021 11020 11066 11065 15 14 68 67 125 124 186 185 251 250 320 319 10793 10792 10798 10797 10807 10806 10820 10819 10837 10836 10858 10857 10883 10882 10912 10911 10945 ...
result:
ok OK, Accepted.
Test #40:
score: 0
Accepted
time: 8ms
memory: 4372kb
input:
300 300 298 186 66405
output:
Yes 73197 73199 73198 73204 73203 73213 73212 73226 73225 73243 73242 73264 73263 73289 73288 73318 73317 73351 73350 73388 73387 73429 73428 73474 73473 73523 73522 73576 73575 73633 73632 73694 73693 73759 73758 73828 73827 73901 73900 73978 73977 74059 74058 74144 74143 74233 74232 74326 74325 74...
result:
ok OK, Accepted.