QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#856161#9734. Identify ChordqiuzxAC ✓74ms3584kbC++201.7kb2025-01-13 17:28:572025-01-13 17:31:34

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3456kb

input:

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

output:

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

result:

ok ok (2 test cases)

Test #2:

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

input:

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

output:

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

result:

ok ok (1000 test cases)

Test #3:

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

input:

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

output:

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

result:

ok ok (1000 test cases)

Test #4:

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

input:

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

output:

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

result:

ok ok (1000 test cases)

Test #5:

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

input:

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

output:

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

result:

ok ok (1000 test cases)

Test #6:

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

input:

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

output:

? 15 31
? 14 31
? 7 31
? 11 31
? 9 31
? 8 31
? 5 9
! 5 9
? 12 27
? 6 21
? 6 20
? 6 22
? 6 29
? 6 25
? 6 27
? 6 26
? 14 26
! 28 26
? 13 29
? 13 28
? 13 21
? 13 25
? 13 27
? 13 26
? 17 26
! 9 26
? 5 20
? 5 19
? 5 12
? 5 16
? 5 14
? 5 15
? 6 15
! 4 15
? 12 28
? 1 17
? 1 16
? 1 18
? 1 25
? 1 21
? 1 23
?...

result:

ok ok (1000 test cases)

Test #7:

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

input:

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

output:

? 15 32
? 15 31
? 15 23
? 15 27
? 15 29
? 15 30
? 25 31
! 5 31
? 7 24
? 6 24
? 24 32
? 3 24
? 5 24
? 6 33
! 15 6
? 3 19
? 3 18
? 3 20
? 3 27
? 3 23
? 3 25
? 3 24
? 8 24
! 31 24
? 14 31
? 13 31
? 5 31
? 9 31
? 11 31
? 10 31
? 11 32
! 32 11
? 4 21
? 3 21
? 21 29
? 21 33
? 1 21
? 2 21
? 2 27
! 27 2
? 1...

result:

ok ok (1000 test cases)

Test #8:

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

input:

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

output:

? 7 25
? 7 24
? 7 16
? 7 20
? 7 18
? 7 19
? 18 20
! 18 20
? 6 24
? 5 24
? 24 33
? 1 24
? 24 35
? 24 34
? 29 35
! 19 35
? 12 30
? 11 30
? 3 30
? 7 30
? 9 30
? 10 30
? 4 10
! 4 10
? 11 29
? 10 29
? 12 29
? 20 29
? 16 29
? 18 29
? 17 29
? 3 17
! 3 17
? 17 35
? 16 35
? 8 35
? 4 35
? 6 35
? 5 35
? 2 6
! ...

result:

ok ok (1000 test cases)

Test #9:

score: 0
Accepted
time: 11ms
memory: 3456kb

input:

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

output:

? 2 20
? 1 19
? 1 18
? 1 10
? 1 14
? 1 12
? 1 13
? 12 14
! 27 14
? 12 30
? 11 30
? 13 30
? 21 30
? 25 30
? 27 30
? 26 30
? 26 32
! 28 26
? 13 32
? 7 26
? 7 25
? 7 16
? 7 21
? 7 19
? 7 18
? 7 17
! 7 18
? 11 30
? 10 30
? 12 30
? 20 30
? 16 30
? 14 30
? 13 30
? 2 13
! 21 13
? 19 37
? 19 36
? 19 28
? 19...

result:

ok ok (1000 test cases)

Test #10:

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

input:

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

output:

? 1 20
? 1 19
? 1 21
? 1 30
? 1 25
? 1 27
? 1 26
? 13 25
! 13 25
? 1 20
? 20 38
? 20 29
? 20 34
? 20 32
? 20 33
? 21 33
! 21 33
? 2 21
? 13 32
? 13 31
? 13 22
? 13 27
? 13 25
? 13 26
? 15 26
! 15 26
? 18 38
? 17 38
? 8 38
? 13 38
? 11 38
? 10 38
? 9 38
? 2 10
! 2 10
? 3 22
? 2 22
? 22 31
? 22 27
? 2...

result:

ok ok (1000 test cases)

Test #11:

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

input:

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

output:

