QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#274187#7601. IQ TestGuanYunchangAC ✓1ms3628kbC++17901b2023-12-03 12:43:422023-12-03 12:43:42

詳細信息

Test #1:

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

input:

5

output:

2 1
2 0
3 4

result:

ok Successful, 3 queries

Test #2:

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

input:

7

output:

2 1
3 2

result:

ok Successful, 2 queries

Test #3:

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

input:

1

output:

1 0

result:

ok Successful, 1 queries

Test #4:

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

input:

29

output:

2 1
3 3
3 2
6 7

result:

ok Successful, 4 queries

Test #5:

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

input:

26

output:

2 1
2 0
3 3
4 6
6 10

result:

ok Successful, 5 queries

Test #6:

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

input:

2

output:

2 2

result:

ok Successful, 1 queries

Test #7:

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

input:

83

output:

2 1
2 0
3 4
3 3
3 1
4 6
5 8
10 17

result:

ok Successful, 8 queries

Test #8:

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

input:

13

output:

2 1
2 0
4 3

result:

ok Successful, 3 queries

Test #9:

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

input:

330

output:

2 1
2 0
3 4
3 3
5 6
6 5
19 31

result:

ok Successful, 7 queries

Test #10:

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

input:

123

output:

2 1
2 0
3 4
4 4
5 4
12 21

result:

ok Successful, 6 queries

Test #11:

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

input:

1000000000000000000

output:

2 1
2 0
3 4
3 3
3 2
3 1
4 5
4 2
5 7
6 4
8 3
11 2
14 18
119 32
178 61
31623 14129
1000000000 0

result:

ok Successful, 17 queries

Test #12:

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

input:

54

output:

2 1
2 0
3 3
3 1
4 6
8 10

result:

ok Successful, 6 queries

Test #13:

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

input:

887

output:

2 1
2 0
3 3
4 3
6 6
30 13

result:

ok Successful, 6 queries

Test #14:

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

input:

140

output:

2 0
4 4
12 4

result:

ok Successful, 3 queries

Test #15:

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

input:

365

output:

2 1
2 0
3 4
3 3
5 5
6 1
20 35

result:

ok Successful, 7 queries

Test #16:

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

input:

489

output:

2 1
2 0
3 4
3 2
3 0
5 2
7 9
23 40

result:

ok Successful, 8 queries

Test #17:

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

input:

7714

output:

2 1
2 0
3 3
4 6
4 4
6 6
10 12
88 30

result:

ok Successful, 8 queries

Test #18:

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

input:

9487

output:

2 1
2 0
3 4
3 3
4 6
4 5
10 2
11 4
98 117

result:

ok Successful, 9 queries

Test #19:

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

input:

9728

output:

2 1
2 0
3 3
3 1
3 0
4 6
9 8
10 1
99 73

result:

ok Successful, 9 queries

Test #20:

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

input:

33282

output:

2 1
2 0
3 4
3 2
4 3
4 2
4 1
5 7
14 13
15 18
183 207

result:

ok Successful, 11 queries

Test #21:

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

input:

56249

output:

2 1
2 0
3 4
3 2
4 0
5 7
5 5
16 18
20 5
238 395

result:

ok Successful, 10 queries

Test #22:

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

input:

802440

output:

2 1
2 0
3 4
3 3
5 5
5 1
6 6
20 24
30 4
896 376

result:

ok Successful, 10 queries

Test #23:

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

input:

977374

output:

2 1
2 0
3 3
3 2
3 1
4 4
6 8
6 4
6 1
7 12
28 37
32 35
989 747

result:

ok Successful, 13 queries

Test #24:

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

input:

871401

output:

2 1
2 0
3 4
3 3
3 0
6 9
6 5
31 27
31 6
934 955

result:

ok Successful, 10 queries

Test #25:

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

input:

7795432

output:

2 1
2 0
3 4
3 2
3 1
3 0
4 5
4 0
8 11
8 5
9 7
53 16
74 59
2793 5417

result:

ok Successful, 14 queries

Test #26:

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

input:

363887

output:

2 1
2 0
3 4
3 3
5 4
5 0
6 5
6 4
25 21
31 32
604 929

result:

ok Successful, 11 queries

Test #27:

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

input:

3117943

output:

2 1
2 0
3 4
3 3
3 2
3 1
4 6
5 8
6 8
6 7
7 6
10 17
29 28
43 83
1766 813

result:

ok Successful, 15 queries

Test #28:

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

input:

27832185

output:

