P9311 [EGOI 2021] Twin Cookies / Sister Cookie Sharing.

Background

Day 1 Problem C. The statement is translated from [EGOI2021 twincookies](https://stats.egoi.org/media/task_description/2021_twincookies_en.pdf). The official statement does not provide an interaction library. Due to implementation reasons of the interaction library, the testdata may be relatively weak. If you can write an adaptive interaction library, you may contact rui_er.

Description

**This is an I/O interactive problem.** Sophie is preparing her sisters' birthday party. They all like cookies. This year, they want to try something new: cookies made by the Unique Cookie Taste Company (UCTC), which produces cookies with different flavors. Each cookie produced by UCTC has an integer tastiness between $1$ and $10^{16}$. The sisters will be jealous of each other, so the total tastiness of the cookies each sister receives must be the same. UCTC only accepts orders of **exactly $n$ cookies**. In each order, the customer specifies the tastiness of each cookie they want. As the name suggests, the Unique Cookie Taste Company refuses to produce two cookies with the same tastiness for the same customer. Sophie must ensure that she never orders the same tastiness twice, whether within one order or across different orders. Sophie has never ordered from UCTC before, so she can buy each tastiness at most once. There is one more obstacle for Sophie: it is well known that UCTC's delivery service is extremely bad. When a customer orders $n$ cookies, only one of them will be delivered. The rest are eaten by the delivery staff. The customer cannot decide which cookie will be delivered. Since the birthday is approaching, Sophie only has time to place at most $101$ orders. Your task is to help her. More specifically, you need to do the following: 1. First, order cookies. You can place at most $101$ orders, each containing exactly $n$ desired tastiness values. You may place multiple orders. **Right after each order is sent, you immediately learn the tastiness of the cookie that gets delivered.** Remember that you cannot order the same tastiness more than once, even across different orders. (In particular, if you ordered some tastiness values but they were not delivered, you still **cannot** order the same tastiness again.) 2. Then, share cookies. When you have received enough cookies, you should give the sisters **some** cookies. Each person should receive at least one cookie, and the total tastiness of the cookies each person receives should be the same. **You do not have to distribute all delivered cookies.**

Input Format

N/A

Output Format

After each output of your program, you must **flush the output stream**. This is necessary to ensure the interaction library receives your output immediately. Some examples: - In C++, there are several options: - `fflush(stdout);` - `std::cout

Explanation/Hint

**Hint** The sample input and output should be read line by line. Your program alternates between reading one integer from standard input and printing one line to standard output (or the final three lines). The interaction library chooses the delivered cookie arbitrarily. This means that in some test points, the interaction library may be adaptive; but in other test points, it may choose randomly. In particular, for $n=2$, if you output the same orders as in sample $2$, you may get different results. --- **Constraints** For all data, $1\le n\le 5\times 10^3$. - Subtask 1 ($8$ points): $n=1$. - Subtask 2 ($9$ points): $n\le 2$. - Subtask 3 ($18$ points): $n\le 25$. - Subtask 4 ($16$ points): $n\le 200$. - Subtask 5 ($13$ points): $n\le 10^3$. - Subtask 6 ($36$ points): no special restrictions. Translated by ChatGPT 5