문제
Problem 2: Farm Painting [Brian Dean, 2013]
After several harsh winters, Farmer John has decided it is time to re-paint his farm. The farm consists of N fenced enclosures
FJ figures that an enclosure contained within another enclosure will not be visible to the outside world, so he only wants to re-paint enclosures that are themselves not contained within any other enclosures. Please help FJ determine the total number of enclosures he needs to paint.
입력
* Line 1: The number of enclosures, N.
* Lines
출력
* Line 1: The number of enclosures that are not contained within other enclosures.
예제1
3
2 0 8 9
10 2 11 3
4 2 6 5
2INPUT DETAILS:
There are three enclosures. The first has corners
OUTPUT DETAILS: Enclosure 3 is contained within enclosure 1, so there are two enclosures not contained within other enclosures.