Help in a question (POLMUL)

Here is the link to the question
: https://www.codechef.com/FLPAST01/problems/POLMUL

Here is the solution I submited but was getting a WA
https://www.codechef.com/viewsolution/26688013

access denied in the solution link

this might be bcoz it is a past foundation level exam problem.

Check my code:Code