2 1
2 0
3 4
3 1
3 0
4 5
4 0
8 11
8 0
9 8
11 16
64 105
73 53
5276 3991

result:

ok Successful, 14 queries

Test #29:

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

input:

92676068

output:

2 1
2 0
3 4
3 3
3 1
3 0
4 6
4 2
5 3
8 8
9 6
10 1
14 22
56 75
99 174
9627 3061

result:

ok Successful, 16 queries

Test #30:

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

input:

31987960

output:

2 1
2 0
3 4
3 2
3 0
4 5
5 0
7 0
9 5
11 1
49 25
76 120
5656 2376

result:

ok Successful, 13 queries

Test #31:

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

input:

547044556

output:

2 1
2 0
3 4
3 3
3 1
4 3
4 0
5 6
5 5
6 8
13 16
28 19
153 20
23389 765

result:

ok Successful, 14 queries

Test #32:

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

input:

464667912

output:

2 1
2 0
3 4
3 1
4 4
4 3
4 2
5 3
8 12
12 0
13 22
14 5
147 52
191 144
21557 36337

result:

ok Successful, 15 queries

Test #33:

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

input:

251796962

output:

2 1
2 0
3 4
3 2
4 4
4 3
5 7
5 0
12 18
13 1
126 7
168 25
15869 28199

result:

ok Successful, 13 queries

Test #34:

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

input:

8591505981

output:

2 1
2 0
3 4
3 3
3 2
3 0
4 6
5 7
5 6
5 4
6 9
10 0
18 19
19 27
19 21
305 334
340 100
92691 115500

result:

ok Successful, 18 queries

Test #35:

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

input:

9667620655

output:

2 1
2 0
3 4
3 3
3 2
3 1
4 6
4 2
5 8
5 7
5 4
6 7
8 14
17 18
18 10
21 10
29 50
314 271
431 791
98325 184970

result:

ok Successful, 20 queries

Test #36:

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

input:

8111389445

output:

2 1
2 0
3 4
3 3
3 2
4 6
4 5
5 7
5 5
5 2
5 1
6 3
7 11
7 10
18 23
20 33
24 39
301 537
367 38
90064 134651

result:

ok Successful, 20 queries

Test #37:

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

input:

4460310861

output:

2 1
2 0
3 4
3 3
3 2
3 1
4 5
4 3
4 0
5 8
5 7
6 7
6 6
11 7
16 13
17 30
18 29
243 114
259 295
66786 58935

result:

ok Successful, 20 queries

Test #38:

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

input:

4881918313

output:

2 1
2 0
3 4
3 3
3 2
3 1
4 6
4 4
4 2
5 8
5 6
5 1
10 12
14 0
17 24
19 7
196 88
265 354
69871 38328

result:

ok Successful, 19 queries

Test #39:

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

input:

8402554759

output:

2 1
2 0
3 4
3 3
3 2
4 4
5 7
5 6
5 4
6 2
12 1
18 21
18 6
19 34
303 143
318 327
91666 100797

result:

ok Successful, 17 queries

Test #40:

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

input:

43426796707

output:

2 1
2 0
3 4
3 3
3 0
4 6
4 5
4 3
5 3
6 10
6 9
11 10
13 22
22 27
22 26
111 147
457 458
208391 12174

result:

ok Successful, 18 queries

Test #41:

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

input:

621505521

output:

2 1
2 0
3 4
3 3
3 2
4 5
4 3
4 1
6 3
7 5
13 11
15 3
158 33
222 44
24931 49240

result:

ok Successful, 15 queries

Test #42:

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

input:

45649415234

output:

2 1
2 0
3 4
3 3
3 2
3 0
4 3
5 7
5 4
5 3
5 1
6 9
18 13
22 21
24 5
27 18
463 711
571 311
213658 325730

result:

ok Successful, 19 queries

Test #43:

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

input:

50465662409

output:

2 1
2 0
3 4
3 3
3 2
4 6
4 4
4 1
5 7
5 4
5 3
6 6
7 12
18 15
21 37
22 10
404 309
474 30
224646 162907

result:

ok Successful, 19 queries

Test #44:

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

input:

352124221091

output:

2 1
2 0
3 3
3 2
3 1
3 0
4 4
4 3
6 9
6 8
6 3
7 12
7 0
27 3
28 13
33 49
37 3
726 1366
771 1040
593401 525710

result:

ok Successful, 20 queries

Test #45:

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

input:

375103361

output:

2 1
2 0
3 4
3 1
3 0
4 4
4 1
4 0
5 8
5 1
9 15
12 17
12 4
16 24
127 66
140 232
19368 16063

