I am getting WA in last test case of SANSKAR…
Here is my algo…
I have used simple back tracking and recursion along with dp(by the means of map itachi) to find whether a number is not found previously or not in the same derivation tree…
I am getting WA only in the last test case …
Can anyone tell me where my code is wrong…
Or provide the test cases for which my code gives WA…
Thnx for the help
http://www.codechef.com/submit/complete/446994-8759--548f1837882bb