this is question I am not able to understand why II subtask is giving WA.I think all my output well less then 10^5
Its advisable to generate a file with the output case. Then write a program to check if all numbers are less than or equal to 10^5 or not. Thats the best debugging process.
I did it using that method- outputted the TC in a file and checked if that code gave WA or not.
In case you find any trouble writing the checker code or are unable to debug, then get back to me. Thanks!