ENGLISH Video Solution

that explains TLE.
but why RE?
and I was just trying for the first sub-task.

https://www.codechef.com/viewsolution/29102613
what am i missing here ?? pls help

I think you might have some integer overflow.

yup !! thanks a lot

What’s so interesting about using trie or hashing? They don’t solve P vs. NP.