Yeah, I did the same ,but can you have look at the input -output files ,that I posted above, they are altogether different(for say it gives 1684(or something) as output for the first input)...And the constraints are quite relaxed(just ~1000 entries) I dont think I'm doing something wrong there.