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, the main problem you meet now is Time Exceeded. And the exit code of your program is -9, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
0 1 17350 2 15080 3 2990 4 5590 5 45370 6 120 7 45300 10 41500 11 33030 12 11460 14 5080 15 14110 17 1030 18 27880 19 9560 20 20480 22 35860 23 4490 25 30610 26 39860 28 37970 29 5620 30 47710 33 5240 34 21910 35 43410 36 45890 37 2320 38 30370 39 21980 40 18970 42 25910 44 18210 45 43060 47 16770 48 16560 51 2490 52 2910 53 21360 55 47000 56 45140 58 13280 59 38880 61 28650 62 32550 63 31360 64 37350 65 2190 66 43740 69 32280 71 18340 72 35740 73 42500 75 10390 77 38980 79 46010 81 45220 83 27890 84 38170 85 47900 86 10990 87 13690 88 14830 89 37130 90 40650 92 26700 93 3470 94 3540 95 35670 96 25330 97 28780 98 320 101 32440 102 42310 103 5170 104 33770 105 46300 106 25090 107 18410 108 28840 109 43720 113 -4110 116 13220 117 18000 118 46420 119 43450 120 37400 121 38030 122 36220 123 17590 124 38500 125 120 126 17240 127 39870 128 2650 130 8120 131 19620 132 36580 133 35820 135 26170 136 8040 137 10810 138 29100 140 45630 141 6640 142 31590 143 -33010 144 1070 146 24220 148 7110 150 5050 151 13880 152 4559
JOJ Answer
Invalid graph. Exiting.