result:

ok Successful, 17 queries

Test #46:

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

input:

5791644583396

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
7 11
7 9
7 8
7 2
7 1
8 11
8 4
10 11
38 41
40 48
47 89
53 60
1403 2749
1552 2120
2406584 1965660

result:

ok Successful, 24 queries

Test #47:

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

input:

3715757926887

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
5 6
7 11
7 7
7 6
8 9
8 3
9 7
10 5
38 55
42 74
43 19
61 95
1389 1690
1830 3626
1927631 3345274

result:

ok Successful, 24 queries

Test #48:

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

input:

3837823593081

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 5
5 5
6 4
7 11
7 9
7 5
8 5
8 3
20 7
32 61
38 44
40 59
1400 963
1541 393
1959037 2374288

result:

ok Successful, 22 queries

Test #49:

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

input:

35247323272516

output:

2 1
2 0
3 2
3 1
3 0
4 2
7 4
7 2
8 14
8 1
9 2
45 2
47 79
50 63
50 0
2130 2500
2437 2023
5936946 4534400

result:

ok Successful, 18 queries

Test #50:

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

input:

96928659462319

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
7 8
7 6
7 1
8 7
8 4
9 8
9 1
11 10
43 41
57 111
60 73
80 48
3138 1808
3527 6352
9845236 12433377

result:

ok Successful, 24 queries

Test #51:

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

input:

39467021228272

output:

2 1
2 0
3 4
3 3
3 2
3 1
4 6
4 5
4 4
4 3
7 10
7 1
8 13
8 12
8 11
8 10
10 6
51 94
52 48
53 39
54 51
2507 2770
2865 2656
6282279 8205569

result:

ok Successful, 24 queries

Test #52:

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

input:

431710297215866

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 3
4 0
5 8
7 3
7 1
9 16
9 13
9 9
9 2
10 17
68 65
72 11
79 46
83 48
4559 6841
5173 6195
20777640 26753734

result:

ok Successful, 26 queries

Test #53:

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

input:

845780644223893

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 4
4 3
4 2
5 8
5 4
5 3
6 8
7 2
9 12
9 7
10 17
10 14
13 22
21 28
47 69
74 83
86 147
5393 2140
7249 413
29082309 52547588

result:

ok Successful, 28 queries

Test #54:

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

input:

969864535730487

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 4
4 1
5 8
7 10
7 5
9 10
9 6
10 17
10 15
12 15
39 71
71 129
75 44
85 83
5581 4912
7142 1450
31142649 51006714

result:

ok Successful, 25 queries

Test #55:

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

input:

9831191244739289

output:

2 1
2 0
3 4
3 3
3 2
3 0
4 6
4 1
7 7
9 15
9 5
9 3
9 0
10 3
10 0
78 66
81 76
97 9
100 42
6485 6018
9958 9400
99152364 42049207

result:

ok Successful, 22 queries

Test #56:

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

input:

1563993859346400

output:

2 1
2 0
3 4
3 3
3 1
3 0
4 6
4 5
4 3
4 2
4 0
5 8
9 16
9 14
9 1
10 11
11 17
11 10
11 5
13 9
65 67
80 111
89 116
104 160
6289 4158
7805 10656
39547363 60907369

result:

ok Successful, 27 queries

Test #57:

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

input:

271325653821422

output:

2 1
2 0
3 3
3 2
3 1
3 0
4 6
4 4
4 1
7 12
8 7
8 4
8 0
9 8
10 15
57 73
57 7
60 85
64 37
3176 3242
4059 3515
16471966 10083734

result:

ok Successful, 22 queries

Test #58:

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

input:

58362005363894069

output:

2 1
2 0
3 4
3 3
3 2
3 1
4 6
4 5
4 4
4 3
4 2
5 7
5 6
7 1
8 13
8 8
10 18
11 18
12 19
12 4
14 6
51 48
103 56
125 82
140 190
15543 2553
19410 10553
241582296 376737547

result:

ok Successful, 28 queries

Test #59:

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

input:

77171354627586464

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 5
4 4
4 3
4 2
4 0
5 8
5 7
5 6
5 4
5 1
9 14
12 16
12 14
13 11
14 17
16 24
16 21
18 19
128 235
130 232
158 67
179 305
16149 31736
16668 24897
277797327 260758465

result:

ok Successful, 32 queries

Test #60:

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

input:

62175327532685508

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 2
4 1
5 7
5 4
8 6
9 4
10 15
10 8
11 0
12 18
14 21
77 58
92 175
121 0
126 85
14641 8289
15791 5871
249349810 214350592

