아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Jack and Jill

시간 제한2초메모리 제한256 MB

요약
대화형 숫자 맞히기 게임에서 질의마다 이전 답과 모순되지 않게 답해 가능한 범위를 유지하면서, Jack이 최소 30번 질문하도록 만든다.
난이도

보통10점 중 5점

유형
이분 탐색, 그리디, 구현, 구간
정답자
아직 제출이 없습니다

문제

This is an interactive problem.

Jack and Jill play "guess the number". Initially, Jill has to choose a secret number: an integer from 11 to 10910^{9}. After that, Jack asks questions in the form "is it the number xx?" with some integer xx from 11 to 10910^{9}. For each question, Jill has to answer either "yes", or "no, my number is greater", or "no, my number is less". The game ends when Jack correctly guesses the secret number, or after 100100 questions if it does not happen by then.

Despite Jack's best efforts, he was not able to guess the number in less than 3030 questions. He realized that Jill is cheating: instead of choosing a secret number in advance, she answers the questions in such a way that the game lasts long enough. Jack pondered: how does she do that?

This is an interactive problem: you play as Jill, and the jury plays as Jack. Your task is to answer the questions in such a way that Jack asks at least 3030 questions before the game ends. Keep in mind that your answers should not contradict each other: otherwise, Jack will immediately call you out on it!

힌트

In the first example, Jack says numbers 11, 22, 33, and so on. In the second example, Jack says numbers 10001000, 999999, 998998, and so on. He is guaranteed to follow these two strategies in the first two tests.

In both examples, Jill just chose 3030 as the secret number in advance. Your solution may of course use any other strategy.

예제2

  1. 예제 1

    입력
    1
    2
    ...and so on...
    29
    30
    
    예상 출력
    >
    >
    ...and so on...
    >
    =
    
  2. 예제 2

    입력
    1000
    999
    ...and so on...
    902
    901
    
    예상 출력
    <
    <
    ...and so on...
    <
    <