Need help in NP-hard problem

Revision en1, by M.A.H.M.O.O.D, 2016-10-27 18:58:46

Hi everyone.

I'm trying to solve this 687A - NP-трудная задача but I'm getting WA on test 15 and the input is too large for me to process where I'm going wrong, So I was hoping that someone that has solved it would take a look at my code and tell me where I'm going wrong ???

Thank you for reading.

My submission 21828109

:)

Tags help needed, rookie coder, graph

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English M.A.H.M.O.O.D 2016-10-27 18:58:46 367 Initial revision (published)