Maximum Circles problems

Why is my code giving error ?
Code link: https://ide.codingblocks.com/s/163998

Hello @raj.bmp.333,

  1. For the case when second of two pairs is same,
    you have to compare their first while sorting.

  2. You have to output:
    the minimum number of circles that need to be removed.
    So, print n-count

  3. Actually, for the question, they are considering two circles intersecting at one point as non-overlapping (considering second of the first circle is at the left of second of the second circle.)
    Correction:
    v[i].first>=last
    See the second diagram in the following figure:
    image

Modified Code:

Hope, this would help.
Give a like if you are satisfied.