? 15 35
? 15 34
? 15 25
? 15 30
? 15 28
? 15 27
? 15 26
? 23 26
! 7 26
? 12 32
? 12 31
? 12 22
? 12 27
? 12 25
? 12 26
! 12 27
? 6 26
? 6 25
? 6 27
? 6 36
? 6 31
? 6 33
? 6 34
? 9 33
! 3 33
? 9 29
? 8 29
? 10 29
? 19 29
? 14 29
? 16 29
? 15 29
? 1 14
! 1 14
? 15 35
? 14 35
? 16 35
? 25 35
? 20 35
? ...

result:

ok ok (1000 test cases)

Test #12:

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

input:

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

output:

? 7 28
? 7 27
? 7 17
? 7 12
? 7 15
? 7 16
? 8 17
! 6 17
? 15 36
? 3 23
? 3 22
? 3 24
? 3 33
? 3 38
? 3 35
? 3 34
? 9 33
! 38 33
? 13 34
? 12 34
? 14 34
? 23 34
? 18 34
? 16 34
? 17 34
? 16 40
! 40 16
? 7 27
? 7 26
? 7 28
? 7 37
? 7 32
? 7 34
? 7 35
? 7 36
? 16 36
! 16 36
? 12 32
? 12 31
? 12 22
? 12...

result:

ok ok (1000 test cases)

Test #13:

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

input:

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

output:

? 1 23
? 23 43
? 2 23
? 12 23
? 7 23
? 4 23
? 3 23
? 3 25
! 21 3
? 15 36
? 14 36
? 16 36
? 26 36
? 21 36
? 18 36
? 17 36
? 10 16
! 20 16
? 9 31
? 8 31
? 31 41
? 3 31
? 6 31
? 5 31
? 4 31
? 5 41
! 21 5
? 14 36
? 13 36
? 15 36
? 14 37
! 35 14
? 9 31
? 8 31
? 31 41
? 3 31
? 6 31
? 5 31
? 4 31
? 5 40
! ...

result:

ok ok (1000 test cases)

Test #14:

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

input:

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

output:

? 13 35
? 12 35
? 2 35
? 7 35
? 5 35
? 6 35
? 6 41
! 41 6
? 2 24
? 1 24
? 3 24
? 13 24
? 8 24
? 5 24
? 6 24
? 5 29
! 29 5
? 9 31
? 14 36
? 13 36
? 15 36
? 25 36
? 20 36
? 22 36
? 23 36
? 24 36
! 36 24
? 9 31
? 8 31
? 10 31
? 20 31
? 15 31
? 17 31
? 18 31
? 19 31
? 18 34
! 28 18
? 14 36
? 13 36
? 3 3...

result:

ok ok (1000 test cases)

Test #15:

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

input:

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

output:

? 2 25
? 19 42
? 18 42
? 8 42
? 3 42
? 6 42
? 5 42
? 4 42
? 5 45
! 45 5
? 21 43
? 21 42
? 21 32
? 21 37
? 21 40
? 21 41
? 30 42
! 12 42
? 6 29
? 5 29
? 29 40
? 29 45
? 3 29
? 4 29
? 5 40
! 18 5
? 12 35
? 11 35
? 1 35
? 6 35
? 4 35
? 5 35
? 6 38
! 32 6
? 15 37
? 15 36
? 15 38
? 3 15
? 15 43
? 15 45
?...

result:

ok ok (1000 test cases)

Test #16:

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

input:

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

output:

? 10 33
? 9 33
? 11 33
? 22 33
? 16 33
? 13 33
? 12 33
? 11 35
! 31 11
? 15 38
? 14 38
? 3 38
? 9 38
? 6 38
? 5 38
? 4 38
? 1 4
! 29 4
? 7 30
? 6 30
? 8 30
? 7 39
! 39 7
? 13 36
? 13 35
? 13 37
? 2 13
? 7 13
? 4 13
? 5 13
? 6 13
? 6 15
! 11 6
? 19 42
? 19 41
? 19 43
? 8 19
? 2 19
? 19 45
? 19 46
? 1...

result:

ok ok (1000 test cases)

Test #17:

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

input:

1000
1000000000
499999999
499999999
499999998
250000000
375000000
437499999
406249999
390625000
398437499
394531250
396484375
397460938
397949218
397705079
397827149
397888184
397918701
397903442
397895814
397899628
397897722
397898676
397899153
397899391
397899510
397899570
397899599
397899585
3978...

output:

? 269946975 769946975
? 269946975 769946974
? 269946975 769946976
? 19946975 269946975
? 269946975 894946975
? 269946975 832446975
? 269946975 863696975
? 269946975 879321975
? 269946975 871509475
? 269946975 875415725
? 269946975 873462600
? 269946975 872486037
? 269946975 871997756
? 269946975 872...

result:

ok ok (1000 test cases)

Test #18:

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

input:

1000
1000000000
499999969
499999968
249999969
125000000
187499969
156249969
140624969
132812500
136718719
134765594
133789032
133300782
133544892
133422822
133361787
133331269
133316010
133308381
133304566
133302690
133303644
133304090
133303883
133303971
133303912
133303913
133303901
133303905
1333...

output:

? 269946975 769946975
? 269946975 769946974
? 269946975 519946975
? 269946975 394946975
? 269946975 457446975
? 269946975 426196975
? 269946975 410571975
? 269946975 402759475
? 269946975 406665725
? 269946975 404712600
? 269946975 403736038
? 269946975 403247757
? 269946975 403491898
? 269946975 40...

result:

ok ok (1000 test cases)

Test #19:

score: 0
Accepted
time: 58ms
memory: 3456kb

input:

1000
1000000000
65745759
65745758
250000000
125000001
62500001
34495759
46875001
39062501
35156251
33203126
33519197
33030916
32958985
32908846
32897949
32878329
32882690
32875060
32874515
32873152
32873562
32873085
32872913
32872966
32872907
32872883
32872892
32872885
32872881
32872881
32872880
657...

output:

? 269946975 769946975
? 269946975 769946974
? 269946975 519946975
? 269946975 644946975
? 269946975 707446975
? 269946975 738696975
? 269946975 723071975
? 269946975 730884475
? 269946975 734790725
? 269946975 736743850
? 269946975 737720413
? 269946975 737232132
? 269946975 736987991
? 269946975 73...

result:

ok ok (1000 test cases)

Test #20:

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

input:

1000
1000000000
229620672
229620673
229620671
250000000
125000072
167120672
135870672
120245672
117187572
116339422
115234447
115362860
114874579
114990306
114868235
114813544
114837717
114822458
114814829
114811014
114811637
114810684
114810537
114810446
114810417
114810387
114810387
114810372
1148...

output:

? 269946975 769946975
? 269946975 769946974
? 269946975 769946976
? 19946975 269946975
? 269946975 894946975
? 269946975 832446975
? 269946975 863696975
? 269946975 879321975
? 269946975 887134475
? 269946975 883228225
? 269946975 885181350
? 269946975 884204787
? 269946975 884693068
? 269946975 884...

result:

ok ok (1000 test cases)

Test #21:

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

input:

1000
1000000000
335547145
335547144
250000000
375000000
350590905
319340905
319922145
312109645
315434655
313481530
312504967
312016686
311865505
311894615
311833580
311834988
311819729
311825950
311822135
311820228
311819274
311819253
311819035
311819134
311819075
311819045
311819030
311819027
3118...

output:

? 269946975 769946975
? 269946975 769946974
? 269946975 519946975
? 269946975 644946975
? 269946975 707446975
? 269946975 738696975
? 269946975 754321975
? 269946975 746509475
? 269946975 742603225
? 269946975 744556350
? 269946975 745532913
? 269946975 746021194
? 269946975 746265335
? 269946975 74...

result:

ok ok (1000 test cases)

Test #22:

score: 0
Accepted
time: 67ms
memory: 3456kb

input:

1000
999999999
499999999
499999998
499999997
249999998
124999999
62499999
31250000
46875000
54687499
50781250
52734375
53710937
53222656
52978516
53100587
53161621
53131105
53146364
53153993
53157807
53155900
53154947
53155423
53155185
53155066
53155006
53154977
53154991
53154985
53154989
53154990
5...

output:

? 185786048 685786048
? 165463557 665463556
? 165463557 665463555
? 165463557 415463556
? 165463557 290463557
? 165463557 227963557
? 165463557 196713557
? 165463557 212338557
? 165463557 220151057
? 165463557 216244807
? 165463557 218197932
? 165463557 219174495
? 165463557 218686214
? 165463557 21...

result:

ok ok (1000 test cases)

Test #23:

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

input:

1000
999999999
499999956
499999955
249999956
124999957
62499957
31249957
15624957
7812457
3906207
1953125
2929645
2441364
2197266
2319337
2380372
2410847
2395588
2388002
2391774
2389910
2390821
2390344
2390106
2390030
2390090
2390105
2390092
2390097
2390093
2390091
2390092
1
1
999999999
499999947
49...

