Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.
Please double check your code to solve this problem and try again.
Your Answer
5689 5693 931 525 8612 15 6845 8251 216 5268 2371 792 8814 1520 302 2916 4387 367 712 6579 496 2739 3806 770 6576 7038 468 5037 4450 473 9909 1038 486 7846 5518 154 7663 2727 925 4303 7370 825 5059 1126 202 6994 1120 141 5026 5232 326 3752 9563 401 1274 7561 257 8038 4203 64 6085 1963 630 5496 578 444 330 7185 887 3061 52 993 7549 3811 932 1689 3936 311 7660 1582 710 6198 3540 17 9230 1968 962 6218 8909 648 646 9767 743 4507 1186 951 8534 7838 101 554 3254 823 6964 5497 673 6773 7103 881 5195 6860 297 6691 3015 252 3534 9562 308 7626 341 490 4796 2706 939 4857 482 948 2717 2265 96 9600 5784 613 5331 8575 235 310 4145 319 3765 9320 633 9704 3256 732 5665 3968 601 8959 4768 716 9997 9116 931 8345 4776 722 7746 2091 114 488 1932 929 8601 209 58 6732 8910 896 8263 8709 853 4298 7320 663 7027 871 334 3003 3324 165 9783 5822 292 937 4997 62 5421 2847 849 7085 4318 43 8025 8158 677 6014 4664 236 3773 8335 719 4780 1518 619 3321 5436 720 6339 2916 769 5710 9913 682 5781 2904 423 9935 3346 237 4519 2682 397 1529 7813
JOJ Answer
Shortest path length is 2418 The graph is not a DAG No MST exists!