result:

ok Successful, 28 queries

Test #61:

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

input:

980275395398576837

output:

2 1
2 0
3 4
3 2
3 1
3 0
4 4
4 3
4 2
4 1
5 7
5 4
5 0
12 21
12 9
12 8
12 0
13 9
14 25
14 18
15 7
136 135
144 160
171 123
178 218
29118 18361
31466 20576
990088580 847839563

result:

ok Successful, 28 queries

Test #62:

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

input:

173956747739208560

output:

2 1
2 0
3 4
3 3
3 2
4 6
4 4
4 3
4 2
4 1
4 0
5 7
5 3
6 10
12 10
12 1
13 18
14 22
15 0
16 4
16 1
134 252
143 26
151 255
174 225
20423 17704
22546 30051
417081225 508292065

result:

ok Successful, 28 queries

Test #63:

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

input:

7584519199318112

output:

2 1
2 0
3 4
3 3
3 2
3 0
4 6
4 5
4 4
5 7
9 5
10 3
11 10
12 18
12 12
12 11
12 5
97 76
111 4
126 133
132 139
9333 15743
12317 17285
87089146 151691204

result:

ok Successful, 24 queries

Test #64:

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

input:

29370112688089647

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 5
4 4
4 3
4 0
5 8
8 12
8 0
9 7
9 5
11 17
11 6
12 11
13 16
76 74
104 64
115 133
153 52
10752 5702
13092 23357
171377107 115599802

result:

ok Successful, 27 queries

Test #65:

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

input:

529004078984639727

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 0
5 7
6 7
7 12
9 8
10 2
11 6
13 4
16 0
18 29
73 37
98 115
165 256
9489 5292
26969 295
727326666 90035829

result:

ok Successful, 27 queries

Test #66:

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

input:

34254813233391984

output:

2 1
2 0
3 4
3 3
3 1
4 6
4 5
4 4
4 3
4 0
5 8
5 6
10 16
10 3
11 6
11 4
12 19
12 10
13 10
97 115
117 84
125 159
134 17
9294 17939
13605 15466
185080559 86360497

result:

ok Successful, 26 queries

Test #67:

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

input:

835703429708874678

output:

2 1
2 0
3 4
3 3
3 2
3 0
4 5
4 4
4 3
4 2
4 1
4 0
5 7
5 4
5 3
7 9
11 4
12 13
13 16
14 22
15 6
18 22
21 13
117 131
153 302
174 40
219 428
23107 13558
30236 47533
914168163 533919891

result:

ok Successful, 30 queries

Test #68:

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

input:

323746841809640240

output:

2 1
2 0
3 4
3 3
3 1
3 0
4 6
4 4
4 3
4 2
4 1
5 5
5 0
6 10
12 15
13 20
13 14
13 8
13 5
14 25
14 9
149 129
155 171
161 164
187 26
22072 34943
23854 25757
568987559 487138241

result:

ok Successful, 28 queries

Test #69:

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

input:

66045110086331608

output:

2 1
2 0
3 4
3 3
3 1
3 0
4 6
4 4
4 1
5 8
5 2
6 4
9 15
9 6
10 2
12 17
23 0
66 3
75 32
127 98
4353 5593
16031 529
256992432 18943016

result:

ok Successful, 23 queries

Test #70:

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

input:

128883537944785874

output:

2 1
2 0
3 4
3 3
3 2
3 0
4 6
4 5
4 4
4 3
4 0
7 11
9 7
10 4
10 0
11 2
12 6
13 16
16 16
38 74
119 100
138 96
153 240
14061 1370
18948 23169
359003535 197710351

result:

ok Successful, 26 queries

Test #71:

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

input:

717883698281133271

output:

2 1
2 0
3 4
3 3
3 1
4 6
4 5
4 4
4 3
4 2
4 1
4 0
5 1
5 0
8 6
10 16
10 15
10 13
11 1
12 12
14 25
16 24
85 58
87 84
171 132
232 120
7485 7167
29109 53704
847280177 56018058

result:

ok Successful, 29 queries

Test #72:

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

input:

426748585181595363

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 0
5 8
5 6
7 8
8 13
10 12
13 11
13 9
13 1
16 7
17 19
51 88
158 270
160 41
168 249
24694 27975
25559 2513
653259968 609765661

result:

ok Successful, 29 queries

Test #73:

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

input:

