QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#855186#9734. Identify ChordjlgxyAC ✓69ms3736kbC++201.7kb2025-01-12 15:53:542025-01-12 15:53:55

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3652kb

input:

2
6
2
2
2
1
1
4
1
1
1
1

output:

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

result:

ok ok (2 test cases)

Test #2:

score: 0
Accepted
time: 28ms
memory: 3736kb

input:

1000
15
5
6
6
4
6
1
1
19
5
4
5
4
3
1
1
17
5
4
4
4
3
1
1
15
6
7
5
3
1
1
1
14
5
4
2
2
3
1
1
15
3
2
4
3
1
1
17
8
8
8
7
6
4
5
4
1
1
20
6
5
1
3
2
1
13
5
6
4
3
4
2
1
18
3
4
5
3
2
3
1
13
4
3
3
2
3
3
1
14
2
3
4
3
3
1
17
8
7
6
4
6
1
1
12
5
5
3
4
3
1
1
10
5
5
3
4
3
4
1
1
14
6
6
4
6
1
1
19
8
7
3
3
4
5
1
19
6
5...

output:

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

result:

ok ok (1000 test cases)

Test #3:

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

input:

1000
21
3
4
2
5
3
3
1
22
8
9
3
3
4
1
1
20
5
6
5
7
6
1
1
22
10
10
6
8
7
7
1
1
21
9
8
5
8
7
1
1
21
8
7
5
5
4
5
7
1
24
11
10
6
8
8
2
1
22
10
10
6
9
9
4
1
21
4
3
5
3
2
1
1
23
8
7
2
3
3
3
1
21
10
10
10
9
8
5
7
7
1
1
24
9
10
6
9
8
9
1
1
20
9
9
5
8
9
2
1
24
11
10
6
9
10
1
1
23
8
9
7
3
2
2
1
1
23
7
6
5
4
3
...

output:

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

result:

ok ok (1000 test cases)

Test #4:

score: 0
Accepted
time: 22ms
memory: 3656kb

input:

1000
25
8
9
7
2
3
1
2
1
25
6
7
5
4
3
2
3
3
1
25
11
12
10
5
3
4
4
2
1
25
5
6
4
6
4
3
1
1
26
12
12
7
9
8
8
10
1
26
11
10
5
4
4
3
3
1
26
13
13
11
12
5
2
2
1
1
27
12
13
11
7
9
8
8
1
1
25
9
10
10
7
10
4
1
27
9
10
8
5
6
5
4
1
1
27
11
10
7
9
9
8
9
1
27
13
13
13
13
12
11
7
8
7
6
1
1
26
5
6
7
4
4
3
5
1
25
11...

output:

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

result:

ok ok (1000 test cases)

Test #5:

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

input:

1000
29
10
9
4
6
4
3
1
1
28
13
12
6
4
6
2
1
30
3
4
8
4
2
3
1
1
29
4
5
3
7
3
2
1
1
28
8
7
7
9
8
7
1
29
6
5
7
4
4
3
1
1
29
9
8
7
5
5
4
7
1
28
11
10
7
8
9
9
1
1
30
4
5
8
7
5
7
1
30
8
7
8
9
8
8
1
28
11
12
7
11
10
11
1
1
29
14
13
12
7
10
9
9
11
1
29
11
12
10
4
4
3
4
1
1
29
7
8
8
8
10
8
1
29
14
14
14
13
1...

output:

? 1 15
? 1 16
? 1 23
? 1 19
? 1 21
? 1 22
? 3 22
! 3 22
? 1 15
? 1 14
? 1 8
? 1 5
? 1 7
? 6 8
! 24 8
? 1 16
? 1 15
? 1 23
? 1 19
? 1 17
? 1 18
? 2 17
! 2 17
? 1 15
? 1 16
? 1 14
? 1 8
? 1 12
? 1 13
? 2 13
! 2 13
? 1 15
? 1 14
? 1 8
? 1 12
? 1 13
? 7 14
! 23 14
? 1 15
? 1 16
? 1 23
? 1 19
? 1 17
? 1 ...

result:

ok ok (1000 test cases)

Test #6:

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

input:

1000
32
13
12
5
4
6
6
1
1
30
14
14
7
4
5
4
7
1
32
16
16
14
15
8
10
8
7
1
1
31
5
6
4
8
6
5
1
1
32
7
8
7
3
5
4
1
1
32
8
9
4
4
2
3
1
1
31
15
14
13
8
12
12
1
1
31
6
5
6
2
4
3
3
1
32
12
11
8
12
10
11
1
1
30
14
14
7
4
6
6
11
1
31
11
12
10
4
4
6
5
5
1
31
10
9
8
12
10
8
1
33
7
8
6
3
3
1
2
1
32
11
12
8
7
7
6...

