Showing compilation 1 dont printing anythinh
It is giving compilation error i.e. TLE(Time Limit Exceeded) because you have run 2 loops 10^6 * 10^6 operations, but the maximum number of operations allowed in 1 sec are nearly 10^8.
So you need to think of a correct optimized approach for this question.
Hope it helps.
Feel free to ask if something is not clear.
now i have implemented the same way itsexplained in hint still TLE
its showing wrong answer now
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.