|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|3 초||512 MB||0||0||0||0.000%|
Little Red Riding Hood's (In German: Rotkäppchen) grandmother's hut is already quite old. It needs to be torn down and will be replaced with a new hut. Naturally, she wants the hut to be as safe as possible -- nothing could be worse than Little Red Riding Hood being eaten by the big bad wolf.
Grandmother wants to build her hut in one of the forest's glades (In German: Lichtung). Little Red Riding Hood's house -- well, that of her parents -- is also in a glade. Furthermore, the wolf is also always lurking in one of the glades. If Little Red Riding Hood walks from her home to Grandmother's hut and passes by the wolf, she will surely be eaten. The wolf only changes its glade during the night, so whenever Little Red Riding Hood is walking through the forest, he will be located in an unknown but fixed glade. He will never be in the glade of Grandmother's hut nor in the glade of Little Red Riding Hood's house.
Little Red Riding Hood always walks from one glade to another. In order to avoid getting eaten by the wolf, she has to check whether the wolf is in the glade she currently wants to walk to. Luckily, she has a pair of binoculars. So whenever she is in one of the glades and wants to go to some other glade, she first uses her binoculars to check whether the wolf is in that other glade. If he is, she won't go to that glade. The problem, however, is the following: The forest is not flat. Throughout the forest there are hills, and if a hill is in-between Little Red Riding Hood's current glade and the next glade she wants to go to, she cannot use her binoculars to check whether the wolf is in that next glade. She will never go from her current glade to another glade if she cannot check that other glade with her binoculars. This includes both the glade of her own home and that of Grandmother's hut (the wolf will never be there, but it is still important for her to check in order to feel comfortable). Each of the hills is a perfect circle and we assume that the glades are sufficiently small compared to the hills so that we consider them to be points. Even if the line-of-sight between two glades is only tangent to a hill, Little Red Riding Hood's sight is blocked. No two hills intersect and no glade is within or on the boundary of a hill.
Grandmother considers a glade safe for her to build her new hut there if no matter in which glade the wolf sits, Little Red Riding Hood can always find a way from her home to Grandmother and back. Grandmother has asked you to determine which of the glades are safe for her to build her house in.
The input consists of:
No two glades have the same coordinates, no two hills share a common point, and no glade is within or on the boundary of a hill.
Output the indices of all glades where it is safe for Grandmother to build her hut. These indices must be output in ascending order.
4 3 0 0 0 10 10 0 10 10 5 0 2 10 5 2 2 2 1
7 5 0 0 10 10 10 -10 20 0 30 10 30 -10 40 0 10 4 1 6 -3 3 14 -3 3 20 10 4 30 0 4
4 5 6
Figure J.1: The first sample input.
Figure J.2: The second sample input.