3 人解决,5 人已尝试。
4 份提交通过,共有 13 份提交。
8.3 EMB 奖励。
单点时限: 3.0 sec
内存限制: 512 MB
You were invited to the annual archery tournament. You are going to compete against the best archers from all of the Northern Eurasia. This year, a new type of competition is introduced, where a shooting range is dynamic and new targets might appear at any second.
As the shooting range is far enough from you, it can be represented as a 2D plane, where
Initially, the shooting range is empty. Your participation in this competition can be described as
The first line of the input contains integer
For each of your shots, output a separate line with the single integer. If the shot did not hit any target, print -1
If the shot hit a target, print the number of event when that target was added to the range. Events are numbered starting from
8 1 0 12 2 -11 22 1 24 10 1 12 3 2 12 12 2 16 14 1 28 15 2 3 6
-1 -1 3 1
Illustration shows the state of the range after first six events. The rightmost target was hit by the last shot and is going to be removed.
3 人解决,5 人已尝试。
4 份提交通过,共有 13 份提交。
8.3 EMB 奖励。