![P1](https://s3.amazonaws.com/discourseproduction/original/2X/a/a8db4c31c2dfec234697e23a4a4e27df19579d09.png)↵
![P2](https://s3.amazonaws.com/discourseproduction/original/2X/7/7ed39008086c99837e667ba20d8cdf6f663d8057.png)↵
![P3](https://s3.amazonaws.com/discourseproduction/original/2X/9/988b293ecc591f377b23c35942ed03dc62ae17c1.png)↵
![P4](https://s3.amazonaws.com/discourseproduction/original/2X/a/a17fee0396b8f17af198366e1f942ee9321473f9.png)↵
↵
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!↵
↵
Edit: Hello all! Why everyone is downvoting the post? Is there something wrong with it or I asked the question in a wrong way ? I find the problem difficult so I asked for help and if someone find it easy then instead of directly downvoting please explain the solution (or atleast a step towards it) and then downvote if you think it's irrelevant.
![P2](https://s3.amazonaws.com/discourseproduction/original/2X/7/7ed39008086c99837e667ba20d8cdf6f663d8057.png)↵
![P3](https://s3.amazonaws.com/discourseproduction/original/2X/9/988b293ecc591f377b23c35942ed03dc62ae17c1.png)↵
![P4](https://s3.amazonaws.com/discourseproduction/original/2X/a/a17fee0396b8f17af198366e1f942ee9321473f9.png)↵
↵
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!↵
↵
Edit: Hello all! Why everyone is downvoting the post? Is there something wrong with it or I asked the question in a wrong way ? I find the problem difficult so I asked for help and if someone find it easy then instead of directly downvoting please explain the solution (or atleast a step towards it) and then downvote if you think it's irrelevant.