output:

? 1 17
? 1 16
? 1 9
? 1 5
? 1 7
? 1 8
? 5 9
! 5 9
? 1 16
? 1 15
? 1 23
? 1 27
? 1 25
? 1 26
? 4 26
! 28 26
? 1 17
? 2 18
? 3 19
? 3 18
? 3 27
? 3 23
? 3 25
? 3 26
? 9 26
! 9 26
? 1 16
? 1 17
? 1 15
? 1 9
? 1 13
? 1 14
? 4 15
! 4 15
? 1 17
? 1 16
? 1 25
? 1 21
? 1 23
? 1 22
? 3 21
! 3 21
? 1 17
? 1 1...

result:

ok ok (1000 test cases)

Test #7:

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

input:

1000
34
17
16
16
8
4
3
4
1
1
33
8
9
7
8
8
6
7
1
1
33
11
10
6
6
4
5
7
1
34
11
10
5
7
5
4
7
1
34
11
12
3
5
3
2
1
1
35
14
15
13
6
2
2
1
1
34
8
7
6
4
4
3
5
1
34
14
15
6
5
6
5
1
1
34
16
15
8
4
3
4
1
1
33
9
8
8
8
6
7
11
1
33
16
16
16
16
15
16
15
9
13
15
1
1
34
16
16
8
4
2
1
1
1
33
13
14
12
8
12
11
12
4
1
...

output:

? 1 18
? 2 19
? 2 18
? 2 27
? 2 31
? 2 33
? 2 32
? 5 31
! 5 31
? 1 17
? 1 18
? 1 16
? 1 9
? 1 13
? 1 15
? 1 14
? 6 15
! 6 15
? 1 17
? 1 18
? 1 26
? 1 22
? 1 24
? 1 25
? 4 24
! 31 24
? 1 18
? 1 17
? 1 10
? 1 14
? 1 12
? 1 11
? 4 11
! 32 11
? 1 18
? 1 17
? 1 26
? 1 30
? 1 28
? 1 27
? 2 27
! 2 27
? 1 1...

result:

ok ok (1000 test cases)

Test #8:

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

input:

1000
36
18
17
17
9
14
16
17
1
1
36
3
4
9
7
5
4
5
1
36
13
12
4
5
6
5
1
1
36
5
4
9
5
3
4
1
1
36
18
17
17
8
5
6
5
1
1
36
12
13
9
12
10
11
1
1
35
13
12
9
10
10
9
13
1
36
13
14
9
13
11
12
1
1
36
14
15
7
10
8
7
6
1
1
36
16
15
9
12
10
9
10
1
1
36
9
10
9
5
7
6
1
1
36
8
7
9
4
6
5
7
1
36
17
16
9
14
15
14
1
1
...

output:

? 1 19
? 2 20
? 2 19
? 2 29
? 2 24
? 2 22
? 2 21
? 18 20
! 18 20
? 1 19
? 1 18
? 1 28
? 1 23
? 1 21
? 1 20
? 3 19
! 35 19
? 1 19
? 1 18
? 1 10
? 1 6
? 1 8
? 1 9
? 4 10
! 4 10
? 1 19
? 1 18
? 1 10
? 1 15
? 1 17
? 1 16
? 3 17
! 3 17
? 1 19
? 2 20
? 2 19
? 2 29
? 2 33
? 2 31
? 2 32
? 6 32
! 6 32
? 1 19...

result:

ok ok (1000 test cases)

Test #9:

score: 0
Accepted
time: 8ms
memory: 3568kb

input:

1000
37
17
18
16
9
13
12
12
2
1
36
17
17
9
13
11
10
10
16
1
38
9
8
10
9
7
8
1
1
37
15
14
9
14
14
13
1
1
37
12
13
13
10
15
14
7
1
36
8
9
9
4
6
5
7
1
37
6
5
9
5
3
4
5
1
37
18
18
18
18
17
16
9
12
10
9
8
1
1
37
17
18
17
10
15
17
2
1
37
8
7
9
9
7
6
1
1
37
10
9
6
5
3
4
5
1
37
18
18
18
17
16
8
4
2
1
1
1
36...

output:

