QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#83158#2363. Dragon Ballsxiaowuc1AC ✓11ms3524kbC++172.2kb2023-03-01 06:10:052023-03-01 06:10:08

詳細信息

Test #1:

score: 100
Accepted
time: 5ms
memory: 3332kb

input:

2
127652812825
69254423810
409973934770
67984796180
408489001040
10212225026
301080240050
9697586708
299247928400
1566005456
257166881300
1366912898
255305625650
0
320019259513
640038519026
625058169856
499542258752
484965772002
359572201700
346183551250
175334450
240124070306
0

output:

17490 426484
47055 70424
47055 782544
49650 70649
49650 782319
205263 122520
205263 730448
207474 123897
207474 729071
254778 159375
254778 693593
256719 161112
256719 691856
282862 187255
891574 266471
652546 779194
640611 773459
545827 714219
535442 706004
452041 622603
443826 612218
384586 15508
...

result:

ok Queries used 24

Test #2:

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

input:

7
159385844441
41328131364
290871444488
0
17219969721
16555697892
20157572772
48722306112
52324180992
5960354562
34439939442
34439939442
62919524322
0
118308809593
56713404980
51262041872
111949479666
86226503554
236617619186
38596977122
68122882260
0
923130632
2964195328
2790311184
902211344
728327...

output:

17490 426484
49090 28505
49090 824463
240970 95663
891574 266471
883810 135476
899338 135476
883810 397466
899338 397466
830185 150491
952963 150491
830185 382451
952963 382451
775594 205082
284861 693777
250184 351569
319538 351569
121233 391230
448489 391230
121233 996324
448489 996324
587408 5301...

result:

ok Queries used 69

Test #3:

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

input:

7
10115316029
16032016
0
3891913714
2210218400
598755956
14968898900
13357436456
4728762756
0
23091324820
32811086194
34047796010
7568693064
5207922280
32707645778
34343927810
7988350208
4864831040
33821756050
40575846602
14332546440
1439578792
35511336010
44215635194
17252747280
637002064
363772993...

output:

17490 426484
15488 325929
19492 325929
891574 266471
879857 205196
903291 205196
879857 327746
903291 327746
857191 214416
925957 214416
284861 693777
277179 542013
292543 542013
277179 845541
292543 845541
274697 542159
295025 542159
274697 845395
295025 845395
242907 547725
326815 547725
242907 83...

result:

ok Queries used 104

Test #4:

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

input:

1
68493187177
215071950754
157717458
209582671204
0

output:

17490 426484
133239 191760
133239 661208
144366 197583
144366 655385

result:

ok Queries used 5

Test #5:

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

input:

7
74225153554
102471500050
92449002722
128618515908
118971652168
103532330882
91424278802
129628368116
117974114216
107297412170
87840794042
133195909268
114468506528
73153804930
99799035848
21423072490
41908806900
16016939210
34674524288
14398696322
32401180616
13956266290
31768757928
8539990810
23...

output:

17490 426484
8513 154189
26467 154189
8513 698779
26467 698779
6645 154257
28335 154257
6645 698711
28335 698711
63 154599
34917 154599
63 698369
34917 698369
62763 157829
62763 695139
178775 206911
178775 646057
194313 219219
194313 633749
199275 223557
199275 629411
200663 224809
200663 628159
219...

result:

ok Queries used 105

Test #6:

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

input:

5
2441278850
1953023080
1517630420
8247484980
7812092320
2950083220
782174880
8982940520
6815032180
3192673700
646268032
9118847368
6572441700
195302308
5451768200
135992900
5222224384
67884552
4882557700
0
40113323930
138691457000
139390502116
21062793604
21761838720
130407425000
146405914276
14047...

output:

17490 426484
14605 377159
20375 377159
14605 475809
20375 475809
3125 379209
31855 379209
3125 473759
31855 473759
617 380045
34363 380045
617 472923
34363 472923
44777 385293
44777 467675
46691 386627
46691 466341
49393 388755
49393 464213
55219 394581
891574 266471
890291 66192
892857 66192
890291...

