Comments

Array b should be of size m, but is that related to TLE?

On clicking the link for jury solution of E, it shows "You are not allowed to view the requested page." P.S. It is fixed now.

0

How will it raise his/her rating?

No, it should not, as I said they only check the output text file, they don't run your code, just check it for plagiarism.

No you don't need to do that, you can read the input either from stdin or from file, it doesn't matter, they don't run your code, as given in the FAQ.