? 1 19
? 1 20
? 1 18
? 1 10
? 1 15
? 1 13
? 1 14
? 12 14
! 27 14
? 1 19
? 1 18
? 1 28
? 1 23
? 1 25
? 1 26
? 1 27
? 10 26
! 28 26
? 1 20
? 1 19
? 1 11
? 1 16
? 1 18
? 1 17
? 7 18
! 7 18
? 1 19
? 1 20
? 1 29
? 1 24
? 1 22
? 1 21
? 13 21
! 13 21
? 1 19
? 1 20
? 1 18
? 1 28
? 1 23
? 1 21
? 12 19
! 27 1...

result:

ok ok (1000 test cases)

Test #10:

score: 0
Accepted
time: 26ms
memory: 3564kb

input:

1000
39
18
17
10
13
13
14
1
1
38
8
9
10
10
8
7
13
1
38
19
19
17
18
10
13
13
14
1
1
39
12
13
11
3
5
3
2
1
1
38
15
16
10
15
15
14
7
1
39
4
3
8
3
1
2
1
39
18
19
17
9
4
3
3
2
1
38
18
18
10
15
17
18
1
1
39
14
13
4
3
2
1
2
1
39
11
12
10
10
9
9
8
1
1
39
9
8
7
4
4
3
1
1
38
19
18
18
10
15
17
18
1
1
39
15
16
...

output:

? 1 20
? 1 21
? 1 30
? 1 25
? 1 27
? 1 26
? 13 25
! 13 25
? 1 20
? 1 19
? 1 29
? 1 24
? 1 22
? 1 21
? 7 21
! 33 21
? 1 20
? 2 21
? 3 22
? 3 21
? 3 31
? 3 26
? 3 28
? 3 27
? 15 26
! 15 26
? 1 20
? 1 21
? 1 19
? 1 11
? 1 6
? 1 9
? 1 10
? 2 10
! 2 10
? 1 20
? 1 19
? 1 29
? 1 24
? 1 22
? 1 21
? 14 21
! ...

result:

ok ok (1000 test cases)

Test #11:

score: 0
Accepted
time: 12ms
memory: 3664kb

input:

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

output:

? 1 21
? 1 20
? 1 31
? 1 26
? 1 28
? 1 27
? 7 26
! 7 26
? 1 21
? 1 20
? 1 31
? 1 26
? 1 28
? 1 27
? 12 27
! 12 27
? 1 21
? 1 20
? 1 31
? 1 36
? 1 33
? 1 34
? 3 33
! 3 33
? 1 21
? 1 20
? 1 11
? 1 16
? 1 14
? 1 13
! 1 14
? 1 21
? 1 20
? 1 31
? 1 26
? 1 23
? 1 24
? 14 23
! 28 23
? 1 21
? 1 20
? 1 11
? ...

result:

ok ok (1000 test cases)

Test #12:

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

input:

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

output:

? 1 22
? 1 21
? 1 12
? 1 17
? 1 15
? 1 16
? 6 17
! 6 17
? 1 21
? 1 22
? 1 32
? 1 37
? 1 34
? 1 33
? 5 33
! 38 33
? 1 21
? 1 22
? 1 20
? 1 11
? 1 16
? 1 14
? 1 15
? 3 16
! 40 16
? 1 21
? 1 22
? 1 20
? 1 11
? 1 16
? 1 14
? 1 15
? 7 16
! 36 16
? 1 21
? 1 22
? 1 32
? 1 27
? 1 24
? 1 23
? 10 23
! 10 23
?...

result:

ok ok (1000 test cases)

Test #13:

score: 0
Accepted
time: 20ms
memory: 3592kb

input:

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

output:

? 1 22
? 1 23
? 1 21
? 1 12
? 1 17
? 1 20
? 3 21
! 3 21
? 1 22
? 1 21
? 1 12
? 1 17
? 1 20
? 1 19
? 16 20
! 16 20
? 1 22
? 1 23
? 1 21
? 1 12
? 1 17
? 1 20
? 5 21
! 5 21
? 1 22
? 1 23
? 1 21
? 1 12
? 1 17
? 1 15
? 1 14
? 1 13
? 10 14
! 35 14
? 1 22
? 1 23
? 2 23
? 2 24
? 2 25
? 2 34
? 2 39
? 2 42
? ...

result:

ok ok (1000 test cases)

Test #14:

score: 0
Accepted
time: 10ms
memory: 3708kb

input:

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

output:

