How to Avoid Disqualification in 75 Easy Steps

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

You are standing in front of the open safe, a medal in your hand. But your triumph turns to despair as you look around: a message on a tie you found in the room reveals that your assistant exposed your plan to the Scientific Committee! Now the two committee chairmen are hiding in the building to stop you from escaping…

Luckily, you have $R$ vacuum cleaner robots left over from your trade with your fellow contestants. You want to use these robots to locate the two chairmen so that you can avoid them during your escape. You can instruct each robot to scout several of $1\,000$ positions where the chairmen could be located. Unfortunately, the software of these robots is quite simple.* Each robot can only detect whether or not there is at least one chairman at its scouted positions.

To make things worse, every robot needs a full hour to scout its positions before returning with its result to you. Because this will drain the robot’s battery, you can send out each robot only once.

As you don’t want to be late for the evening activities, you want to know the positions of the chairmen after at most $H$ hours. In particular, you might be forced to send out several robots at once without waiting for the previous robots to return. You can assume that the two chairmen stay at the same positions all the time.†

Write a program which plans this scouting mission and determines where the two chairmen are located.


* After all, you sold all the fancy ones to the other contestants!

† Due to the late-night task preparations they are simply too exhausted to move.