memset it gives TLE. https://www.codechef.com/viewsolution/35709202
In place of memset if loop is used then it is AC. https://www.codechef.com/viewsolution/35709184
Is this because of the fact that memset will always run from i=0 to 1=1e7 but in case of loop it runs till size of string only? This means there were more than 100 TC. Have you faced this before?
Also, can we declare an array of size 1e7 in
https://www.codechef.com/viewsolution/35709227 I have declared an array of size of string. I think max size of array can be 1e6 in
main. But this was acceted.