Help in a graph question from samsung online round

Правка en1, от 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!

Теги #graph, #dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский pk842 2019-09-26 18:25:17 349
en1 Английский pk842 2019-09-26 06:30:53 883 Initial revision (published)