C2663 Beginner Guide: Interactive Tasks
======================================

A normal task works like this: your program reads the input, computes the answer, and prints it.

C2663 does not work that way. You never see the treasure's position. A grader program already has main(). The grader calls a function you write, and your function calls another function to ask questions.


What you write
--------------

You write one function:

    pair<int, int> find_chest(int N, int M)

N is the number of rows. M is the number of columns.

Inside that function you may call:

    int search(int X0, int Y0)

Use it to locate where the chest is.

Do not print the answer. The grader reads the pair you return.

Paste the entire code in treasure.cpp into HKOJ. The grader is already in that file. Write your strategy inside find_chest.


What you do not write
---------------------

- Do not write main().
- Do not read the input with cin. In particular, do not try to read X and Y. Those values are hidden. The grader reads them.
- Do not change anything below the line "Sample grader".
- Do not print the answer. Return it. The judge does not read your output.


How to test
-----------

Follow the rules in Sample Grader section in the problem statement.


File to submit
--------------

Hand in only the function in the top section of treasure.cpp. Do not hand in the sample grader.