result:

ok Queries used 90

Test #7:

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

input:

7
50507708589
37577963106
113618414376
29886218100
99903266289
12222486900
64809723249
10768368258
61837022385
7770416706
55629511065
6607919988
53184289329
527461506
39365223705
255584628
38550542769
0
182016153125
64152090250
72806461250
44854560000
96337610500
37970431250
106637736250
18361800000...

output:

17490 426484
45855 203542
45855 649426
68460 207601
68460 645367
129420 231601
129420 621367
135423 235174
135423 617794
148725 244042
148725 608926
154332 248209
154332 604759
195765 289642
195765 563326
199932 295249
199932 557719
208800 308551
891574 266471
882884 693016
900264 693016
839879 6899...

result:

ok Queries used 62

Test #8:

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

input:

7
134377539481
151275743890
133695110610
561216100
0
66758655665
70685635410
78685637266
88241971232
97911476000
67365794548
82164499280
84229616650
102116630746
53406924532
97949606480
67361106970
121199303914
30207536500
129726112464
39336287978
159623178170
27847528002
36486444020
24471811780
324...

output:

17490 426484
5645 60100
29335 60100
5645 792868
29335 792868
891574 266471
882950 8238
900198 8238
882950 524704
900198 524704
875621 8587
907527 8587
875621 524355
907527 524355
843557 12595
939591 12595
843557 520347
939591 520347
784293 31419
998855 31419
784293 501523
998855 501523
777662 34560
...

result:

ok Queries used 95

Test #9:

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

input:

4
1844175609
3380241978
2472977178
4903725258
3996460458
3688351218
2186323938
5190378498
3688351218
0
11551339537
2717962244
854075648
45351282500
43487395904
2736512848
843505524
45361852624
43468845300
6373152848
33524
46205324624
39832205300
6400320004
0
459780921988
738954152
33571832589
0
1293...

output:

17490 426484
12090 383881
22890 383881
12090 469087
22890 469087
8550 384481
26430 384481
8550 468487
26430 468487
59493 417544
891574 266471
879925 159627
903223 159627
879925 373315
903223 373315
879743 159647
903405 159647
879743 373295
903405 373295
851743 166647
931405 166647
851743 366295
9314...

result:

ok Queries used 33

Test #10:

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

input:

1
153725490113
578731256896
574201497152
40700463300
36170703556
558468052506
23650075402
537077509696
12221871300
502216307066
2422284202
481517587252
263478096
470878674436
0

output:

17490 426484
11522 34451
23458 34451
11522 818517
23458 818517
60683 36792
60683 816176
103922 44051
103922 808917
162763 62312
162763 790656
192878 75821
192878 777147
207242 83381
207242 769587

result:

ok Queries used 15

Test #11:

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

input:

4
182194502356
0
82762991317
239032149218
208204035194
47024789904
0
174918315050
579393784360
629705934180
536318616708
658516009600
498002732260
676616276480
447790886528
691874604100
445982110600
690256955092
375090102916
560229260200
0
1286722269097
0

output:

17490 426484
0 0
891574 266471
820493 545237
962655 545237
783148 0
1000000 0
284861 693777
240706 277882
329016 277882
177618 289528
392104 289528
128106 306032
441616 306032
70648 334568
499074 334568
68718 335726
501004 335726
0 387554
569722 387554
0 1000000
298976 108211
1000000 1000000

result:

ok Queries used 23

Test #12:

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

input:

2
182184092009
0
865892647089
477733874256
0

output:

17490 426484
5 12
891574 266471
62191 688391
7 11

result:

ok Queries used 5

Test #13:

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

input:

7
182194502356
0
82762458376
47024356202
0
174917702605
590041331170
549895131216
574214471170
517182305616
559736648336
490591163954
531478602410
446475823172
503134065920
411029750906
454300993060
367225300242
433910737060
354647051442
375087653136
335337174754
0
503142867050
72782570452
202192105...

