Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link ×

Help with Croatian Informatics Problem

Revision en1, by jasony123123, 2018-12-23 01:51:16

I am working on Problem 1 from the CROATIAN HIGH SCHOOL COMPETITIONS IN INFORMATICS 2014 Final Exam #2.



I don't understand the part of the solution about transforming the original edges into nodes. How do we find the shortest path after the transformation? What is stored in each node of the new graph? An explanation with example would be appreciated.


  Rev. Lang. By When Δ Comment
en1 English jasony123123 2018-12-23 01:51:16 520 Initial revision (published)