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 5120 2 14150 3 47570 4 12660 5 37050 7 22970 8 13050 10 28250 11 9220 13 21380 14 42480 16 5080 17 34920 18 31710 19 30840 20 890 22 6190 23 37920 25 31290 28 46240 29 15520 33 13870 34 28700 36 43770 37 7950 38 35180 39 3740 40 30190 42 35170 43 6650 46 18580 47 30430 49 26230 50 -8770 52 30240 54 -22920 55 7760 56 42640 57 32820 58 9090 59 11340 65 33450 66 9300 68 10390 69 14170 72 12600 74 2980 75 44440 78 37780 80 29740 81 15540 82 8610 83 38380 84 28400 85 19150 86 1240 89 32310 92 16480 93 46370 95 13410 96 3710 98 38410 101 5500 102 44320 103 1820 104 36000 106 36170 108 40080 109 -45100 112 37240 114 15530 115 24390 118 26780 120 16470 122 9670 123 3330 124 4130 125 10690 127 35650 128 23240 129 6080 130 42910 132 38190 133 7370 135 5650 136 22720 138 10860 141 17330 142 19210 143 38590 145 42400 148 15410 149 33130 150 -18950 153 8730 154 44440 160 17500 161 44960 163 10040 164 540 165 41720 166 10950 167 11030 170 31080 171 32550 177 22140 178 2190 180 18280 182 22910 183 5370 185 13850 187 303
JOJ Answer
Invalid graph. Exiting.