Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
For the "rectangles located far away" test, I printed out the input as my solution was not efficient enough for it. By doing so, I realised that the coordinates of the last rectangles do not respect the condition: 0 ≤ xi, yi ≤ 1,000,000.
I'm not complaining or suggesting that this is the reason my solution doesn't work; I'm simply pointing it out.