output:

? 185786048 685786048
? 185786047 685786048
? 685786048 935786047
? 685786048 810786048
? 685786048 748286048
? 685786048 717036048
? 685786048 701411048
? 685786048 693598548
? 685786048 689692298
? 685786048 687739173
? 685786048 688715736
? 685786048 688227455
? 685786048 687983314
? 685786048 68...

result:

ok ok (1000 test cases)

Test #24:

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

input:

1000
999999999
47026152
47026151
249999999
125000002
62500002
31250002
31401152
23588652
27343752
25390627
24414064
23925783
23681642
23559572
23527617
23529054
23513795
23519988
23516174
23514267
23513313
23513318
23513079
23513194
23513135
23513105
23513090
23513083
23513079
23513077
23513078
4702...

output:

? 185786048 685786048
? 185786047 685786048
? 685786048 935786047
? 60786048 685786048
? 123286048 685786048
? 154536048 685786048
? 170161048 685786048
? 162348548 685786048
? 158442298 685786048
? 160395423 685786048
? 161371986 685786048
? 161860267 685786048
? 162104408 685786048
? 162226478 685...

result:

ok ok (1000 test cases)

Test #25:

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

input:

1000
999999999
141412823
141412824
141412822
249999935
124999935
78912823
93749935
78124935
71100323
74218685
72265560
71288997
70800716
70856183
70734113
70739680
70709162
70718855
70711226
70707411
70707254
70706458
70706777
70706538
70706419
70706399
70706389
70706384
70706381
70706381
70706379
7...

output:

? 185786048 685786048
? 185786047 685786048
? 185786049 685786048
? 435786048 685786048
? 310786048 685786048
? 248286048 685786048
? 279536048 685786048
? 263911048 685786048
? 256098548 685786048
? 260004798 685786048
? 258051673 685786048
? 257075110 685786048
? 256586829 685786048
? 256342688 68...

result:

ok ok (1000 test cases)

Test #26:

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

input:

1000
999999999
249264884
249264883
143713034
124264884
81213034
93014884
77389884
73400534
73483634
71530509
72423971
71935690
71691549
71569479
71508444
71499992
71493185
71492363
71489370
71490456
71489502
71489025
71489131
71489012
71488966
71488982
71488967
71488959
71488963
71488961
71488960
1
...

output:

? 185786048 685786048
? 185786047 685786048
? 685786048 935786047
? 60786048 685786048
? 685786048 998286047
? 29536048 685786048
? 13911048 685786048
? 6098548 685786048
? 10004798 685786048
? 8051673 685786048
? 7075111 685786048
? 7563392 685786048
? 7807533 685786048
? 7929603 685786048
? 799063...

result:

ok ok (1000 test cases)

Test #27:

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

input:

1000
536870912
215898417
215898418
215898416
134217728
175464669
182343985
165566769
167076061
162881757
163469617
162421041
162357469
162158897
162226397
162160861
162128093
162142513
162134321
162130225
162128177
162127153
162127581
162127325
162127197
162127133
162127121
162127117
162127113
16212...

output:

? 29675615 298111071
? 29675615 298111070
? 29675615 298111072
? 29675615 432328799
? 29675615 365219935
? 29675615 331665503
? 29675615 348442719
? 29675615 356831327
? 29675615 352637023
? 29675615 350539871
? 29675615 351588447
? 29675615 352112735
? 29675615 351850591
? 29675615 351981663
? 2967...

result:

ok ok (1000 test cases)

Test #28:

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

input:

1000
536870911
244408485
244408486
244408484
110190757
50731732
76636326
59859110
51470502
47276198
48634580
47586004
47061716
47014054
46930644
46948518
46915750
46914260
46907558
46910164
46908116
46907092
46907046
46906836
46906918
46906854
46906822
46906820
46906814
46906816
46906814
46906813
93...

output:

? 250962295 519397751
? 250962294 519397751
? 250962296 519397751
? 385180023 519397751
? 452288886 519397751
? 418734454 519397751
? 435511670 519397751
? 443900278 519397751
? 448094582 519397751
? 450191734 519397751
? 449143158 519397751
? 448618870 519397751
? 448356726 519397751
? 448487798 51...

result:

ok ok (1000 test cases)

Extra Test:

score: 0
Extra Test Passed