267213626125521092

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 3
4 2
4 1
5 7
5 2
6 5
8 0
9 13
13 18
13 13
14 23
15 15
15 8
151 64
156 68
210 31
217 173
22737 44069
24268 46916
516927100 588888908

result:

ok Successful, 27 queries

Test #74:

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

input:

647481992972803820

output:

2 1
2 0
3 4
3 3
3 2
4 5
4 3
4 2
4 0
5 7
5 6
5 1
11 1
13 24
13 13
13 0
14 2
16 11
18 19
120 18
145 245
156 305
169 194
14382 20780
28367 24031
804662658 206821144

result:

ok Successful, 26 queries

Test #75:

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

input:

70916588392222895

output:

2 1
2 0
3 4
3 3
3 2
3 0
4 6
4 5
4 4
4 3
4 2
4 0
5 7
5 6
6 10
9 16
9 13
10 10
10 0
11 19
12 16
14 18
90 26
100 178
102 68
128 65
10336 9822
16319 8074
266301687 106823074

result:

ok Successful, 29 queries

Test #76:

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

input:

966823993550317745

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 4
5 2
6 10
6 9
6 4
6 1
7 12
7 11
13 21
14 18
15 26
16 27
17 32
19 35
20 37
23 38
178 326
199 148
229 363
257 491
31358 52078
39453 65558
983272086 1556473651

result:

ok Successful, 41 queries

Test #77:

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

input:

966946589912055443

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 3
5 2
5 1
6 10
6 8
6 0
7 12
7 11
7 9
14 18
15 28
16 26
17 24
19 36
20 37
22 40
23 38
178 325
197 363
230 444
265 491
31359 52456
38446 69734
983334425 1478025182

result:

ok Successful, 41 queries

Test #78:

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

input:

966946589912057042

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 4
5 3
5 2
6 10
6 8
6 0
7 12
7 11
7 9
14 18
15 28
16 26
17 21
19 36
20 37
22 40
23 38
178 325
197 363
230 444
268 491
31359 52456
38446 71333
983334425 1478023583

result:

ok Successful, 41 queries

Test #79:

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

input:

988710669858287857

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 4
5 3
5 2
6 10
6 9
6 5
7 12
7 11
13 19
14 18
15 27
16 23
17 31
20 26
21 38
22 37
178 150
198 374
233 447
258 403
31534 53842
38830 66161
994339314 1507702739

result:

ok Successful, 41 queries

Test #80:

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

input:

988710669858288374

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 4
5 3
5 2
6 10
6 9
6 6
7 12
7 11
13 19
14 18
15 27
16 23
17 30
20 26
21 38
22 37
178 150
198 374
233 447
259 403
31534 53842
38830 66678
994339314 1507702222

result:

ok Successful, 41 queries

Test #81:

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

input:

988710669858289414

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 4
5 3
5 2
6 10
6 9
6 8
7 12
7 11
13 19
14 18
15 27
16 23
17 28
20 26
21 38
22 37
178 150
198 374
233 447
261 403
31534 53842
38830 67718
994339314 1507701182

result:

ok Successful, 41 queries

Test #82:

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

input:

988964133182085305

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 4
5 2
5 0
6 10
6 9
6 2
7 12
7 11
13 21
14 18
15 25
16 26
17 27
19 34
20 37
23 38
178 148
200 327
230 363
262 491
31536 52537
39673 68153
994466759 1573878776

result:

ok Successful, 41 queries

Test #83:

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

input:

988964133182085350

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 4
5 3
5 0
6 10
6 9
6 2
7 12
7 11
13 21
14 18
15 25
16 26
17 27
19 34
20 37
22 38
178 148
200 327
230 363
262 446
31536 52537
39673 68198
994466759 1573878731

result:

ok Successful, 41 queries

Test #84:

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

input:

988964133182482010

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 4
5 2
5 0
6 10
6 9
6 7
7 12
7 11
13 21
14 18
15 25
16 26
17 27
19 29
20 37
23 38
178 148
200 332
230 363
262 491
31536 52537
39668 68153
994466759 1573482071

result:

ok Successful, 41 queries

Test #85:

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

input:

988965044081788141

output:

2 1
2 0
3 4
3 3
3 2
3 1
3 0
4 6
4 5
4 4
4 3
4 2
4 1
4 0
5 8
5 7
5 6
5 5
5 4
5 2
5 1
6 10
6 9
6 1
7 12
7 11
13 21
14 18
15 24
16 27
17 26
19 35
20 38
23 37
178 148
201 326
229 362
263 492
31536 52079
40075 68677
994467217 1605936948

result:

ok Successful, 41 queries