Help in a graph question from samsung online round

Revision en1, by pk842, 2019-09-26 06:30:53

P1 P2 P3 P4

As the round is over, the links are disabled by them.

I can only come up with a very basic brute force solution of $$$(2*N)!$$$ where for each of the order of visiting I calculate the cost and then update the answer accordingly. But as expected this even didn't pass even a single test.

Can someone please help me with some spoilers on how to proceed further with it?

Thanks!

Tags #graph, #dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English pk842 2019-09-26 18:25:17 349
en1 English pk842 2019-09-26 06:30:53 883 Initial revision (published)