| CPUlm Winter Contest 2022 |
|---|
| Finished |
On their quest to destroy the horcruxes, Harry, Ron and Hermione have returned to Hogwarts to search for the Lost Diadem of Ravenclaw, which they suspect has been turned into one of these dark artifacts. It does not take long before their presence is noticed, and now the Hogwarts professors and the members of the Order of the Phoenix are shielding the castle with various protective jinxes and charms to prepare for the arrival of Voldemort and the Death Eaters.
One of the most powerful charms in their repertoire is Repello Inimicum, which creates a near impenetrable barrier that will disintegrate anything that tries to pass through it. The charm needs to be performed by $$$n$$$ wizards and witches working together. Each of them uses their wand to draw a large circle in the sky while chanting the incantation. The potency of the charm depends on the number of points where two or more of these circles touch or intersect.
For simplicity we assume that the $$$n$$$ circles that make up the charm are all drawn in the same plane. Given $$$k$$$, the number of intersections that is needed for the charm to be the most potent, find a possible arrangement of the $$$n$$$ circles so that there are exactly $$$k$$$ intersection points. Two circles touching in a point counts as a single intersection. If more than two circles intersect in some point, then that point is only counted once.
The input consists of:
If there is no solution, output impossible. Otherwise, output $$$n$$$ lines, each with three integers $$$x$$$, $$$y$$$ and $$$r$$$ ($$$-1\,000 \le x,y \le 1\,000, 1 \le r \le 1\,000$$$) giving the center $$$(x,y)$$$ and radius $$$r$$$ of one of the circles. The circles must be distinct. If there is more than one solution, any one of them will be accepted.
3 6
0 0 7 10 0 7 5 8 7
5 100
impossible
4 3
0 1 1 0 -1 1 0 0 3 5 0 3
3 2
0 0 5 4 0 3 8 0 5
| Name |
|---|


