TOURMAP solution giving WA,pls help!

I tried coding the solution of the problem using hashmaps and vectors(not using graph),can someone pls point out the error in my code? Here is my code:http://www.codechef.com/viewsolution/3874881

Hi,

I also solved the problem using maps:

http://www.codechef.com/viewsolution/1523615

Check the above link for my submission and compare it with your own implementation… :slight_smile:

Check corner cases (N=1) and take care of repeated cities on different “sets”…

Good luck,

Bruno

Hi @kuruma
thanks for your reply. I did the requisite change for n=1 and found that in your code too repeated cities has not been dealt with,still getting WA. please provide some test case where i might be going wrong, my modified code:http://www.codechef.com/viewsolution/3891368

//