Eagles and Woodpeckers#5310

Eagles and Woodpeckers

1 sekondë
64 megabajt
Shumë e vështirë

In the forest, there are nests belonging to eagles and woodpeckers. When the eagle chicks hatched, the adult eagles decided to create a "playground" where the young could play safely under their watchful eyes. The eagles want this playground to have the largest possible area, while also meeting the following conditions:

Write a program that, given the locations of eagle and woodpecker nests, determines the optimal placement for the playground.

Hyrja

The input begins with the number (3 \leq N \leq 100), representing the number of eagle nests in the forest. This is followed by pairs of integers, each pair indicating the coordinates of an eagle nest. Next, the number (0 \leq M \leq 100) is provided, representing the number of woodpecker nests, followed by pairs of integers specifying the coordinates of the woodpecker nests. Each coordinate is an integer not exceeding in absolute value. No two nests share the same location.

Dalja

The output should first display the number , which is the number of eagle nests that will serve as the vertices of the polygon forming the playground. Following this, print numbers, which are the indices of these eagle nests (nests are numbered starting from in the order they appear in the input file), listed in the order of polygon traversal (either clockwise or counterclockwise). If constructing a playground with a non-zero area is not possible, output the single number 0.

Shembuj

Shembulli 1

Loading
Loading