? 1 23
? 2 24
? 3 25
? 3 24
? 3 36
? 3 41
? 3 44
? 3 42
? 6 41
! 6 41
? 1 23
? 1 22
? 1 34
? 1 28
? 1 31
? 1 29
? 1 30
? 5 29
! 5 29
? 1 22
? 1 23
? 1 33
? 1 28
? 1 25
? 1 24
? 9 24
! 36 24
? 1 22
? 1 23
? 2 23
? 2 24
? 3 24
? 3 25
? 3 35
? 3 30
? 3 27
? 3 28
? 3 29
? 18 28
! 18 28
? 1 23
? 1 22
? 1...

result:

ok ok (1000 test cases)

Test #15:

score: 0
Accepted
time: 10ms
memory: 3588kb

input:

1000
45
20
21
19
9
4
3
3
2
3
1
45
16
17
15
5
6
7
6
7
1
45
10
11
9
11
5
8
6
1
1
45
15
14
9
9
6
7
1
1
45
11
12
10
4
6
3
2
3
1
1
45
16
17
15
11
11
10
10
9
7
1
45
19
18
11
17
16
17
10
1
45
5
6
4
11
8
5
7
1
44
19
20
8
6
9
9
15
1
45
12
11
2
6
3
2
1
1
44
20
21
9
6
9
10
17
1
45
15
16
14
4
6
4
3
1
1
44
16
17...

output:

? 1 23
? 1 24
? 1 22
? 1 12
? 1 7
? 1 4
? 1 6
? 1 5
? 2 5
! 45 5
? 1 23
? 1 24
? 1 22
? 1 12
? 1 7
? 1 10
? 1 11
? 5 12
! 42 12
? 1 23
? 1 24
? 1 22
? 1 12
? 1 18
? 1 15
? 1 17
? 5 18
! 5 18
? 1 23
? 1 24
? 1 35
? 1 29
? 1 32
? 1 33
? 6 32
! 6 32
? 1 23
? 1 24
? 1 22
? 1 12
? 1 18
? 1 15
? 1 14
? 1 ...

result:

ok ok (1000 test cases)

Test #16:

score: 0
Accepted
time: 12ms
memory: 3588kb

input:

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

output:

? 1 24
? 1 23
? 1 35
? 1 29
? 1 32
? 1 30
? 1 31
? 11 31
! 11 31
? 1 24
? 1 23
? 1 35
? 1 29
? 1 32
? 1 30
? 4 29
! 4 29
? 1 24
? 1 23
? 1 35
? 1 41
? 1 38
? 1 39
? 1 40
? 7 39
! 7 39
? 1 24
? 1 23
? 1 13
? 1 7
? 1 10
? 1 12
? 1 11
? 6 11
! 6 11
? 1 24
? 1 23
? 1 13
? 1 19
? 1 22
? 1 21
? 1 20
! 1 2...

result:

ok ok (1000 test cases)

Test #17:

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

input:

1000
1000000000
499999999
499999999
249999999
125000000
187499999
156249999
140624999
132812499
128906249
126953125
127929688
128417968
128173828
128051758
127990723
127960205
127944947
127952577
127956391
127954484
127953530
127953053
127952815
127952696
127952636
127952607
127952621
127952615
1279...

output:

? 1 500000001
? 1 500000000
? 1 750000001
? 1 875000001
? 1 812500001
? 1 843750001
? 1 859375001
? 1 867187501
? 1 871093751
? 1 873046876
? 1 872070313
? 1 871582032
? 1 871826172
? 1 871948242
? 1 872009277
? 1 872039795
? 1 872055054
? 1 872047424
? 1 872043609
? 1 872045516
? 1 872046470
? 1 87...

result:

ok ok (1000 test cases)

Test #18:

score: 0
Accepted
time: 66ms
memory: 3628kb

input:

1000
1000000000
499999969
499999968
250000000
375000000
437499969
406249969
390625000
398437500
402343750
404296844
403320282
402832032
403076173
403198243
403259247
403228761
403244020
403251618
403247835
403249742
403250696
403251142
403250904
403250816
403250876
403250875
403250886
403250878
4032...

output:

? 1 500000001
? 1 500000000
? 1 250000001
? 1 375000001
? 1 437500001
? 1 406250001
? 1 390625001
? 1 398437501
? 1 402343751
? 1 404296876
? 1 403320314
? 1 402832033
? 1 403076174
? 1 403198244
? 1 403259279
? 1 403228762
? 1 403244021
? 1 403251650
? 1 403247836
? 1 403249743
? 1 403250697
? 1 40...

result:

ok ok (1000 test cases)

