This is my code:
I have used try-catch to handle errors. Its showing timelimit exceeded. How can I optimize my solution. I have used nested loops.
#include