svemir | 프로그래밍의 벗 PivotOJ
PivotOJ

svemir

시간 제한: 1000ms메모리 제한: 512MB출처: CHC 2005 National Competition #1 - SeniorsBOJ 21999

문제

Space shuttle has lost its black-box somewhere in the universe, and the crew is trying to find it as soon as possible.

Signal emitted from the box is not strong enough to determine the exact position of the box. However, when the spaceship moves, the instruments can determine if the signal from the box is now stronger or weaker than before, and hence the crew knows if the spaceship is now closer or further from the box.

The universe is a three-dimensional space consisted of NxNxN small squares. Each square is represented by three coordinates, all of them are positive integers less than or equal to N.

At the beginning, spaceship is located in the square (1,1,1), and the black-box is at an different unknown location.

Write a program that will find the black-box (i.e. by moving the spaceship to the exact position of the black-box) with at most 200 calls to function Pomak.

이 문제는 채점 준비 중입니다. 테스트 데이터가 확보되면 제출이 가능합니다.