Public Judge

pjudge

実行時間制限: 1 s メモリ制限: 512 MB 満点: 100

#21776. 【PR #10】Slacking off

統計

This is an interactive problem.

There is an undirected simple graph with $100$ vertices.

In each query, you can ask the interactor about three vertices $a, b, c$. The interactor will tell you how many edges exist between these three vertices and return an integer in $\{0, 1, 2, 3\}$. You must ensure that $a, b, c$ are pairwise distinct.

You need to reconstruct this graph.

Implementation Details

This problem uses IO interaction. You need to submit a source file that can be compiled, just like a traditional problem.

You do not need to read any input initially. You can initiate a query by writing ? a b c to standard output, and then read an integer between $0$ and $3$ from standard input, which represents the interactor's response.

When you are able to reconstruct the graph, output a line containing ! followed by $100$ lines, each containing a $0/1$ string $s_i$ of length $100$, describing the graph. $s_{i,j}$ is $1$ if and only if the edge $(i, j)$ exists in the graph.

Remember to flush the output after each operation.

Examples

Input 1

0
2
2

Output 1

? 1 2 3
? 1 2 4
? 1 3 4
!
0001
0001
0001
1110

Note

For convenience, we assume there are only $4$ vertices in the graph in this example. Note that in the actual tests, the graph will have $100$ vertices.

Constraints

All test cases have exactly $100$ vertices.

Let $Q$ be the number of your queries. If $Q > 161\,700$, or your returned answer is incorrect, or you perform an illegal interaction process, you will receive $0$ points.

Otherwise, your score will be calculated according to the table below:

Constraint Score
$9900 \le Q \le 161\,700$ $10+10\cdot \frac{161700-Q}{161700-9900}$
$4950 \le Q \le 9900$ $20+10\cdot \frac{9900-Q}{9900-4950}$
$3400 \le Q \le 4950$ $30+10\cdot \frac{4950-Q}{4950-3400}$
$Q < 3400$ $100$

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.