output:

17490 426484
0 0
891574 266471
783148 1
1000000 1
284861 693777
257827 276420
311895 276420
232627 278820
337095 278820
210800 282155
358922 282155
171059 291326
398663 291326
134432 303535
435290 303535
77674 330471
492048 330471
56074 343671
513648 343671
0 387555
569722 387555
0 999999
298976 108...

result:

ok Queries used 61

Test #14:

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

input:

3
182189139773
0
865897976389
988004841044
832487688754
554400534544
503579145024
0
562461710890
0

output:

17490 426484
7 6
891574 266471
268016 957176
200869 890029
90016 739126
71404 706038
7 1
284861 693777
4 6

result:

ok Queries used 10

Test #15:

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

input:

2
182187643697
0
865897627780
346359051112
0

output:

17490 426484
1 8
891574 266471
18440 588239
6 5

result:

ok Queries used 5

Test #16:

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

input:

1
182185972776
0

output:

17490 426484
0 10

result:

ok Queries used 2

Test #17:

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

input:

2
182190880656
0
865900292465
1065723436880
760897463066
346360116986
0

output:

17490 426484
6 4
891574 266471
302690 986968
171077 855355
18437 588235
6 0

result:

ok Queries used 7

Test #18:

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

input:

3
182187363937
0
865892626996
0
562463098433
0

output:

17490 426484
9 8
891574 266471
10 1
284861 693777
4 5

result:

ok Queries used 6

Test #19:

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

input:

4
182189034884
0
865894594445
1016064818002
921891854500
896514719338
806189865280
689857775780
346356956305
285982475129
0
562465377305
0
101093279362
226936973984
311604365300
202186558724
331594362248
0

output:

17490 426484
10 6
891574 266471
280457 968205
239088 929914
228131 918957
189840 877588
142320 818298
18441 588237
560 534778
8 4
284861 693777
0 5
298976 108211
228177 418180
369775 418180
190765 407182
407187 407182
5 0

result:

ok Queries used 19

Test #20:

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

input:

7
147946847905
391521169064
361700345000
46584223370
34153964426
354663525130
31486284724
349571766330
29619182772
339201380250
25980909876
335032789768
24580772410
312658597418
17681924660
276484946580
8779100922
271553370100
7788134506
215483742356
587581250
195300426906
0
1810622536
3519258400
12...

output:

17490 426484
1426 42181
33554 42181
1426 810787
33554 810787
41121 42572
41121 810396
46593 42948
46593 810020
57729 43956
57729 809012
62202 44453
62202 808515
86177 48028
86177 804940
124818 57123
124818 795845
130074 58691
130074 794277
189614 82507
189614 770461
210939 94032
210939 758936
891574...

result:

ok Queries used 146

Test #21:

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

input:

7
5166927793
5213115472
4562565876
16105145296
15454595700
5470864722
4320737986
16346973186
15196846450
1207614800
10628207696
1073234450
10333855586
0
342759835336
682878939634
718200916506
579474296234
821266140112
485979396890
357393718532
78896591684
27971683472
30947782100
7574555600
109524859...

output:

17490 426484
14827 354652
20153 354652
14827 498316
20153 498316
12782 354757
22198 354757
12782 498211
22198 498211
53643 364356
53643 488612
55398 365411
55398 487557
78563 388576
891574 266471
876780 851741
906368 851741
790180 843081
992968 843081
711904 823677
605124 777065
380980 552921
334368...

result:

ok Queries used 105

Test #22:

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

input:

7
115859984945
46383859280
59335612298
9522
31466489636
0
3797918050
8622078800
10725170660
569321428
1567914088
5913773200
12972566356
310112100
3777382440
3898771204
14291938280
32768
6127955252
3879219460
14302959592
0
21623797385
86495189540
85933404736
561784804
0
141432019456
281003111424
2318...

output:

17490 426484
65579 89516
65579 763452
258142 185763
258142 667205
258211 185832
891574 266471
882769 205476
900379 205476
882769 327466
900379 327466
862021 212392
921127 212392
862021 320550
921127 320550
848061 222830
935087 222830
848061 310112
935087 310112
847933 222958
935215 222958
847933 309...

result:

ok Queries used 75

Test #23:

score: 0
Accepted
time: 6ms
memory: 3372kb

input:

5
28420769250
81974916000
76849760052
36833316948
31708161000
82187273700
76627751040
37055325960
31495803300
66927650184
22926514500
66694320180
22736615400
56841538500
15370655112
46591425000
9040582836
40925907720
6144992100
40698522900
6038248680
31346710740
2340496800
31135105800
2273661540
260...

output:

17490 426484
9207 258103
25773 258103
9207 594865
25773 594865
8505 258139
26475 258139
8505 594829
26475 594829
56001 262357
56001 590611
56685 262519
56685 590449
84513 271795
84513 581173
111309 286417
111309 566551
125145 296749
125145 556219
125685 297199
125685 555769
146775 318289
146775 5346...

result:

ok Queries used 91

Test #24:

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

input:

7
82328445621
38291211257
32734434545
365650884
0
28074041234
26254716266
2096087522
0
8938398600
35038522512
30228487200
4314837601
715071888
35512220880
28602875520
4883801689
241373520
35753594400
26115852816
6350441113
0
26312481985
79528052714
82858121690
78090003920
84199942352
75685341440
863...

output:

17490 426484
7929 139714
27051 139714
7929 713254
27051 713254
891574 266471
820571 114706
962577 114706
820571 418236
284861 693777
260363 602463
309359 602463
260363 785091
309359 785091
249671 606027
320051 606027
249671 781527
320051 781527
235775 612975
333947 612975
235775 774579
333947 774579...

result:

ok Queries used 165

Test #25:

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

input:

7
228769413986
17079456424
85939562501
0
66429320425
51477450829
67742269261
17153678890
26571728170
46797601285
73388593057
14556311380
29953671760
39304673065
83651230217
10539896330
36218514410
38690495993
84571616953
10219895450
36787093850
29272236869
100707350581
5548045490
46912135970
2469748...

output:

17490 426484
231935 854015
445021 212039
445021 640929
891574 266471
874870 9274
908278 9274
874870 523668
908278 523668
864265 10183
918883 10183
864265 522759
918883 522759
846030 12788
937118 12788
846030 520154
937118 520154
844454 13076
938694 13076
844454 519866
938694 519866
818210 19394
9649...

result:

ok Queries used 92

Test #26:

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

input:

3
182108198740
727639760960
728388337664
0
865681533301
302913713402
0
562337088149
0

output:

17490 426484
6742 853090
28238 853090
78 98
891574 266471
5549 550445
100 96
284861 693777
6 95

result:

ok Queries used 9

Test #27:

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

input:

1
182194502356
0

output:

17490 426484
0 0

result:

ok Queries used 2

Test #28:

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

input:

4
182193614410
0
865909208170
716632381882
636690641218
409189424002
346362543658
0
562470927497
0
101096269097
229899338050
309093296834
202192538194
331602505938
0

output:

17490 426484
1 1
891574 266471
153051 832592
121353 788648
38641 638512
18433 588238
1 0
284861 693777
0 1
298976 108211
232755 419195
365197 419195
190765 407187
407187 407187
0 0

result:

ok Queries used 16

Test #29:

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

input:

7
182192726468
0
865906892084
0
562468970225
0
101095073197
202190095081
331599248450
187542248581
342513747200
56621362745
403849011538
0
1555326056786
0
262357600861
0
977710580145
0

output:

17490 426484
2 2
891574 266471
2 1
284861 693777
1 2
298976 108211
190765 407185
407187 407185
169390 398560
428562 398560
8627 237797
589325 237797
2 0
792035 963332
0 1
324470 396330
1 0
864711 479568
0 0

result:

ok Queries used 20

Test #30:

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

input:

