QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#122212#4218. Hidden Graph_UMqwq_AC ✓207ms33036kbC++141.1kb2023-07-09 19:20:432023-07-09 19:20:46

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-09 19:20:46]
  • 评测
  • 测评结果:AC
  • 用时:207ms
  • 内存:33036kb
  • [2023-07-09 19:20:43]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
#define MAXN 2010
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
int n,e[MAXN][MAXN];
vector<pii>ans;
pii query(vector<int>&vec){
	if(vec.size()<2u)return mp(-1,-1);
	printf("? %lld",(int)vec.size());
	for(auto u:vec)printf(" %lld",u);
	puts("");fflush(stdout);
	int u,v;scanf("%lld%lld",&u,&v);
	return mp(u,v);
}
void add(int u,int v){e[u][v]=e[v][u]=1;ans.pb(mp(u,v));}
void solve(vector<int>&vec){
	if(vec.size()<2u)return;
	vector<int>s,t;
	for(auto u:vec){
		s.pb(u);auto now=query(s);
		if(now.fi!=-1)s.pop_back(),t.pb(u),add(now.fi,now.se);
	}
	for(auto u:t)
		while(true){
			vector<int>que;que.pb(u);
			for(auto v:s)
				if(!e[u][v])que.pb(v);
			auto now=query(que);
			if(now.fi==-1)break;
			add(now.fi,now.se);
		}
	solve(t);
}
signed main(){
	scanf("%lld",&n);vector<int>vec;
	for(int i=1;i<=n;i++)vec.pb(i);
	solve(vec);
	printf("! %lld\n",(int)ans.size());
	for(auto i:ans)printf("%lld %lld\n",i.fi,i.se);
	fflush(stdout);
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3664kb

input:

3
1 2
1 3
2 3

output:

? 2 1 2
? 2 1 3
? 2 2 3
! 3
1 2
1 3
2 3

result:

ok correct

Test #2:

score: 0
Accepted
time: 2ms
memory: 3776kb

input:

10
1 2
1 3
1 4
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
2 5
2 6
-1 -1
3 7
3 10
3 8
3 9
-1 -1
4 8
4 10
4 5
-1 -1
-1 -1
-1 -1

output:

? 2 1 2
? 2 1 3
? 2 1 4
? 2 1 5
? 3 1 5 6
? 4 1 5 6 7
? 5 1 5 6 7 8
? 6 1 5 6 7 8 9
? 7 1 5 6 7 8 9 10
? 7 2 5 6 7 8 9 10
? 6 2 6 7 8 9 10
? 5 2 7 8 9 10
? 7 3 5 6 7 8 9 10
? 6 3 5 6 8 9 10
? 5 3 5 6 8 9
? 4 3 5 6 9
? 3 3 5 6
? 7 4 5 6 7 8 9 10
? 6 4 5 6 7 9 10
? 5 4 5 6 7 9
? 4 4 6 7 9
? 2 2 3
? 3 ...

result:

ok correct

Test #3:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

5
2 1
3 1
4 1
5 1
3 2
4 2
5 2
-1 -1
-1 -1

output:

? 2 1 2
? 2 1 3
? 2 1 4
? 2 1 5
? 2 2 3
? 2 2 4
? 2 2 5
? 2 3 4
? 3 3 4 5
! 7
2 1
3 1
4 1
5 1
3 2
4 2
5 2

result:

ok correct

Test #4:

score: 0
Accepted
time: 1ms
memory: 3696kb

input:

3
2 1
1 3
-1 -1

output:

? 2 1 2
? 2 1 3
? 2 2 3
! 2
2 1
1 3

result:

ok correct

Test #5:

score: 0
Accepted
time: 2ms
memory: 3676kb

input:

6
1 2
3 1
-1 -1
4 5
-1 -1
4 2
-1 -1
3 6
3 4
-1 -1
3 2
2 5
3 5

output:

? 2 1 2
? 2 1 3
? 2 1 4
? 3 1 4 5
? 3 1 4 6
? 3 2 4 6
? 2 2 6
? 3 3 4 6
? 2 3 4
? 3 5 1 6
? 2 2 3
? 2 2 5
? 2 3 5
! 9
1 2
3 1
4 5
4 2
3 6
3 4
3 2
2 5
3 5

result:

ok correct

Test #6:

score: 0
Accepted
time: 4ms
memory: 3808kb

input:

27
-1 -1
3 1
-1 -1
1 5
6 1
-1 -1
1 8
1 9
-1 -1
4 11
-1 -1
10 13
14 1
10 15
10 16
-1 -1
12 18
2 19
-1 -1
21 17
1 22
-1 -1
24 10
17 25
17 26
23 27
3 2
3 17
-1 -1
2 5
5 12
5 20
-1 -1
-1 -1
10 8
-1 -1
9 20
-1 -1
12 11
1 11
-1 -1
-1 -1
14 12
-1 -1
-1 -1
17 16
-1 -1
17 18
20 18
-1 -1
1 19
-1 -1
21 1
21 2
...

output:

? 2 1 2
? 3 1 2 3
? 3 1 2 4
? 4 1 2 4 5
? 4 1 2 4 6
? 4 1 2 4 7
? 5 1 2 4 7 8
? 5 1 2 4 7 9
? 5 1 2 4 7 10
? 6 1 2 4 7 10 11
? 6 1 2 4 7 10 12
? 7 1 2 4 7 10 12 13
? 7 1 2 4 7 10 12 14
? 7 1 2 4 7 10 12 15
? 7 1 2 4 7 10 12 16
? 7 1 2 4 7 10 12 17
? 8 1 2 4 7 10 12 17 18
? 8 1 2 4 7 10 12 17 19
? 8 ...

result:

ok correct

Test #7:

score: 0
Accepted
time: 4ms
memory: 3876kb

input:

47
-1 -1
-1 -1
-1 -1
5 4
-1 -1
7 6
-1 -1
9 4
-1 -1
11 1
2 12
-1 -1
-1 -1
13 15
16 1
17 1
18 3
19 2
20 6
10 21
22 10
23 4
-1 -1
25 8
26 24
-1 -1
27 28
10 29
-1 -1
31 24
6 32
2 33
27 34
35 1
27 36
6 37
38 30
3 39
27 40
-1 -1
13 42
27 43
44 1
-1 -1
46 3
45 47
5 8
27 5
13 5
5 3
-1 -1
13 7
27 7
10 7
7 24...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 5 1 2 3 4 6
? 6 1 2 3 4 6 7
? 6 1 2 3 4 6 8
? 7 1 2 3 4 6 8 9
? 7 1 2 3 4 6 8 10
? 8 1 2 3 4 6 8 10 11
? 8 1 2 3 4 6 8 10 12
? 8 1 2 3 4 6 8 10 13
? 9 1 2 3 4 6 8 10 13 14
? 10 1 2 3 4 6 8 10 13 14 15
? 10 1 2 3 4 6 8 10 13 14 16
? 10 1 2 3 4 6 8 10 13 1...

result:

ok correct

Test #8:

score: 0
Accepted
time: 3ms
memory: 3824kb

input:

38
-1 -1
-1 -1
4 1
1 5
-1 -1
2 7
-1 -1
-1 -1
-1 -1
11 1
12 8
13 1
6 14
-1 -1
16 6
2 17
3 18
-1 -1
15 20
8 21
15 22
19 23
24 1
2 25
26 19
15 27
28 8
29 3
-1 -1
31 19
15 32
33 9
30 34
8 35
-1 -1
37 6
38 2
4 19
4 6
4 10
-1 -1
36 5
3 5
-1 -1
6 7
-1 -1
-1 -1
-1 -1
13 8
-1 -1
1 14
3 14
19 14
-1 -1
16 19
-...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 4 1 2 3 5
? 4 1 2 3 6
? 5 1 2 3 6 7
? 5 1 2 3 6 8
? 6 1 2 3 6 8 9
? 7 1 2 3 6 8 9 10
? 8 1 2 3 6 8 9 10 11
? 8 1 2 3 6 8 9 10 12
? 8 1 2 3 6 8 9 10 13
? 8 1 2 3 6 8 9 10 14
? 8 1 2 3 6 8 9 10 15
? 9 1 2 3 6 8 9 10 15 16
? 9 1 2 3 6 8 9 10 15 17
? 9 1 2 3 6 8 9 10 15 1...

result:

ok correct

Test #9:

score: 0
Accepted
time: 5ms
memory: 5700kb

input:

25
-1 -1
-1 -1
-1 -1
5 4
6 4
7 3
2 8
9 4
10 3
2 11
12 4
-1 -1
14 13
-1 -1
16 3
4 17
18 4
13 19
20 13
13 21
4 22
-1 -1
24 15
25 3
5 2
5 13
-1 -1
6 13
-1 -1
7 13
-1 -1
8 23
4 8
13 8
-1 -1
2 9
-1 -1
10 15
-1 -1
-1 -1
-1 -1
14 4
14 3
-1 -1
16 13
-1 -1
-1 -1
18 13
18 2
-1 -1
-1 -1
20 23
20 3
-1 -1
-1 -1
...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 5 1 2 3 4 6
? 5 1 2 3 4 7
? 5 1 2 3 4 8
? 5 1 2 3 4 9
? 5 1 2 3 4 10
? 5 1 2 3 4 11
? 5 1 2 3 4 12
? 5 1 2 3 4 13
? 6 1 2 3 4 13 14
? 6 1 2 3 4 13 15
? 7 1 2 3 4 13 15 16
? 7 1 2 3 4 13 15 17
? 7 1 2 3 4 13 15 18
? 7 1 2 3 4 13 15 19
? 7 1 2 3 4 13 15 20...

result:

ok correct

Test #10:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

6
-1 -1
2 3
-1 -1
2 5
-1 -1
-1 -1
5 6
-1 -1
-1 -1

output:

? 2 1 2
? 3 1 2 3
? 3 1 2 4
? 4 1 2 4 5
? 4 1 2 4 6
? 4 3 1 4 6
? 4 5 1 4 6
? 3 5 1 4
? 2 3 5
! 3
2 3
2 5
5 6

result:

ok correct

Test #11:

score: 0
Accepted
time: 1ms
memory: 3644kb

input:

3
2 1
3 1
2 3

output:

? 2 1 2
? 2 1 3
? 2 2 3
! 3
2 1
3 1
2 3

result:

ok correct

Test #12:

score: 0
Accepted
time: 2ms
memory: 3644kb

input:

3
2 1
3 1
-1 -1

output:

? 2 1 2
? 2 1 3
? 2 2 3
! 2
2 1
3 1

result:

ok correct

Test #13:

score: 0
Accepted
time: 2ms
memory: 5744kb

input:

5
2 1
3 1
-1 -1
5 1
-1 -1
-1 -1
-1 -1
2 3
2 5
-1 -1

output:

? 2 1 2
? 2 1 3
? 2 1 4
? 3 1 4 5
? 2 2 4
? 2 3 4
? 2 5 4
? 2 2 3
? 2 2 5
? 2 3 5
! 5
2 1
3 1
5 1
2 3
2 5

result:

ok correct

Test #14:

score: 0
Accepted
time: 2ms
memory: 3644kb

input:

3
2 1
-1 -1
-1 -1

output:

? 2 1 2
? 2 1 3
? 2 2 3
! 1
2 1

result:

ok correct

Test #15:

score: 0
Accepted
time: 1ms
memory: 3648kb

input:

5
-1 -1
-1 -1
4 3
3 5
-1 -1
2 5
-1 -1
-1 -1

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 4 1 2 3 5
? 3 4 1 2
? 3 5 1 2
? 2 5 1
? 2 4 5
! 3
4 3
3 5
2 5

result:

ok correct

Test #16:

score: 0
Accepted
time: 1ms
memory: 5808kb

input:

93
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
10 9
7 11
2 12
5 13
-1 -1
-1 -1
6 16
-1 -1
-1 -1
19 18
-1 -1
-1 -1
-1 -1
8 23
-1 -1
1 25
20 26
-1 -1
-1 -1
1 29
4 30
31 9
32 27
28 33
34 9
-1 -1
36 2
35 37
27 38
2 39
40 35
1 41
21 42
5 43
44 4
-1 -1
-1 -1
5 47
-1 -1
49 45
14 50
51 9
5 52
53 15
-1 -...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 6 1 2 3 4 5 6
? 7 1 2 3 4 5 6 7
? 8 1 2 3 4 5 6 7 8
? 9 1 2 3 4 5 6 7 8 9
? 10 1 2 3 4 5 6 7 8 9 10
? 10 1 2 3 4 5 6 7 8 9 11
? 10 1 2 3 4 5 6 7 8 9 12
? 10 1 2 3 4 5 6 7 8 9 13
? 10 1 2 3 4 5 6 7 8 9 14
? 11 1 2 3 4 5 6 7 8 9 14 15
? 12 1 2 3 4 5 6 7 8 ...

result:

ok correct

Test #17:

score: 0
Accepted
time: 4ms
memory: 5856kb

input:

111
-1 -1
-1 -1
-1 -1
-1 -1
2 6
7 4
3 8
-1 -1
-1 -1
2 11
12 4
13 10
-1 -1
-1 -1
-1 -1
17 10
18 5
16 19
-1 -1
4 21
-1 -1
-1 -1
-1 -1
-1 -1
26 10
-1 -1
2 28
16 29
25 30
27 31
-1 -1
-1 -1
10 34
-1 -1
27 36
37 4
38 15
39 1
-1 -1
27 41
42 4
25 43
44 27
27 45
2 46
47 16
48 35
49 15
-1 -1
-1 -1
-1 -1
-1 -1...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 6 1 2 3 4 5 6
? 6 1 2 3 4 5 7
? 6 1 2 3 4 5 8
? 6 1 2 3 4 5 9
? 7 1 2 3 4 5 9 10
? 8 1 2 3 4 5 9 10 11
? 8 1 2 3 4 5 9 10 12
? 8 1 2 3 4 5 9 10 13
? 8 1 2 3 4 5 9 10 14
? 9 1 2 3 4 5 9 10 14 15
? 10 1 2 3 4 5 9 10 14 15 16
? 11 1 2 3 4 5 9 10 14 15 16 17...

result:

ok correct

Test #18:

score: 0
Accepted
time: 7ms
memory: 6244kb

input:

132
-1 -1
3 1
-1 -1
5 1
-1 -1
7 2
-1 -1
-1 -1
10 8
-1 -1
12 8
9 13
2 14
-1 -1
-1 -1
17 15
-1 -1
19 6
-1 -1
21 20
22 8
-1 -1
24 9
-1 -1
-1 -1
-1 -1
28 15
-1 -1
4 30
6 31
4 32
-1 -1
-1 -1
26 35
36 9
-1 -1
38 29
6 39
29 40
-1 -1
42 15
43 9
26 44
45 20
-1 -1
47 29
4 48
49 1
-1 -1
51 50
-1 -1
53 9
54 1
5...

output:

? 2 1 2
? 3 1 2 3
? 3 1 2 4
? 4 1 2 4 5
? 4 1 2 4 6
? 5 1 2 4 6 7
? 5 1 2 4 6 8
? 6 1 2 4 6 8 9
? 7 1 2 4 6 8 9 10
? 7 1 2 4 6 8 9 11
? 8 1 2 4 6 8 9 11 12
? 8 1 2 4 6 8 9 11 13
? 8 1 2 4 6 8 9 11 14
? 8 1 2 4 6 8 9 11 15
? 9 1 2 4 6 8 9 11 15 16
? 10 1 2 4 6 8 9 11 15 16 17
? 10 1 2 4 6 8 9 11 15 1...

result:

ok correct

Test #19:

score: 0
Accepted
time: 1ms
memory: 5804kb

input:

94
-1 -1
3 2
-1 -1
-1 -1
-1 -1
2 7
-1 -1
2 9
-1 -1
11 6
-1 -1
6 13
14 10
-1 -1
15 16
17 8
-1 -1
19 12
6 20
15 21
5 22
-1 -1
24 5
-1 -1
-1 -1
27 25
2 28
-1 -1
-1 -1
31 23
25 32
33 12
25 34
35 26
-1 -1
2 37
38 26
39 12
-1 -1
41 12
15 42
43 40
44 12
18 45
-1 -1
47 5
-1 -1
25 49
50 12
51 26
52 5
53 40
5...

output:

? 2 1 2
? 3 1 2 3
? 3 1 2 4
? 4 1 2 4 5
? 5 1 2 4 5 6
? 6 1 2 4 5 6 7
? 6 1 2 4 5 6 8
? 7 1 2 4 5 6 8 9
? 7 1 2 4 5 6 8 10
? 8 1 2 4 5 6 8 10 11
? 8 1 2 4 5 6 8 10 12
? 9 1 2 4 5 6 8 10 12 13
? 9 1 2 4 5 6 8 10 12 14
? 9 1 2 4 5 6 8 10 12 15
? 10 1 2 4 5 6 8 10 12 15 16
? 10 1 2 4 5 6 8 10 12 15 17
...

result:

ok correct

Test #20:

score: 0
Accepted
time: 4ms
memory: 5868kb

input:

73
-1 -1
1 3
-1 -1
-1 -1
-1 -1
5 7
-1 -1
1 9
1 10
4 11
-1 -1
13 6
-1 -1
15 8
1 16
17 4
-1 -1
1 19
20 14
4 21
12 22
23 5
-1 -1
1 25
-1 -1
-1 -1
28 2
1 29
30 26
31 8
-1 -1
33 32
1 34
12 35
12 36
-1 -1
38 14
12 39
1 40
-1 -1
4 42
6 43
44 5
14 45
-1 -1
-1 -1
12 48
12 49
50 18
51 4
52 26
1 53
-1 -1
1 55
...

output:

? 2 1 2
? 3 1 2 3
? 3 1 2 4
? 4 1 2 4 5
? 5 1 2 4 5 6
? 6 1 2 4 5 6 7
? 6 1 2 4 5 6 8
? 7 1 2 4 5 6 8 9
? 7 1 2 4 5 6 8 10
? 7 1 2 4 5 6 8 11
? 7 1 2 4 5 6 8 12
? 8 1 2 4 5 6 8 12 13
? 8 1 2 4 5 6 8 12 14
? 9 1 2 4 5 6 8 12 14 15
? 9 1 2 4 5 6 8 12 14 16
? 9 1 2 4 5 6 8 12 14 17
? 9 1 2 4 5 6 8 12 1...

result:

ok correct

Test #21:

score: 0
Accepted
time: 9ms
memory: 4004kb

input:

77
-1 -1
3 2
2 4
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
1 11
-1 -1
8 13
14 7
2 15
16 1
7 17
-1 -1
-1 -1
2 20
8 21
22 19
7 23
18 24
-1 -1
-1 -1
-1 -1
2 28
-1 -1
18 30
6 31
32 6
18 33
34 25
2 35
7 36
37 5
-1 -1
7 39
40 25
41 27
-1 -1
-1 -1
44 43
8 45
18 46
47 5
-1 -1
-1 -1
50 10
2 51
52 7
-1 -1
6 54
-1 -...

output:

? 2 1 2
? 3 1 2 3
? 3 1 2 4
? 3 1 2 5
? 4 1 2 5 6
? 5 1 2 5 6 7
? 6 1 2 5 6 7 8
? 7 1 2 5 6 7 8 9
? 8 1 2 5 6 7 8 9 10
? 9 1 2 5 6 7 8 9 10 11
? 9 1 2 5 6 7 8 9 10 12
? 10 1 2 5 6 7 8 9 10 12 13
? 10 1 2 5 6 7 8 9 10 12 14
? 10 1 2 5 6 7 8 9 10 12 15
? 10 1 2 5 6 7 8 9 10 12 16
? 10 1 2 5 6 7 8 9 10...

result:

ok correct

Test #22:

score: 0
Accepted
time: 5ms
memory: 4036kb

input:

81
-1 -1
2 3
2 4
1 5
-1 -1
-1 -1
1 8
-1 -1
10 6
-1 -1
6 12
-1 -1
1 14
13 15
11 16
6 17
18 6
19 7
20 11
6 21
2 22
11 23
1 24
-1 -1
25 26
25 27
28 6
6 29
-1 -1
-1 -1
-1 -1
-1 -1
25 34
30 35
36 6
1 37
-1 -1
-1 -1
-1 -1
2 41
42 33
30 43
2 44
25 45
46 40
2 47
48 6
49 31
50 6
6 51
52 25
6 53
2 54
40 55
11...

output:

? 2 1 2
? 3 1 2 3
? 3 1 2 4
? 3 1 2 5
? 3 1 2 6
? 4 1 2 6 7
? 5 1 2 6 7 8
? 5 1 2 6 7 9
? 6 1 2 6 7 9 10
? 6 1 2 6 7 9 11
? 7 1 2 6 7 9 11 12
? 7 1 2 6 7 9 11 13
? 8 1 2 6 7 9 11 13 14
? 8 1 2 6 7 9 11 13 15
? 8 1 2 6 7 9 11 13 16
? 8 1 2 6 7 9 11 13 17
? 8 1 2 6 7 9 11 13 18
? 8 1 2 6 7 9 11 13 19
...

result:

ok correct

Test #23:

score: 0
Accepted
time: 9ms
memory: 5860kb

input:

93
-1 -1
-1 -1
4 1
-1 -1
-1 -1
2 7
1 8
9 1
-1 -1
-1 -1
-1 -1
-1 -1
1 14
-1 -1
13 16
17 1
6 18
-1 -1
2 20
11 21
2 22
3 23
24 15
25 3
26 6
27 10
28 10
29 5
5 30
-1 -1
-1 -1
-1 -1
-1 -1
10 35
36 32
1 37
2 38
3 39
40 34
41 19
42 6
43 12
2 44
45 3
3 46
-1 -1
-1 -1
13 49
-1 -1
51 3
-1 -1
53 10
2 54
-1 -1
...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 4 1 2 3 5
? 5 1 2 3 5 6
? 6 1 2 3 5 6 7
? 6 1 2 3 5 6 8
? 6 1 2 3 5 6 9
? 6 1 2 3 5 6 10
? 7 1 2 3 5 6 10 11
? 8 1 2 3 5 6 10 11 12
? 9 1 2 3 5 6 10 11 12 13
? 10 1 2 3 5 6 10 11 12 13 14
? 10 1 2 3 5 6 10 11 12 13 15
? 11 1 2 3 5 6 10 11 12 13 15 16
? 11 1 2 3 5 6 10...

result:

ok correct

Test #24:

score: 0
Accepted
time: 3ms
memory: 3872kb

input:

37
-1 -1
3 1
-1 -1
2 5
-1 -1
2 7
4 8
2 9
1 10
2 11
12 1
6 13
6 14
1 15
4 16
1 17
1 18
-1 -1
6 20
6 21
-1 -1
19 23
2 24
2 25
2 26
6 27
6 28
4 29
30 1
1 31
32 1
-1 -1
22 34
35 1
36 19
19 37
3 19
-1 -1
-1 -1
7 19
7 1
-1 -1
33 8
6 8
22 8
1 8
2 8
-1 -1
6 9
9 1
-1 -1
33 10
-1 -1
33 11
11 1
4 11
-1 -1
-1 -...

output:

? 2 1 2
? 3 1 2 3
? 3 1 2 4
? 4 1 2 4 5
? 4 1 2 4 6
? 5 1 2 4 6 7
? 5 1 2 4 6 8
? 5 1 2 4 6 9
? 5 1 2 4 6 10
? 5 1 2 4 6 11
? 5 1 2 4 6 12
? 5 1 2 4 6 13
? 5 1 2 4 6 14
? 5 1 2 4 6 15
? 5 1 2 4 6 16
? 5 1 2 4 6 17
? 5 1 2 4 6 18
? 5 1 2 4 6 19
? 6 1 2 4 6 19 20
? 6 1 2 4 6 19 21
? 6 1 2 4 6 19 22
? ...

result:

ok correct

Test #25:

score: 0
Accepted
time: 7ms
memory: 5932kb

input:

144
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
9 15
-1 -1
-1 -1
14 18
-1 -1
-1 -1
-1 -1
5 22
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
35 33
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
43 5
-1 -1
32 45
-1 -1
-1 -1
-1 -1
-1 -1
3 50
-1 -1
...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 6 1 2 3 4 5 6
? 7 1 2 3 4 5 6 7
? 8 1 2 3 4 5 6 7 8
? 9 1 2 3 4 5 6 7 8 9
? 10 1 2 3 4 5 6 7 8 9 10
? 11 1 2 3 4 5 6 7 8 9 10 11
? 12 1 2 3 4 5 6 7 8 9 10 11 12
? 13 1 2 3 4 5 6 7 8 9 10 11 12 13
? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14
? 15 1 2 3 4 5 6 7 8...

result:

ok correct

Test #26:

score: 0
Accepted
time: 31ms
memory: 12388kb

input:

561
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
26 22
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
46 31
37 47
39 48
-1 -1
-1 -1
-1...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 6 1 2 3 4 5 6
? 7 1 2 3 4 5 6 7
? 8 1 2 3 4 5 6 7 8
? 9 1 2 3 4 5 6 7 8 9
? 10 1 2 3 4 5 6 7 8 9 10
? 11 1 2 3 4 5 6 7 8 9 10 11
? 12 1 2 3 4 5 6 7 8 9 10 11 12
? 13 1 2 3 4 5 6 7 8 9 10 11 12 13
? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14
? 15 1 2 3 4 5 6 7 8...

result:

ok correct

Test #27:

score: 0
Accepted
time: 21ms
memory: 14256kb

input:

679
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
39 40
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
46 14
-1 -1
-1 -1
-1 -1
-1 -1
-1...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 6 1 2 3 4 5 6
? 7 1 2 3 4 5 6 7
? 8 1 2 3 4 5 6 7 8
? 9 1 2 3 4 5 6 7 8 9
? 10 1 2 3 4 5 6 7 8 9 10
? 11 1 2 3 4 5 6 7 8 9 10 11
? 12 1 2 3 4 5 6 7 8 9 10 11 12
? 13 1 2 3 4 5 6 7 8 9 10 11 12 13
? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14
? 15 1 2 3 4 5 6 7 8...

result:

ok correct

Test #28:

score: 0
Accepted
time: 63ms
memory: 20396kb

input:

1000
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
17 27
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
18 45
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 6 1 2 3 4 5 6
? 7 1 2 3 4 5 6 7
? 8 1 2 3 4 5 6 7 8
? 9 1 2 3 4 5 6 7 8 9
? 10 1 2 3 4 5 6 7 8 9 10
? 11 1 2 3 4 5 6 7 8 9 10 11
? 12 1 2 3 4 5 6 7 8 9 10 11 12
? 13 1 2 3 4 5 6 7 8 9 10 11 12 13
? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14
? 15 1 2 3 4 5 6 7 8...

result:

ok correct

Test #29:

score: 0
Accepted
time: 42ms
memory: 18752kb

input:

1000
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
13 14
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
6 22
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
43 24
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 6 1 2 3 4 5 6
? 7 1 2 3 4 5 6 7
? 8 1 2 3 4 5 6 7 8
? 9 1 2 3 4 5 6 7 8 9
? 10 1 2 3 4 5 6 7 8 9 10
? 11 1 2 3 4 5 6 7 8 9 10 11
? 12 1 2 3 4 5 6 7 8 9 10 11 12
? 13 1 2 3 4 5 6 7 8 9 10 11 12 13
? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14
? 14 1 2 3 4 5 6 7 8...

result:

ok correct

Test #30:

score: 0
Accepted
time: 207ms
memory: 33036kb

input:

2000
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
44 15
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-...

output:

? 2 1 2
? 3 1 2 3
? 4 1 2 3 4
? 5 1 2 3 4 5
? 6 1 2 3 4 5 6
? 7 1 2 3 4 5 6 7
? 8 1 2 3 4 5 6 7 8
? 9 1 2 3 4 5 6 7 8 9
? 10 1 2 3 4 5 6 7 8 9 10
? 11 1 2 3 4 5 6 7 8 9 10 11
? 12 1 2 3 4 5 6 7 8 9 10 11 12
? 13 1 2 3 4 5 6 7 8 9 10 11 12 13
? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14
? 15 1 2 3 4 5 6 7 8...

result:

ok correct