I implemented the solution in Python using Dictionary but I got TLE in the last subtask. Link of my solution. I have used dynamic programming. I tried mapping the ndimensional tuple to a value using inbuilt dictionary. Please help why I am getting TLE. Please Help is it due to python or due to dictionary or ndimensional tuple or some optimization mistake ?? asked 25 Jan '15, 20:32