7
182185832872
0
865890495252
527926723417
0
562461710890
0
101090073256
202178466493
331583775613
0
1555307604313
0
262352844937
922823758548
938360632144
0
977703662473
0

output:

17490 426484
4 10
891574 266471
80248 722147
10 5
284861 693777
4 6
298976 108211
190766 407177
407186 407177
10 1
792035 963332
8 4
324470 396330
312499 908394
336441 908394
1 6
864711 479568
4 0

result:

ok Queries used 19

Test #31:

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

input:

2
182191768586
0
865902259924
1065725858368
760888567400
404509084928
0

output:

17490 426484
5 3
891574 266471
302692 986971
171074 855353
37092 634931
4 3

result:

ok Queries used 7

Test #32:

score: 0
Accepted
time: 6ms
memory: 3336kb

input:

4
182190132610
0
865901009722
0
562467582676
0
101096052676
241160347152
299233445392
236458440000
303400362304
204342600704
329941222400
202192105352
331600877192
190874075600
340094193104
138654248912
373864647632
136616287400
374991048104
126012860672
380596904192
107042879304
389484310600
972055...

output:

17490 426484
3 5
891574 266471
5 2
284861 693777
1 3
298976 108211
250416 422437
347536 422437
243000 421201
354952 421201
193952 408321
404000 408321
190766 407187
407186 407187
174200 400661
423752 400661
102296 358037
495656 358037
99650 355931
498302 355931
86096 344385
511856 344385
62802 32109...

result:

ok Queries used 32

Test #33:

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

input:

7
182116779869
0
865703029369
0
562333504804
0
101028933172
234339365384
304892726888
202057866344
331359866888
0
1555081730977
0
262281706900
839295355066
998094904066
836178448426
999753533426
771409878994
1027041206594
767974877570
1028142964370
631936722122
1049112438800
0
977576172637
983306412...

output:

17490 426484
52 89
891574 266471
99 59
284861 693777
61 75
298976 108211
239962 420535
357990 420535
190822 407095
407130 407095
92 57
792035 963332
91 53
324470 396330
202100 893630
446840 893630
198420 892710
450520 892710
127482 869064
521458 869064
123986 867592
524954 867592
2996 794998
645944 ...

result:

ok Queries used 29

Test #34:

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

input:

7
181416308948
0
864225966932
332536645184
0
561101827346
0
100781226949
268861466250
270665825650
260274534208
279086474628
201562453898
329920518818
192524554196
336759786896
181595921858
344683722938
115773728850
383858517850
115564966208
383956854788
59633862100
402133539600
52066286818
40292217...

output:

17490 426484
32 912
891574 266471
15428 577267
708 795
284861 693777
600 742
298976 108211
297466 425668
300486 425668
283233 425281
314719 425281
191558 406946
406394 406946
178271 401829
419681 401829
162494 394836
435458 394836
74626 332818
523326 332818
74369 332561
523583 332561
12351 244693
58...

result:

ok Queries used 33

Test #35:

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

input:

7
174517259380
0
847463461105
337000762400
0
552478107521
14795786
310523132786
0
97430768626
194861537252
316467403592
0
1539881901493
0
259771887124
867691664208
965581842448
0
974158928154
0

output:

17490 426484
232 9088
891574 266471
28125 585719
9266 3800
284861 693777
8086 3941
561636 3941
4261 5488
298976 108211
195775 402796
402177 402796
4391 5010
792035 963332
2777 5755
324470 396330
248802 900360
400138 900360
1050 2412
864711 479568
1116 1695

result:

ok Queries used 21

Test #36:

score: 0
Accepted
time: 6ms
memory: 3332kb

input:

7
130076577353
0
684055671336
2688469573
225926643744
0
487722209461
0
68778026005
165148789282
208260081250
163523768666
209478618810
148884606676
220089683216
129059756176
233398030660
126334967522
235129274258
102782195860
249044316560
71996751050
263975987210
70643356162
264530869250
69690223364...

output:

17490 426484
66557 69176
891574 266471
108280 941
108280 532001
91468 56981
284861 693777
63636 31371
298976 108211
260935 367693
337017 367693
258249 367285
339703 367285
234290 362364
363662 362364
202534 352090
395418 352090
198233 350345
399719 350345
161738 331692
436214 331692
116153 296237
48...

result:

ok Queries used 46

Test #37:

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

input:

4
299398572125
281229218
25651664
1326308372
3418350416
25140359282
32556451898
45318511442
307778163490
105661751850
259127444800
75192913160
158186250450
23951885770
134636322906
14922657250
119759428850
10040659690
62274204304
0
200999775650
45128836840
34074409850
7587070580
0
117893506193
41924...

output:

17490 426484
68887 971238
88232 969065
120680 963839
142264 959241
237325 927554
257351 918282
286445 902994
385460 21519
385460 831449
422455 58514
422455 794454
494000 157529
494000 695439
509288 186623
509288 666345
518560 206649
518560 646319
550247 301710
550247 551258
891574 266471
854603 7132...

result:

ok Queries used 53

Test #38:

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

input:

7
181324920697
0
863714288340
1092290753810
731288870834
690760156826
629592898610
425700787850
0
560814231185
0
100391786945
205701892724
325218386944
200612824658
329167129442
180109735418
344242935562
179329487264
344790115524
175055169860
347752749776
174277278578
348285554482
154094050538
36141...

output:

17490 426484
511 1000
891574 266471
317098 997013
161032 840947
144676 819515
120538 785333
45892 651875
1000 779
284861 693777
477 1000
298976 108211
198840 408818
399112 408818
191263 406187
406689 406187
161433 393647
436519 393647
160320 393108
437632 393108
154252 390074
443700 390074
153153 38...

result:

ok Queries used 57

Test #39:

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

input:

7
15704476381
0
28174519432
37527468890
0
115164220810
127335330181
126903052621
142613103217
131811415177
153052958053
138449574973
182202885517
160073023477
184374650077
161786410117
85566780324
0
12309625546
2400020100
0
44045978954
111569542688
88091957908
118502750216
80815332916
175882867328
5...

output:

17490 426484
0 302393
891574 266471
783148 138337
1000000 138337
284861 693777
282062 354430
287660 354430
214920 361704
354802 361704
190304 367858
379418 367858
141570 386154
428152 386154
138602 387554
431120 387554
138602 1000000
431120 1000000
298976 108211
274481 0
323471 0
792035 963332
76381...

result:

ok Queries used 52

Test #40:

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

input:

7
41690071861
165536687044
166760287444
0
54438104692
217752418768
170727628864
47024789904
0
93717804946
187435609892
315195768392
2960837069
71268738280
50288062500
183733006004
0
763725542801
12189831277
59997618137
13038539237
12165688580
20766863042
38268340850
0
1556797985
5378168896
622719194...

output:

17490 426484
0 223053
34980 223053
0 629915
891574 266471
783148 59875
1000000 59875
783148 473067
1000000 473067
284861 693777
172736 408916
396986 408916
172736 978638
396986 978638
0 581652
569722 581652
0 805902
298976 108211
231177 979491
366775 979491
26452 938546
571500 938546
745377 859511
8...

result:

ok Queries used 33

Test #41:

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

input:

7
47810718036
0
67815756837
5327259109
9497173824
261227241424
255783340548
2432821225
5398707348
254799757348
249394844304
901607425
2685772548
251949089908
242817839424
1363002133
0
102076109105
154838982292
163222390292
0
13087143746
49439030400
51902724100
0
12734340953
25468681906
41121957762
1...

output:

17490 426484
0 208528
891574 266471
877780 6422
905368 6422
877780 526520
905368 526520
853600 8840
929548 8840
853600 524102
929548 524102
832180 12920
950968 12920
832180 520022
950968 520022
783148 29702
1000000 29702
284861 693777
193737 387554
375985 387554
193737 1000000
298976 108211
282381 2...

result:

ok Queries used 42