Test #19:

score: 0
Accepted
time: 53ms
memory: 3640kb

input:

1000
1000000000
474148191
474148192
250000000
349148191
286648191
255398191
239773191
242187501
238281251
237820066
237304688
237331785
237087645
237182617
237121582
237091064
237075805
237080016
237076202
237074295
237074851
237074374
237074135
237074176
237074117
237074105
237074102
237074097
2370...

output:

? 1 500000001
? 1 500000000
? 1 750000001
? 1 625000001
? 1 687500001
? 1 718750001
? 1 734375001
? 1 742187501
? 1 738281251
? 1 736328126
? 1 737304688
? 1 736816407
? 1 737060547
? 1 737182617
? 1 737121582
? 1 737091064
? 1 737075805
? 1 737068176
? 1 737071990
? 1 737073897
? 1 737074851
? 1 73...

result:

ok ok (1000 test cases)

Test #20:

score: 0
Accepted
time: 51ms
memory: 3584kb

input:

1000
1000000000
230485382
230485381
250000000
125000072
167985382
136735382
121110382
117187572
117204132
115251007
116211009
115722728
115478587
115356517
115295482
115264964
115249705
115243378
115245890
115243983
115243029
115242902
115242790
115242783
115242730
115242754
115242739
115242732
1152...

output:

? 1 500000001
? 1 500000000
? 1 250000001
? 1 375000001
? 1 437500001
? 1 406250001
? 1 390625001
? 1 382812501
? 1 386718751
? 1 384765626
? 1 383789064
? 1 384277345
? 1 384521486
? 1 384643556
? 1 384704591
? 1 384735109
? 1 384750368
? 1 384757997
? 1 384754183
? 1 384756090
? 1 384757044
? 1 38...

result:

ok ok (1000 test cases)

Test #21:

score: 0
Accepted
time: 47ms
memory: 3628kb

input:

1000
1000000000
288090905
288090906
45653197
163090905
100590905
69340905
53715905
45903405
41997155
43700072
42723509
42235228
41991087
41875085
41930052
41899534
41884275
41876646
41872831
41873178
41872225
41872354
41872115
41872106
41872055
41872077
41872062
41872055
41872051
41872053
41872052
8...

output:

? 1 500000001
? 1 500000000
? 1 750000001
? 1 625000001
? 1 687500001
? 1 718750001
? 1 734375001
? 1 742187501
? 1 746093751
? 1 748046876
? 1 747070313
? 1 746582032
? 1 746337891
? 1 746215821
? 1 746276856
? 1 746246338
? 1 746231079
? 1 746223450
? 1 746219635
? 1 746217728
? 1 746218681
? 1 74...

result:

ok ok (1000 test cases)

Test #22:

score: 0
Accepted
time: 69ms
memory: 3652kb

input:

1000
999999999
499999998
499999999
499999997
249999999
125000000
187500000
218749999
203125000
210937500
214843750
216796875
217773438
218261719
218505860
218627929
218566895
218597413
218612672
218620300
218616487
218618394
218619347
218618870
218618632
218618514
218618573
218618544
218618558
21861...

output:

? 1 500000000
? 1 500000001
? 1 499999999
? 1 250000001
? 1 125000001
? 1 187500001
? 1 218750001
? 1 203125001
? 1 210937501
? 1 214843751
? 1 216796876
? 1 217773439
? 1 218261720
? 1 218505861
? 1 218627931
? 1 218566896
? 1 218597414
? 1 218612673
? 1 218620302
? 1 218616488
? 1 218618395
? 1 21...

result:

ok ok (1000 test cases)

Test #23:

score: 0
Accepted
time: 54ms
memory: 3580kb

input:

1000
999999999
499999957
499999956
250000000
374999957
312499957
281250000
296875000
304687500
308593750
310546875
311523438
312011676
311767579
311889606
311828571
311798097
311813356
311820985
311824757
311822893
311823834
311824281
311824043
311823924
311823864
311823834
311823819
311823826
31182...

output:

? 1 500000000
? 1 500000001
? 1 750000000
? 1 625000000
? 1 687500000
? 1 718750000
? 1 703125000
? 1 695312500
? 1 691406250
? 1 689453125
? 1 688476562
? 1 687988281
? 1 688232421
? 1 688110351
? 1 688171386
? 1 688201903
? 1 688186644
? 1 688179015
? 1 688175200
? 1 688177107
? 1 688176153
? 1 68...

result:

ok ok (1000 test cases)

Test #24:

score: 0
Accepted
time: 62ms
memory: 3736kb

input:

1000
999999999
324545945
324545944
250000000
199545945
187500001
168295945
171875001
164062501
164389695
162436570
163085938
162597657
162353516
162314500
162292481
162283983
162277222
162276354
162273407
162274447
162273493
162273016
162273168
162273049
162272989
162272987
162272974
162272980
16227...

output:

? 1 500000000
? 1 500000001
? 1 750000000
? 1 625000000
? 1 687500000
? 1 656250000
? 1 671875000
? 1 664062500
? 1 660156250
? 1 662109375
? 1 663085937
? 1 662597656
? 1 662353515
? 1 662231445
? 1 662292480
? 1 662261962
? 1 662277221
? 1 662269591
? 1 662273406
? 1 662271498
? 1 662272452
? 1 66...

result:

ok ok (1000 test cases)

Test #25:

score: 0
Accepted
time: 53ms
memory: 3580kb

input:

1000
999999999
487015083
487015084
487015082
250000000
362015084
299515084
268265084
252640084
244827584
246093816
244140691
243851022
243652409
243606882
243530338
243545847
243515330
243515079
243507701
243511264
243509356
243508402
243507925
243507687
243507582
243507627
243507597
243507582
24350...

output:

? 1 500000000
? 1 500000001
? 1 499999999
? 1 250000001
? 1 375000001
? 1 312500001
? 1 281250001
? 1 265625001
? 1 257812501
? 1 253906251
? 1 255859376
? 1 256835939
? 1 256347658
? 1 256591799
? 1 256469729
? 1 256530764
? 1 256500247
? 1 256484988
? 1 256492618
? 1 256488803
? 1 256490711
? 1 25...

result:

ok ok (1000 test cases)

Test #26:

score: 0
Accepted
time: 68ms
memory: 3716kb

input:

1000
999999999
265285129
265285128
15285129
125000000
63235117
31985117
16360117
8547617
11378879
9425754
8449192
8059335
8205052
8082982
8021947
8028817
8013558
8014318
8010503
8011650
8010696
8010219
8010265
8010146
8010159
8010129
8010132
8010125
8010125
8010123
8010124
1
1
999999999
450448164
45...

output:

? 1 500000000
? 1 500000001
? 1 750000000
? 1 875000000
? 1 812500000
? 1 781250000
? 1 765625000
? 1 757812500
? 1 753906250
? 1 755859375
? 1 756835937
? 1 757324218
? 1 757080077
? 1 757202147
? 1 757263182
? 1 757293700
? 1 757278441
? 1 757270811
? 1 757274626
? 1 757276533
? 1 757275579
? 1 75...

result:

ok ok (1000 test cases)

Test #27:

score: 0
Accepted
time: 41ms
memory: 3600kb

input:

1000
536870912
261621269
261621268
134217728
194512405
167772160
184549376
186123797
188047581
185950429
185075221
185426141
185163997
185032925
185009685
185000157
184993301
184991965
184989205
184989917
184988893
184988693
184988637
184988565
184988573
184988541
184988549
184988541
184988537
18498...

output:

? 1 268435457
? 1 268435456
? 1 134217729
? 1 201326593
? 1 167772161
? 1 184549377
? 1 192937985
? 1 188743681
? 1 190840833
? 1 191889409
? 1 191365121
? 1 191627265
? 1 191758337
? 1 191823873
? 1 191791105
? 1 191807489
? 1 191799297
? 1 191803393
? 1 191801345
? 1 191802369
? 1 191802881
? 1 19...

result:

ok ok (1000 test cases)

Test #28:

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

input:

1000
536870911
244408485
244408484
110190757
67108864
76636325
68900839
68247717
64706535
66150565
65101989
64577701
64444391
64446629
64381093
64411623
64395239
64387047
64382951
64380903
64380069
64380391
64380135
64380007
64380005
64379975
64379989
64379981
64379977
64379975
64379974
128759947
1
...

output:

? 1 268435456
? 1 268435457
? 1 402653184
? 1 469762048
? 1 436207616
? 1 452984832
? 1 444596224
? 1 448790528
? 1 446693376
? 1 447741952
? 1 448266240
? 1 448528384
? 1 448397312
? 1 448462848
? 1 448495616
? 1 448479232
? 1 448471040
? 1 448466944
? 1 448464896
? 1 448463872
? 1 448464384
? 1 44...

result:

ok ok (1000 test cases)

Extra Test:

score: 0
Extra Test Passed