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
The graph is a DAG No MST exists!
JOJ Answer
C_178 purchased 9 shares of E_21 from C_185 for $22/share C_307 purchased 5 shares of E_47 from C_197 for $50/share C_4 purchased 13 shares of E_40 from C_242 for $94/share C_124 purchased 94 shares of E_17 from C_384 for $70/share C_128 purchased 61 shares of E_3 from C_248 for $78/share C_378 purchased 16 shares of E_36 from C_229 for $48/share C_186 purchased 2 shares of E_27 from C_311 for $48/share C_139 purchased 6 shares of E_6 from C_404 for $44/share C_307 purchased 85 shares of E_19 from C_26 for $9/share C_161 purchased 20 shares of E_4 from C_435 for $67/share C_74 purchased 49 shares of E_44 from C_201 for $59/share C_4 purchased 46 shares of E_40 from C_418 for $94/share C_260 purchased 10 shares of E_19 from C_26 for $9/share C_260 purchased 48 shares of E_19 from C_227 for $13/share C_21 purchased 28 shares of E_21 from C_493 for $45/share C_82 purchased 38 shares of E_48 from C_321 for $59/share C_162 purchased 28 shares of E_7 from C_325 for $45/share C_405 purchased 20 shares of E_22 from C