This question is amazing.
N non-intersecting circles are given. One circle may completely contain the other. Here, a circle is contained in another circle.
Calculate the sequence numbers of the excluded circles.
The data volume is 4 W.
So N2 certainly won't work.
Meditation, cannot solve
After reading this, I couldn't help calling the data structure.
The general idea is similar to the scanning line we often use, but here it is a circle.
Each circle has the leftmost vertex and rightmost vertex. We just scanned the points from left to right in order.
In the process of scanning, if the left endpoint of a circle is scanned, it depends on whether the circle is included. If it is not included, it is added to the data structure we designed. So how can we determine whether it is included? The bare idea is to check whether it is included in a circle in the previous data structure. In fact, we only need to determine the upper and lower circles that are close to the center of our own center in the data structure, because at this time, the data structure we designed must be some circles that do not contain each other, if the new circle is included, the circle containing it must be in its adjacent place.
If a circle is scanned to the right endpoint, the circle will be deleted, because the circle in the future will not be related to it.
Based on this insertion, deletion, and adjacent conditions, we can find that it is better to use set to implement it.