Procesor
시간 제한1초메모리 제한2048 MB
비교 질의로만 확인할 수 있는 숨은 배열에서 비교 결과를 출력하거나, 가능할 때 가장 작은 원소를 찾아 제거하는 문제다.
- 난이도
쉬움10점 중 2점
- 유형
- 구현
- 정답자
- 아직 제출이 없습니다
문제
Initially, Fran has an empty array . Fran processes queries of the form — he appends elements to the end of . After each query, Fran wants to determine the smallest element in the array , and once he identifies it, he removes it from the array without altering the indices of the other elements.
Your task is to determine the smallest element of the array for each query by asking questions.
힌트
Explanation of the Sample Case:
The final array is of the form .
The first query outputs because .
The second query outputs because .
The third query outputs because .
After this, it can be determined that is the smallest current element, so the output is ! . The interaction continues with the subsequent queries.