TopCoder

User's AC Ratio

100.0% (1/1)

Submission's AC Ratio

100.0% (4/4)

Tags

Description

The PDF version of the problemset can be downloaded here.

Interactive problem. Submit an ordinary C++ program that talks to the interactor through standard input/output exactly as in the statement (cin/cout or scanf/printf, flush after every command); you do not need to include the provided header. Only C++ submissions are supported on this judge. The interactor runs inside your process, so its time and memory are counted toward yours, as stated in the problem. If you wait for a reply without having flushed a complete command (ending with a newline), you get Wrong Answer here; the real judge would hang (Time Limit Exceeded).

Input Format

Output Format

Sample Input 1

4 5
0 0
4 0
4 4
0 4
2 2
1 2 5
2 3 5
3 4 5
4 1 5

Sample Output 1

(your program) ? 4 1 2 3 5
(interactor)   0
(your program) ? 3 3 4 5
(interactor)   1
(your program) ! 3
(interactor)   correct

Hints

Problem Source

ICPC 2026 Asia Seoul Regional Problem F

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 4000 1048576 1048576
1 4000 1048576 1048576
2 4000 1048576 1048576
3 4000 1048576 1048576
4 4000 1048576 1048576
5 4000 1048576 1048576
6 4000 1048576 1048576
7 4000 1048576 1048576
8 4000 1048576 1048576
9 4000 1048576 1048576
10 4000 1048576 1048576
11 4000 1048576 1048576
12 4000 1048576 1048576
13 4000 1048576 1048576
14 4000 1048576 1048576
15 4000 1048576 1048576
16 4000 1048576 1048576
17 4000 1048576 1048576
18 4000 1048576 1048576
19 4000 1048576 1048576
20 4000 1048576 1048576
21 4000 1048576 1048576
22 4000 1048576 1048576
23 4000 1048576 1048576
24 4000 1048576 1048576
25 4000 1048576 1048576
26 4000 1048576 1048576
27 4000 1048576 1048576
28 4000 1048576 1048576
29 4000 1048576 1048576
30 4000 1048576 1048576
31 4000 1048576 1048576
32 4000 1048576 1048576
33 4000 1048576 1048576
34 4000 1048576 1048576
35 4000 1048576 1048576
36 4000 1048576 1048576
37 4000 1048576 1048576
38 4000 1048576 1048576
39 4000 1048576 1048576
40 4000 1048576 1048576
41 4000 1048576 1048576
42 4000 1048576 1048576
43 4000 1048576 1048576
44 4000 1048576 1048576
45 4000 1048576 1048576
46 4000 1048576 1048576
47 4000 1048576 1048576
48 4000 1048576 1048576
49 4000 1048576 1048576
50 4000 1048576 1048576
51 4000 1048576 1048576
52 4000 1048576 1048576
53 4000 1048576 1048576