QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#396874#6414. Classical Maximization ProblemmonstersqwqRE 196ms46080kbC++203.7kb2024-04-23 11:51:322024-04-23 11:51:33

详细

Test #1:

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

input:

3
2
0 0
0 1
1 0
1 1
2
0 0
0 1
0 2
0 3
2
0 0
1 1
2 2
3 3

output:

2
4 2
3 1
2
2 1
4 3
0
1 2
3 4

result:

ok ok (3 test cases)

Test #2:

score: 0
Accepted
time: 72ms
memory: 24548kb

input:

10000
2
-107276936 -310501829
419434212 585811870
-65754386 -491212232
381152038 897148193
3
-474045168 493506332
299114415 540203303
165808153 983551
-506936261 -694189769
766718170 -725540031
975267148 -593051087
1
-818952276 -762387923
584023914 -612401389
6
-77701228 -266484128
659434465 6322062...

output:

0
1 2
3 4
0
1 2
3 4
5 6
0
1 2
0
1 2
3 4
5 6
7 8
9 10
11 12
0
1 2
3 4
5 6
7 8
9 10
11 12
13 14
0
1 2
0
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
43 44
45 46
47 48
49 50
51 52
53 54
55 56
57 58
59 60
61 62
63 64
65 66
0
1 2
3 4...

result:

ok ok (10000 test cases)

Test #3:

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

input:

10000
1
999855386 999580905
999342928 999615227
21
999601032 999015398
999155628 999176944
999309856 999524434
999121011 999509537
999323572 999685730
999272272 999769606
999450559 999390758
999632027 999178534
999024993 999463838
999784856 999374197
999980525 999366771
999241260 999516879
999599548...

output:

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

result:

ok ok (10000 test cases)

Test #4:

score: 0
Accepted
time: 71ms
memory: 30948kb

input:

10000
5
999984799 999981445
999958394 999984217
999994978 999981258
999955539 999938710
999936554 999963561
999907222 999907508
999938166 999941959
999910567 999986887
999901446 999961092
999994730 999963038
5
999916115 999962400
999948250 999940355
999954204 999920844
999928148 999990369
999978118 ...

output:

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

result:

ok ok (10000 test cases)

Test #5:

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

input:

10000
1
999990146 999993828
999995909 999996353
56
999999851 999991179
999997250 999997987
999990590 999997316
999997350 999996856
999997034 999996236
999999396 999996897
999991180 999993309
999991265 999995185
999993952 999994054
999990210 999994471
999993201 999995893
999997170 999998971
999998201...

output:

0
1 2
1
76 111
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
43 44
45 46
47 48
49 50
51 52
53 54
55 56
57 58
59 60
61 62
63 64
65 66
67 68
69 70
71 72
73 74
75 77
78 79
80 81
82 83
84 85
86 87
88 89
90 91
92 93
94 95
96 97
98 99
...

result:

ok ok (10000 test cases)

Test #6:

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

input:

10000
5
999999432 999999813
999999271 999999233
999999043 999999606
999999523 999999406
999999564 999999274
999999641 999999102
999999903 999999858
999999058 999999098
999999974 999999119
999999643 999999620
5
999999370 999999738
999999181 999999907
999999163 999999783
999999393 999999086
999999661 ...

output:

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

result:

ok ok (10000 test cases)

Test #7:

score: 0
Accepted
time: 111ms
memory: 22528kb

input:

10000
14
-369804569 -904204119
526374829 -824374353
-127549933 -904204119
-68608787 929413707
-68608787 -363454459
526374829 929413707
693313139 -824374353
-127549933 -726843762
526374829 -904204119
526374829 -363454459
526374829 -409731440
693313139 -726843762
693313139 929413707
-68608787 -8243743...

output:

14
5 19
28 10
26 25
11 16
17 20
24 15
14 23
4 18
13 6
2 9
22 21
7 27
12 8
3 1
20
21 12
34 9
35 26
15 33
25 36
22 39
27 13
24 29
30 40
4 38
7 32
17 23
20 16
6 5
31 10
28 8
19 3
18 1
14 37
2 11
8
6 12
3 9
8 14
15 10
4 13
2 11
7 1
16 5
1
1 2
1
2 1
34
12 30
50 53
62 59
57 55
63 43
61 8
29 41
48 18
47 14...

result:

ok ok (10000 test cases)

Test #8:

score: 0
Accepted
time: 90ms
memory: 30760kb

input:

10000
5
-536123007 813600068
870612905 -192916365
-891077277 -192916365
-169354047 -86845158
-204880568 -86845158
-909192812 -613162163
-536123007 -613162163
602684169 -613162163
-909192812 813600068
602684169 -86845158
3
-296375355 579758813
-296375355 253508589
-296375355 -927878827
267975935 -927...

output:

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

result:

ok ok (10000 test cases)

Test #9:

score: 0
Accepted
time: 85ms
memory: 28408kb

input:

10000
13
38708650 -400244265
805800882 -207412170
-922757982 569623504
330308285 -400244265
-922757982 193222226
330308285 -701148819
-28889088 854967427
284328781 704931219
-397379302 854967427
284328781 252366771
-699696493 -701148819
953729077 -601089169
-858131099 -701148819
-397379302 193222226...

output:

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

result:

ok ok (10000 test cases)

Test #10:

score: 0
Accepted
time: 70ms
memory: 28328kb

input:

10000
2
-254673318 743896676
326182652 743896676
115024593 743896676
989112001 743896676
1
453875458 284043499
869627863 284043499
8
-68955663 625858753
-621253434 625858753
-315653340 625858753
-85160525 625858753
-592616333 625858753
114285020 625858753
618762545 625858753
524402507 625858753
1512...

output:

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

result:

ok ok (10000 test cases)

Test #11:

score: 0
Accepted
time: 92ms
memory: 31456kb

input:

10000
10
-302093372 -991014187
542702243 714369751
-370626462 -991014187
-700169063 714369751
-982732066 -991014187
-763837020 -991014187
320477527 -991014187
290144737 -991014187
18975042 -991014187
-339021181 -991014187
-525462052 -991014187
290144737 714369751
-538375359 714369751
15943074 -99101...

output:

10
12 8
19 7
20 11
13 4
2 15
16 6
3 5
1 10
14 18
17 9
10
14 1
11 3
5 6
12 15
13 17
16 19
10 20
7 18
9 8
4 2
18
18 6
20 7
12 10
24 15
30 21
27 22
34 25
9 26
5 28
23 31
29 32
4 33
8 35
11 36
14 3
17 13
2 19
1 16
35
1 64
5 4
12 33
13 56
16 19
17 28
23 34
24 49
26 67
31 7
39 54
41 43
42 44
48 29
51 37
5...

result:

ok ok (10000 test cases)

Test #12:

score: 0
Accepted
time: 83ms
memory: 31316kb

input:

10000
5
192354975 -209258445
955055576 -209258445
286707627 -209258445
-574795734 -209258445
-305243931 -209258445
-629755833 -209258445
-337515030 -209258445
980285884 -209258445
501317910 -209258445
312382135 -209258445
24
272466007 467288536
-963587196 -778274012
240097765 -778274012
-926564605 4...

output:

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

result:

ok ok (10000 test cases)

Test #13:

score: 0
Accepted
time: 72ms
memory: 28460kb

input:

10000
11
135813326 608040171
135813326 -96255413
135813326 -31734533
135813326 -423296887
135813326 999444876
135813326 946760362
135813326 -599331154
135813326 -441599790
135813326 233339336
135813326 -759375115
135813326 163868817
135813326 321091518
135813326 -402236877
135813326 625124369
135813...

output:

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

result:

ok ok (10000 test cases)

Test #14:

score: 0
Accepted
time: 85ms
memory: 31580kb

input:

10000
19
321791336 -226466052
321791336 138757626
321791336 -613429828
944682716 -446131303
321791336 -927463006
944682716 280242351
944682716 229347131
944682716 155568891
321791336 389911916
944682716 72836839
944682716 -613429828
321791336 229347131
944682716 -927463006
944682716 138757626
321791...

output:

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

result:

ok ok (10000 test cases)

Test #15:

score: 0
Accepted
time: 93ms
memory: 30648kb

input:

10000
2
414226098 -53411011
414226098 -515361565
-572270323 -515361565
-572270323 -53411011
36
660074753 623771687
-917096747 533975361
660074753 337851674
-917096747 -902052044
-917096747 846238046
660074753 197157825
660074753 533975361
660074753 626049519
-917096747 -108293477
-917096747 64055247...

output:

2
1 4
2 3
36
1 52
3 40
6 32
11 46
17 51
21 25
24 43
26 63
27 19
29 48
34 16
37 20
39 30
41 42
44 33
45 62
49 71
50 68
53 14
54 23
55 31
57 22
59 36
60 13
61 9
67 5
70 69
72 18
66 28
65 56
47 64
12 15
8 7
35 4
58 38
10 2
1
1 2
27
11 41
12 36
15 7
17 34
18 27
19 50
22 29
23 13
25 53
35 37
42 5
46 43
5...

result:

ok ok (10000 test cases)

Test #16:

score: 0
Accepted
time: 94ms
memory: 28284kb

input:

10000
6
475408912 -758469962
-99052258 -758469962
-716758863 872897211
-66386054 -170278720
388817201 174925294
-776227900 -285032873
475408912 872897211
-997698204 -236300379
-716758863 -85108619
-776227900 -85108619
-716758863 -236300379
-66386054 -85108619
26
879874105 877328664
-286895493 621573...

output:

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

result:

ok ok (10000 test cases)

Test #17:

score: 0
Accepted
time: 81ms
memory: 28308kb

input:

10000
9
-980409638 -116749812
830791554 -690170434
984923479 323045898
984923479 -116749812
-197520273 323045898
-858897130 -43820432
258471629 -979749918
258471629 -690170434
-858897130 323045898
105960247 -690170434
-197520273 -841854666
-234415044 -116749812
105960247 323045898
-358435325 -202957...

output:

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

result:

ok ok (10000 test cases)

Test #18:

score: 0
Accepted
time: 83ms
memory: 28560kb

input:

1000
45
840710004 395646135
-851514725 100215150
-423513540 -649756636
464326407 -482837664
-179781718 755995077
492651722 -268519233
367302062 -111998374
494634876 842096727
973319201 399526783
-703731734 -989899930
758934136 -959677785
-682507454 58961947
394206800 272218663
752299573 489795348
89...

output:

0
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
43 44
45 46
47 48
49 50
51 52
53 54
55 56
57 58
59 60
61 62
63 64
65 66
67 68
69 70
71 72
73 74
75 76
77 78
79 80
81 82
83 84
85 86
87 88
89 90
0
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15...

result:

ok ok (1000 test cases)

Test #19:

score: 0
Accepted
time: 75ms
memory: 30980kb

input:

1000
113
999827252 999728856
999923862 999631025
999319008 999580013
999333375 999174260
999509073 999545469
999194399 999278837
999715162 999728030
999881205 999764413
999917667 999953211
999651496 999869003
999693536 999169883
999545275 999786246
999969774 999735073
999892216 999697498
999954099 9...

output:

0
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
43 44
45 46
47 48
49 50
51 52
53 54
55 56
57 58
59 60
61 62
63 64
65 66
67 68
69 70
71 72
73 74
75 76
77 78
79 80
81 82
83 84
85 86
87 88
89 90
91 92
93 94
95 96
97 98
99 100
101 10...

result:

ok ok (1000 test cases)

Test #20:

score: 0
Accepted
time: 80ms
memory: 31400kb

input:

1000
16
999918424 999907758
999901558 999910407
999969229 999929343
999986216 999968746
999977167 999921267
999967186 999932634
999999615 999951539
999964903 999931387
999942189 999989158
999990624 999917294
999964661 999935732
999971224 999975496
999972707 999972034
999935060 999934824
999992448 99...

output:

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

result:

ok ok (1000 test cases)

Test #21:

score: 0
Accepted
time: 72ms
memory: 28564kb

input:

1000
227
999994296 999999816
999998835 999994618
999998487 999991646
999995178 999996563
999996865 999996231
999990660 999996917
999995746 999998295
999993178 999995596
999994361 999991179
999990519 999991221
999996210 999992041
999991924 999992546
999991346 999991081
999998929 999995904
999992182 9...

output:

21
148 177
340 442
9 363
163 10
145 135
180 203
100 176
322 235
49 22
128 436
172 367
43 351
112 231
263 300
278 109
124 368
253 3
297 405
448 142
247 90
315 378
1 2
4 5
6 7
8 11
12 13
14 15
16 17
18 19
20 21
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
44 45
46 47
48 50
51 52
53 54
5...

result:

ok ok (1000 test cases)

Test #22:

score: 0
Accepted
time: 82ms
memory: 31356kb

input:

1000
87
999999138 999999640
999999785 999999342
999999914 999999854
999999771 999999416
999999011 999999479
999999217 999999865
999999423 999999937
999999684 999999301
999999323 999999399
999999071 999999949
999999226 999999154
999999770 999999090
999999778 999999735
999999034 999999517
999999803 99...

output:

23
80 54
47 165
135 139
10 75
132 92
104 26
110 71
70 6
29 86
166 111
155 142
15 23
51 124
149 131
83 27
16 162
72 112
115 65
98 12
143 161
158 168
159 164
121 56
1 2
3 4
5 7
8 9
11 13
14 17
18 19
20 21
22 24
25 28
30 31
32 33
34 35
36 37
38 39
40 41
42 43
44 45
46 48
49 50
52 53
55 57
58 59
60 61
6...

result:

ok ok (1000 test cases)

Test #23:

score: 0
Accepted
time: 105ms
memory: 28852kb

input:

1000
154
825004796 802565417
-88001579 364640592
778546546 -57508543
283686672 -57508543
473326798 -826011553
152069566 -577222261
528378065 -577222261
-56296909 -700802856
-711386984 953035370
-711386984 -577222261
895677144 -359290436
840183000 364640592
528378065 -752921798
895677144 -577222261
8...

output:

154
266 295
211 216
114 168
27 225
277 48
112 86
285 245
301 213
238 127
129 207
306 242
99 272
246 231
215 87
219 158
28 76
250 201
194 198
77 133
67 177
92 124
149 70
304 62
290 139
56 308
260 292
143 32
172 111
217 141
278 193
212 104
170 302
251 97
273 180
121 209
69 89
60 279
223 102
264 228
23...

result:

ok ok (1000 test cases)

Test #24:

score: 0
Accepted
time: 107ms
memory: 29068kb

input:

1000
63
859289659 -203061342
831821977 -778714404
640602188 478366497
205686723 -232506600
831821977 -498015901
-494818974 35295117
612307834 -234198721
612307834 -495294231
-898414633 476295237
995217164 -232506600
831821977 934046031
-441937174 432603845
995217164 938111737
874550198 -309423823
87...

output:

63
32 117
121 59
24 103
11 126
60 47
84 97
95 80
28 52
98 56
123 71
45 5
69 61
14 72
15 106
109 90
64 26
101 108
94 74
19 83
113 51
30 120
39 86
104 116
110 124
57 81
27 100
50 9
40 118
2 93
111 43
88 37
87 89
35 115
122 70
58 79
46 77
91 20
66 55
105 17
29 53
33 67
102 44
25 49
82 16
92 21
7 8
34 7...

result:

ok ok (1000 test cases)

Test #25:

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

input:

1000
83
-242219535 -952757420
753940135 -13368420
-180286961 -530756654
586180284 -625675517
-437809383 472014390
-242857851 -924097244
-382920283 -625675517
-630990620 -349004314
-242219535 122507147
208821889 -495849186
-736086757 -489441806
-996984615 -974276781
-275306966 -25109596
967186464 -65...

output:

83
56 91
78 124
150 137
144 39
99 41
132 130
81 145
119 138
105 7
109 123
83 35
127 92
117 146
126 68
147 48
136 113
153 104
107 151
55 69
131 101
118 72
25 115
77 3
50 106
70 157
108 149
164 155
17 158
114 125
154 139
93 8
141 60
66 6
10 111
67 59
29 120
160 110
87 134
62 21
86 38
16 65
57 97
85 76...

result:

ok ok (1000 test cases)

Test #26:

score: 0
Accepted
time: 82ms
memory: 29508kb

input:

1000
142
-28949259 975363136
-628367037 975363136
786525293 975363136
-8339801 975363136
868048337 975363136
208733157 975363136
-724415150 975363136
213367214 975363136
-686387505 975363136
-970451747 975363136
761135553 975363136
-551594491 975363136
-925080593 975363136
-243465321 975363136
-6722...

output:

142
251 100
79 70
10 113
25 29
188 269
66 13
211 172
192 101
35 30
123 134
112 80
244 124
277 61
153 143
246 191
88 22
236 194
232 229
163 37
89 7
53 54
201 9
15 118
144 218
2 78
44 248
121 69
182 209
137 23
47 174
12 110
262 85
52 126
189 257
234 84
130 238
55 240
224 231
267 56
32 21
117 49
278 24...

result:

ok ok (1000 test cases)

Test #27:

score: 0
Accepted
time: 106ms
memory: 29856kb

input:

1000
458
102600109 754726017
-66999931 951825513
-767202008 951825513
-845069119 754726017
-448344214 754726017
174342794 754726017
176530329 754726017
553731053 754726017
-69189351 754726017
-455330522 951825513
-261324017 754726017
809818684 951825513
745593756 951825513
-130095774 754726017
-2737...

output:

458
712 4
780 6
658 7
434 8
471 9
86 11
290 14
387 16
673 17
150 18
289 19
871 22
458 24
467 27
219 29
859 30
452 31
15 32
888 43
93 45
246 47
498 54
50 55
343 59
709 61
126 62
108 65
261 66
307 69
175 73
368 74
53 81
72 82
832 83
119 87
203 90
757 94
789 100
865 104
777 105
125 107
698 109
204 112
...

result:

ok ok (1000 test cases)

Test #28:

score: 0
Accepted
time: 107ms
memory: 32088kb

input:

1000
273
638010636 -796267612
299279783 -796267612
321987052 -571635029
-388046291 -571635029
-491314021 -796267612
130988206 -571635029
32427063 -571635029
51875304 -571635029
-508530089 -796267612
269379692 -571635029
214241513 -796267612
720122947 -796267612
-678543365 -796267612
158504867 -79626...

output:

273
10 403
16 91
17 82
21 78
34 222
45 415
53 156
60 502
62 96
64 169
68 428
70 39
73 198
81 544
84 281
89 260
93 530
94 167
99 278
100 47
110 199
117 153
121 13
125 105
127 353
130 436
131 264
133 354
134 120
140 137
145 205
148 390
149 206
157 266
160 498
166 11
177 203
180 423
181 246
185 136
186...

result:

ok ok (1000 test cases)

Test #29:

score: 0
Accepted
time: 92ms
memory: 28804kb

input:

1000
75
429681826 802800421
429681826 -608943566
429681826 -787858696
429681826 507047252
429681826 485971873
429681826 -346306621
429681826 -612405192
429681826 -13671560
429681826 -816374335
429681826 513226316
429681826 892335083
429681826 -352600432
429681826 -556540475
429681826 -504699273
4296...

output:

75
54 95
47 133
28 55
147 121
9 79
139 22
3 71
140 145
85 119
132 24
7 76
141 2
26 66
78 13
53 67
120 81
87 14
69 144
117 34
16 83
105 41
72 17
116 46
40 94
6 12
44 74
27 106
51 84
108 100
146 111
70 114
136 142
135 35
25 62
33 90
82 131
107 149
8 127
43 118
77 88
31 42
143 65
60 102
75 29
20 103
37...

result:

ok ok (1000 test cases)

Test #30:

score: 0
Accepted
time: 103ms
memory: 31860kb

input:

1000
81
403001151 -229966312
-27290952 -941247950
-27290952 -872808715
403001151 -81762908
403001151 825473197
403001151 730971412
403001151 -886560490
-27290952 394200417
-27290952 808677817
-27290952 -961778274
-27290952 -245434545
403001151 318019109
-27290952 792029613
403001151 390473732
-27290...

output:

81
1 116
4 82
6 40
7 155
12 59
14 17
16 150
20 126
22 138
28 157
29 26
31 133
37 35
41 109
49 97
52 153
53 108
55 27
57 131
58 106
60 135
61 47
67 154
74 130
85 24
86 39
87 132
88 94
90 21
93 44
95 112
98 115
105 63
113 143
119 30
121 64
124 83
125 72
129 114
141 128
144 25
147 152
148 32
158 71
161...

result:

ok ok (1000 test cases)

Test #31:

score: 0
Accepted
time: 101ms
memory: 32096kb

input:

1000
257
-24981531 -524783010
-24981531 376842743
132542945 905111237
-24981531 -663183576
132542945 238995240
-24981531 -904084630
132542945 330336577
-24981531 -424310756
132542945 26224857
-24981531 573604180
132542945 -531956470
132542945 583434945
132542945 620552707
-24981531 -351085713
132542...

output:

257
3 45
5 343
7 257
9 470
12 279
13 167
22 248
23 468
28 84
34 407
35 97
36 282
38 268
39 135
42 115
46 90
49 216
51 272
52 88
53 242
56 104
58 106
61 485
66 404
68 442
74 378
75 223
76 386
78 463
81 330
82 113
83 14
85 109
86 31
87 96
92 428
99 265
107 6
110 245
114 156
117 169
118 119
120 355
121...

result:

ok ok (1000 test cases)

Test #32:

score: 0
Accepted
time: 106ms
memory: 29500kb

input:

1000
21
541263298 571344162
-338833794 258719906
814556806 571344162
749911951 -730958945
-737751671 400747496
880311857 -204125795
-555645311 -832036787
-338833794 -832036787
582588235 -915718735
-124654808 394321598
-202932677 571344162
541263298 -975674793
880311857 -730958945
-126659351 25871990...

output:

21
26 28
25 34
3 38
18 39
9 33
10 16
19 24
4 29
41 7
42 31
8 32
14 2
23 35
22 5
21 30
37 6
27 13
15 20
1 12
36 17
40 11
37
6 58
9 44
13 69
19 63
16 49
74 3
53 34
70 39
56 48
73 40
59 45
50 18
43 62
64 10
41 32
67 71
7 61
38 27
36 54
57 55
35 51
60 28
5 65
66 17
29 37
68 2
26 47
25 31
30 21
42 24
52 ...

result:

ok ok (1000 test cases)

Test #33:

score: 0
Accepted
time: 105ms
memory: 32064kb

input:

1000
82
620344713 761205214
564192450 -149133296
855072748 -725730286
-369866361 761205214
-126903403 123500699
521658307 -238068427
564192450 -575382074
424528213 639391487
160949070 -238068427
490683515 736060786
-861287945 -430077137
92203881 -414548921
-228263452 -161807552
-739623881 619906932
...

output:

79
109 5
155 71
46 147
104 134
114 159
118 139
119 11
136 135
131 142
19 106
12 161
90 148
50 15
78 129
44 127
133 58
87 77
59 141
64 140
100 113
54 146
53 132
10 158
85 83
116 65
52 30
33 160
130 17
89 94
49 34
13 23
55 91
37 128
27 25
73 112
122 51
68 121
120 98
2 7
22 28
99 144
63 125
150 97
6 9
...

result:

ok ok (1000 test cases)

Test #34:

score: 0
Accepted
time: 109ms
memory: 35032kb

input:

100
715
-716037174 449787280
-179603495 267807227
-85847745 -339745287
531498593 906672966
-65182647 -249655497
196101865 -917254384
569704541 175181937
408949063 -60772621
-471098833 -180592225
452882519 -173474204
518554869 504642822
-610596606 -43048739
-173418328 49620755
-490214353 129314297
-8...

output:

0
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
43 44
45 46
47 48
49 50
51 52
53 54
55 56
57 58
59 60
61 62
63 64
65 66
67 68
69 70
71 72
73 74
75 76
77 78
79 80
81 82
83 84
85 86
87 88
89 90
91 92
93 94
95 96
97 98
99 100
101 10...

result:

ok ok (100 test cases)

Test #35:

score: 0
Accepted
time: 102ms
memory: 33032kb

input:

100
1180
999939181 999607824
999877463 999501538
999725395 999197028
999578614 999669422
999691207 999388141
999798382 999350154
999515140 999686861
999804739 999722876
999059909 999779016
999988075 999795096
999394228 999790648
999357316 999130743
999834412 999146926
999533794 999419507
999164265 9...

output:

2
294 1956
2069 485
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
43 44
45 46
47 48
49 50
51 52
53 54
55 56
57 58
59 60
61 62
63 64
65 66
67 68
69 70
71 72
73 74
75 76
77 78
79 80
81 82
83 84
85 86
87 88
89 90
91 92
93 94
95 96
9...

result:

ok ok (100 test cases)

Test #36:

score: 0
Accepted
time: 97ms
memory: 32936kb

input:

100
10
999949463 999921247
999942779 999933524
999900374 999919960
999913527 999977190
999963539 999919222
999986393 999982382
999960627 999912715
999955900 999934316
999962876 999904282
999944172 999923360
999974177 999993968
999960412 999941887
999902083 999920318
999906832 999942948
999934454 999...

output:

0
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
0
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
43 44
45 46
47 48
49 50
51 52
53 54
55 56
57 58
59 60
61 62
63 64
65 66
67 68
69 70
71 72
73 74
75 76
77 78
79 80
81 82
83 84
85...

result:

ok ok (100 test cases)

Test #37:

score: 0
Accepted
time: 112ms
memory: 33476kb

input:

100
2795
999995625 999994422
999997406 999998890
999996073 999998910
999996365 999992345
999992211 999999534
999990826 999998894
999990827 999999648
999991569 999997094
999997323 999994792
999990812 999994722
999994392 999998879
999994441 999990381
999992051 999993298
999997822 999994423
999998285 9...

output:

1710
2563 926
2540 78
4669 1569
1970 530
4891 2589
5338 1024
2582 3056
851 3839
351 51
3380 5194
1974 4263
4777 2356
4787 2538
3834 2709
1959 588
158 1607
3344 1648
700 3887
879 1632
294 1159
36 4795
1614 3252
2089 3987
1870 4316
1230 443
3500 3450
5564 1756
1240 2785
199 4124
1115 3580
4535 559
108...

result:

ok ok (100 test cases)

Test #38:

score: 0
Accepted
time: 127ms
memory: 33896kb

input:

100
1005
999999258 999999564
999999716 999999506
999999057 999999959
999999274 999999385
999999562 999999714
999999749 999999926
999999159 999999330
999999060 999999408
999999218 999999582
999999097 999999761
999999853 999999231
999999424 999999841
999999744 999999186
999999400 999999073
999999445 9...

output:

985
957 1202
1608 899
310 1945
256 1818
541 359
683 1804
25 1710
1176 700
1902 556
1486 1781
1712 1128
1190 1416
1487 179
612 1146
2008 1038
1215 1267
1123 705
507 318
1172 1665
386 1410
983 1654
1915 1156
1569 1405
1517 1739
1758 456
1337 1043
843 1081
147 1578
791 1230
1995 1218
1980 234
1699 766
...

result:

ok ok (100 test cases)

Test #39:

score: 0
Accepted
time: 145ms
memory: 35652kb

input:

100
174
-958876330 -846470800
-796741809 -131152725
574295122 764287642
-958876330 -825762193
185468313 -971066749
-287559769 764287642
-904746093 -825762193
-438778854 -825762193
5267152 609322023
185468313 77515090
185468313 -131152725
-287559769 247199580
-491475497 260165013
719679418 -179087066...

output:

174
166 269
196 290
339 21
158 294
54 307
228 220
299 224
160 104
317 164
301 123
109 312
148 64
247 230
130 63
59 234
291 319
221 278
231 68
184 69
330 213
87 297
142 181
40 252
279 96
296 169
121 67
323 272
314 137
102 78
332 266
30 306
346 186
41 283
248 65
304 188
143 311
227 149
250 129
74 195
...

result:

ok ok (100 test cases)

Test #40:

score: 0
Accepted
time: 139ms
memory: 34592kb

input:

100
454
292487349 -708917766
-446575764 -920302303
373857024 -525302786
236159958 -877034512
240035307 -28559828
-156425976 29793081
-683968223 -28559828
658545653 -892201965
-485118423 -349005511
-677465608 102959577
-241309351 -615266668
-857580103 -877034512
590882873 69859569
-961101806 -2385646...

output:

454
214 36
34 294
559 197
289 145
139 616
180 45
691 31
815 860
598 103
117 25
174 756
807 183
185 453
79 317
659 121
569 11
749 219
186 779
804 16
345 605
449 336
523 105
334 147
227 108
143 87
6 299
586 43
80 359
539 94
790 780
788 380
520 427
836 389
481 473
107 113
878 695
491 230
548 545
310 90...

result:

ok ok (100 test cases)

Test #41:

score: 0
Accepted
time: 132ms
memory: 33888kb

input:

100
140
229220674 878836488
-506767178 293730975
960642833 878836488
485659386 878836488
-225376185 16183205
-322465048 -460955536
-635701181 878836488
-578723152 374559636
956924322 878836488
-666563369 -550449367
-240963901 374559636
9519098 374559636
404598294 16183205
-188062738 467646265
937074...

output:

140
71 80
115 19
100 28
218 5
104 105
43 107
3 16
246 208
132 158
166 173
22 181
47 15
84 120
86 82
91 123
4 60
73 147
231 62
134 45
31 220
139 46
164 241
169 257
184 53
116 108
162 54
50 261
201 39
130 214
210 150
228 265
56 176
36 38
204 177
155 247
180 215
51 179
225 87
211 200
197 253
149 57
67 ...

result:

ok ok (100 test cases)

Test #42:

score: 0
Accepted
time: 112ms
memory: 33396kb

input:

100
453
-9728842 -879506383
723264369 -879506383
-617602947 -879506383
-883543546 -879506383
-365459776 -879506383
259863014 -879506383
-229024413 -879506383
-357634378 -879506383
45613473 -879506383
897413515 -879506383
142722904 -879506383
308356916 -879506383
-528467703 -879506383
45803942 -87950...

output:

453
614 86
627 339
556 863
669 902
260 466
438 300
80 350
612 157
303 333
35 604
30 528
645 390
54 698
147 905
377 714
417 523
524 236
766 100
290 84
322 850
492 435
138 873
171 567
261 424
538 242
853 4
870 291
410 374
359 238
800 173
755 632
370 727
886 777
656 516
189 796
251 906
154 268
542 445
...

result:

ok ok (100 test cases)

Test #43:

score: 0
Accepted
time: 139ms
memory: 34440kb

input:

100
1681
-648014211 -216027092
-372352298 95789050
-678908480 95789050
-382412165 95789050
214922606 95789050
45021991 95789050
131451784 95789050
926607022 -216027092
-500711391 95789050
527775426 -216027092
860331657 95789050
-255764825 95789050
314154093 -216027092
-631103238 95789050
292792358 9...

output:

1681
1417 10
233 13
1188 16
125 24
3163 29
413 35
466 42
3177 43
2156 62
2747 64
2824 70
576 71
749 76
1776 83
26 84
1430 85
2787 86
1832 89
1434 96
1759 105
1302 109
93 115
569 117
2543 119
1948 124
2405 133
1288 142
788 149
942 153
2586 157
3343 160
2043 165
3083 166
487 167
605 174
1716 176
2598 ...

result:

ok ok (100 test cases)

Test #44:

score: 0
Accepted
time: 128ms
memory: 31280kb

input:

100
476
218894313 -685169320
967098661 -16626457
-797375436 -16626457
955557493 -16626457
54133572 -16626457
-722192690 -16626457
791557373 -16626457
-208166285 -685169320
185917393 -16626457
-338707386 -16626457
49911294 -16626457
-359502368 -685169320
-359176146 -685169320
430103061 -16626457
-744...

output:

476
2 754
3 114
4 728
5 71
6 141
9 188
10 641
14 432
15 423
16 33
17 506
21 406
24 280
28 783
29 68
36 20
42 614
43 131
44 275
45 470
46 842
47 548
48 30
50 710
51 918
52 925
55 481
59 607
60 603
61 333
62 400
63 670
64 439
67 176
70 349
73 922
76 822
79 211
83 315
85 300
88 861
90 344
92 370
94 519...

result:

ok ok (100 test cases)

Test #45:

score: 0
Accepted
time: 111ms
memory: 32764kb

input:

100
1281
-7127937 -551225280
-7127937 -63829747
-7127937 50255920
-7127937 685959203
-7127937 -474730627
-7127937 205475943
-7127937 894868084
-7127937 -262984557
-7127937 858324856
-7127937 257534742
-7127937 -640954010
-7127937 -111367493
-7127937 892100661
-7127937 696606550
-7127937 136498536
-7...

output:

1281
1213 318
81 259
1611 1291
906 926
1594 2219
594 1702
1363 1191
1016 1475
309 592
1661 1575
324 36
1138 1987
2208 2531
134 1405
946 575
1176 859
1742 365
173 1800
2395 2050
965 379
1417 426
2466 270
442 1160
1324 1533
52 2528
1898 1901
981 1655
1748 1996
2182 249
1321 1555
1768 1356
419 2437
857...

result:

ok ok (100 test cases)

Test #46:

score: 0
Accepted
time: 139ms
memory: 33448kb

input:

100
2300
930979038 -865442548
56354538 569246647
930979038 209346563
930979038 -402151796
56354538 9788037
930979038 349210639
930979038 113353815
56354538 -508882748
56354538 -390359400
930979038 881411592
56354538 328521324
56354538 569030395
56354538 749112678
930979038 -492654973
930979038 -5806...

output:

2300
1 3485
3 1472
4 4187
6 229
7 1777
15 1005
19 4208
20 2914
24 326
30 402
36 4518
45 2308
46 302
51 1183
52 2724
57 2300
58 1964
67 4554
69 1288
77 856
79 4045
82 4406
84 3923
86 1762
89 4425
92 2699
93 1916
98 664
99 3065
102 2298
103 1765
104 1931
115 3911
117 3357
119 2310
120 801
121 769
122 ...

result:

ok ok (100 test cases)

Test #47:

score: 0
Accepted
time: 140ms
memory: 33772kb

input:

100
393
484804995 -671233294
484804995 45381500
-343734967 483744892
-343734967 -678278044
-343734967 430018594
484804995 -536133521
-343734967 972761171
-343734967 188883545
484804995 291634094
484804995 161326893
484804995 43447237
-343734967 81642646
-343734967 905579532
484804995 -838456546
4848...

output:

393
1 351
2 509
6 219
9 232
10 384
14 206
15 76
17 586
18 349
19 104
20 67
21 34
22 496
23 679
26 357
28 643
30 99
31 63
37 182
38 362
45 647
50 684
51 383
52 405
54 406
55 79
56 267
57 277
58 241
60 264
62 766
65 409
69 479
71 657
73 157
74 411
80 748
81 103
82 641
87 338
89 44
91 688
92 420
93 480...

result:

ok ok (100 test cases)

Test #48:

score: 0
Accepted
time: 145ms
memory: 34452kb

input:

100
2245
257511569 -570888823
-409065975 834451934
972932318 -206332685
-220073979 -895107571
819486773 -206332685
819823298 -570888823
116295608 282026121
589205449 -895107571
-54658019 -895107571
987042524 -206332685
-196884689 282026121
-940822451 993058719
402874649 -895107571
633334868 99305871...

output:

2245
48 4
1122 1
29 4327
1046 2215
1402 1789
14 453
24 1939
565 1544
40 1578
3357 3106
3955 194
63 934
1477 2995
70 2539
4039 3423
1885 4360
77 1977
4089 3208
82 1398
2238 521
3804 2673
84 1717
1795 2203
94 2338
112 1901
1211 3139
4240 153
143 546
2450 2789
3807 2732
857 260
202 3205
3054 2754
205 2...

result:

ok ok (100 test cases)

Test #49:

score: 0
Accepted
time: 128ms
memory: 34032kb

input:

100
116
-28349829 -267772969
-181233169 605639981
-221792554 885875755
-8847461 376377302
-527881168 376377302
-794286947 885875755
-442516480 365428090
60367949 59687335
844852200 -267772969
70152464 -267772969
-326579976 59687335
-382146420 885875755
-305012413 376377302
-255659827 495623398
84485...

output:

116
8 95
156 11
151 14
51 196
56 30
72 121
75 128
226 194
225 103
183 115
86 90
200 186
132 110
139 73
20 129
148 184
195 157
143 169
214 174
177 117
193 199
71 49
99 28
112 88
221 74
180 125
166 96
114 61
78 19
109 154
210 168
213 50
215 120
182 37
33 82
58 53
185 113
137 127
189 176
175 10
146 227...

result:

ok ok (100 test cases)

Test #50:

score: 0
Accepted
time: 144ms
memory: 40172kb

input:

10
10568
266619539 928993099
644537002 -163339024
-965315605 131093436
-873401839 -319727236
-682029920 -699502948
-857838819 -528950378
126750467 -72275669
623580094 410832833
287731394 -865265684
-71034303 515678565
-897514612 929674238
-794392375 895647772
811715826 600060479
640892543 -557248887...

output:

0
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
43 44
45 46
47 48
49 50
51 52
53 54
55 56
57 58
59 60
61 62
63 64
65 66
67 68
69 70
71 72
73 74
75 76
77 78
79 80
81 82
83 84
85 86
87 88
89 90
91 92
93 94
95 96
97 98
99 100
101 10...

result:

ok ok (10 test cases)

Test #51:

score: 0
Accepted
time: 133ms
memory: 43568kb

input:

10
983
999595593 999481588
999941833 999204986
999676040 999115470
999653065 999524261
999950018 999574889
999911879 999942071
999134864 999155033
999133604 999956453
999424191 999531479
999169859 999553795
999163364 999608732
999486991 999180185
999600255 999690901
999278724 999959357
999886640 999...

output:

2
1118 931
997 1034
1 2
3 4
5 6
7 8
9 10
11 12
13 14
15 16
17 18
19 20
21 22
23 24
25 26
27 28
29 30
31 32
33 34
35 36
37 38
39 40
41 42
43 44
45 46
47 48
49 50
51 52
53 54
55 56
57 58
59 60
61 62
63 64
65 66
67 68
69 70
71 72
73 74
75 76
77 78
79 80
81 82
83 84
85 86
87 88
89 90
91 92
93 94
95 96
9...

result:

ok ok (10 test cases)

Test #52:

score: 0
Accepted
time: 135ms
memory: 39228kb

input:

10
15236
999975325 999978324
999983228 999957461
999965056 999943264
999953829 999920806
999913911 999975263
999949326 999952997
999948654 999968342
999957007 999987426
999900723 999909965
999944389 999907733
999911075 999973513
999997298 999931066
999983079 999918568
999946266 999969557
999900152 9...

output:

6279
12245 21809
2368 30312
30122 27410
16648 25082
172 6716
23451 11875
16924 26552
14499 7930
14142 4067
5413 6571
8918 22110
20990 22535
24289 19369
7503 5512
410 7394
19556 5706
13196 28621
19725 13939
9324 21083
30420 26459
6847 26563
9309 13797
17972 6890
30055 29161
4083 9772
1127 5609
25672 ...

result:

ok ok (10 test cases)

Test #53:

score: 0
Accepted
time: 166ms
memory: 42100kb

input:

10
6642
999992808 999996636
999995238 999998603
999990460 999998357
999992495 999998027
999994992 999993315
999990663 999999307
999994510 999991024
999994319 999993024
999996312 999990447
999990590 999994561
999997748 999994786
999990918 999993436
999994457 999993851
999994234 999991647
999996595 99...

output:

6031
5589 4031
12235 5847
13107 6593
5155 7020
2472 9757
12145 12398
3406 6757
3729 12260
11250 8766
8780 6874
10576 6148
11771 10215
10069 10762
6264 9295
4826 1247
4633 7071
3586 6321
4603 10965
11162 9255
4335 7096
9340 4112
9983 11397
9198 10142
12404 8497
1979 5716
8470 368
566 12855
3758 12569...

result:

ok ok (10 test cases)

Test #54:

score: 0
Accepted
time: 179ms
memory: 39572kb

input:

10
19516
999999707 999999837
999999488 999999818
999999509 999999591
999999991 999999026
999999356 999999726
999999489 999999193
999999038 999999298
999999881 999999157
999999344 999999162
999999160 999999113
999999139 999999582
999999470 999999327
999999742 999999921
999999255 999999737
999999216 9...

output:

19516
19853 32708
31375 23080
24798 20119
16596 32313
20715 3001
23485 24625
19568 30997
29735 6687
1057 36394
19350 24998
35719 5288
24012 6741
25832 16791
37767 18357
17923 27839
35847 28505
22493 6261
16978 24898
9902 9947
12090 21634
23611 33432
7514 19784
15969 36384
23778 29682
25207 22511
327...

result:

ok ok (10 test cases)

Test #55:

score: 0
Accepted
time: 167ms
memory: 39028kb

input:

10
14948
-170688734 833794743
949001579 224632065
-887648481 346146784
994218765 -808897932
948269970 764123696
24957273 562441566
-170688734 843621240
959643634 -354951661
631351081 -86364881
-9691567 824383620
-935916525 352437858
381851425 387057559
-6239193 951794229
450798340 -742525732
-394344...

output:

14948
5066 28105
25427 29128
8221 8250
23116 11873
3304 7292
22779 22621
27300 25030
12606 4071
6356 28177
3164 621
14559 18548
14731 7949
19433 12326
6101 6108
21240 18868
2272 13513
20215 3890
12081 17065
14778 6800
8649 24570
8234 18039
27254 9588
27636 14405
20645 1528
20221 16561
20487 20517
24...

result:

ok ok (10 test cases)

Test #56:

score: 0
Accepted
time: 169ms
memory: 41364kb

input:

10
18275
46937162 -785699925
-512599977 -861792903
-732947245 771605479
-317815822 369273432
-478775873 211331712
-678678382 -401598442
-366699505 752973691
776710779 -7216385
-88306688 -190102574
328516250 -317225669
522217639 215990988
523904534 -256490677
540608168 493241721
620782210 -185524925
...

output:

18275
2112 22061
13833 30708
6606 15190
27475 13729
11182 3250
2406 5762
8617 25714
8393 18754
19260 33501
30366 3226
12507 2608
19728 20477
8224 2442
26070 9099
29162 6880
34388 34948
6542 11796
31998 25877
30510 25834
8863 15561
15798 32894
30238 3480
36023 3999
8502 24903
34186 32267
6736 26127
1...

result:

ok ok (10 test cases)

Test #57:

score: 0
Accepted
time: 168ms
memory: 41468kb

input:

10
390
-347835130 869197644
963535733 392603688
671237510 92351133
671237510 -703861232
671237510 423461538
671237510 369343656
671237510 980877320
-347835130 456099182
671237510 -311676199
-347835130 -886266831
-347835130 -257100015
-347835130 -637839633
963535733 -16989823
963535733 -821875052
963...

output:

390
639 412
38 269
14 670
742 481
268 191
479 62
422 570
566 289
761 330
730 413
33 333
436 238
662 293
319 102
717 701
41 550
329 445
56 290
582 758
170 750
448 741
66 629
68 584
540 463
714 636
78 261
79 486
525 748
81 470
477 227
94 439
95 738
47 653
105 241
92 476
600 704
43 141
308 632
694 165
...

result:

ok ok (10 test cases)

Test #58:

score: 0
Accepted
time: 152ms
memory: 41656kb

input:

10
1285
637213737 -900998147
-356659628 -900998147
950244610 -900998147
-182671545 -900998147
-708950884 -900998147
-973866581 -900998147
-190878205 -900998147
135731649 -900998147
-125331609 -900998147
521939981 -900998147
976257311 -900998147
818237327 -900998147
705563706 -900998147
58565785 -900...

output:

1285
1838 309
245 1338
1188 917
2518 2215
1999 1660
343 1230
1556 1787
2438 2467
556 2021
131 858
73 1153
1328 2506
837 723
863 421
909 1813
6 2092
2149 1080
2531 1023
2059 1592
720 749
300 1548
2013 1496
2018 208
2497 184
399 314
1778 2256
1668 2058
1105 250
2353 1171
1140 1310
721 320
1312 1735
21...

result:

ok ok (10 test cases)

Test #59:

score: 0
Accepted
time: 196ms
memory: 43588kb

input:

10
5000
-188767223 -315528788
-987365245 -315528788
-106387689 135511984
127392808 -315528788
800721151 -315528788
146952905 -315528788
-323702728 135511984
411611172 135511984
872064533 -315528788
-40050336 135511984
119702024 135511984
-208480603 -315528788
679048782 -315528788
402900711 -31552878...

output:

5000
7 3727
8 5884
10 4275
11 5954
16 2758
17 136
18 3353
21 7177
23 796
25 9314
26 5648
27 139
28 8232
30 1284
32 1049
35 4245
37 1850
38 1515
41 5937
44 6193
45 8999
49 4361
50 6634
56 8929
57 4884
59 9881
61 4871
63 1013
65 9346
68 8355
71 7168
75 3297
76 2425
77 9131
80 4537
81 4364
85 1280
86 1...

result:

ok ok (10 test cases)

Test #60:

score: 0
Accepted
time: 180ms
memory: 39296kb

input:

10
5892
25327490 -567979409
-735380777 -567979409
362509197 -518667355
380762791 -518667355
-325207607 -518667355
541910006 -518667355
36310841 -567979409
-726943590 -518667355
513235902 -518667355
289283655 -518667355
290421813 -567979409
892523351 -567979409
-894087744 -567979409
621832318 -567979...

output:

5892
7407 1
2821 7
4804 12
11638 13
1176 17
2822 27
1228 28
1188 29
1473 30
6144 38
8413 41
3704 42
5556 48
10984 52
3538 54
3084 55
2750 57
10463 66
416 70
1901 73
6600 74
4747 88
1094 90
4767 91
9771 94
7070 97
1274 98
1788 101
10466 104
743 108
2083 110
11355 112
4683 114
9073 118
6666 119
1377 1...

result:

ok ok (10 test cases)

Test #61:

score: 0
Accepted
time: 153ms
memory: 43532kb

input:

10
7074
241731848 530211859
241731848 -112101076
241731848 -387299272
241731848 840407166
241731848 -519364921
241731848 -927667636
241731848 -12750799
241731848 446782229
241731848 -605995785
241731848 -360804301
241731848 -706630766
241731848 95158934
241731848 -937680624
241731848 162324777
24173...

output:

7074
6133 11105
6041 2348
1466 6028
11615 1027
7046 3209
7246 9014
7369 9745
12989 4832
8596 2640
2450 12227
8228 2503
11496 8710
7346 9684
6810 8068
8060 13697
2963 5095
11584 11264
3739 2625
3572 3083
10549 6975
5712 2681
8017 12418
5881 7565
11469 4567
12323 5166
4371 413
103 1259
9110 7802
2173 ...

result:

ok ok (10 test cases)

Test #62:

score: 0
Accepted
time: 192ms
memory: 46080kb

input:

10
729
867500722 -983664796
867500722 -428285695
-323742684 -171458916
-323742684 440597108
867500722 878319625
867500722 225023835
-323742684 -291982426
-323742684 568294497
867500722 327920686
867500722 -477580489
-323742684 310693081
-323742684 775098797
867500722 -334572408
-323742684 181766129
...

output:

729
1 1098
2 1036
5 542
6 20
9 268
10 1043
17 110
18 1390
19 326
22 864
24 304
25 1328
27 875
29 1377
31 1384
32 824
33 786
34 897
35 978
39 240
40 286
41 1172
43 1343
44 1332
47 534
49 253
51 359
52 934
53 972
54 21
55 1138
59 1426
62 815
63 1064
65 703
66 720
67 1013
68 226
69 422
72 60
74 464
75 ...

result:

ok ok (10 test cases)

Test #63:

score: 0
Accepted
time: 188ms
memory: 41248kb

input:

10
23890
-966926807 -783294985
-966926807 -231086723
-966926807 -827425532
-966926807 951590873
-966926807 -847083727
-322954521 -903547355
-966926807 395823002
-322954521 113620163
-966926807 442076584
-322954521 -358356830
-966926807 -416611206
-966926807 308206261
-322954521 -548371038
-966926807...

output:

23890
8 20642
10 20588
18 7766
19 7181
21 31740
23 32364
29 12062
35 18344
45 22052
49 32496
51 12026
52 7987
54 34443
55 36999
56 3930
59 22322
60 28745
65 11958
71 34185
77 37782
80 15889
83 33338
86 39276
87 4774
89 35030
95 34986
96 24048
97 5647
101 7879
105 17701
108 46987
112 6391
114 28948
1...

result:

ok ok (10 test cases)

Test #64:

score: 0
Accepted
time: 184ms
memory: 41652kb

input:

10
6461
164403694 719871079
-178686855 -505252945
820168812 419207217
-229478200 77799158
677361796 77799158
575661006 419207217
-697613489 -329650846
-362539459 -563403377
727778010 -563403377
-111787135 419207217
892586613 -329650846
664142990 435882783
-746057528 435882783
-484808272 -329650846
-...

output:

6461
3 4518
5005 1315
12020 7
11269 12502
14 7374
613 1021
11230 19
5770 21
4900 6178
2596 3888
4921 52
9664 70
520 5738
7884 75
9584 89
94 9660
9427 10682
243 103
12442 5851
4985 7932
6334 119
3405 1373
132 1533
8414 7888
11922 136
215 7708
10445 10317
5121 6392
12494 7853
4254 172
4793 173
1732 51...

result:

ok ok (10 test cases)

Test #65:

score: 0
Accepted
time: 181ms
memory: 39828kb

input:

10
14956
895706895 998300226
820538240 306140296
-445632195 597312604
-409959410 597312604
755346555 251251450
259123019 -176732314
701825202 -694016428
520061157 306140296
626248236 -236060915
321824154 -762678310
714689875 444441588
-774797456 597312604
4205823 306140296
104689711 -236060915
-9484...

output:

14956
2407 23360
23986 723
12368 12260
1998 5
15372 10279
7932 23779
27317 24295
19200 5852
23955 9742
3386 13472
5568 17790
26047 28343
18738 18104
18848 14544
18147 30
25646 478
13015 23188
18768 16480
19197 18324
2737 21375
12242 1300
11889 3930
25977 6529
6605 25359
22363 22288
11290 44
19706 23...

result:

ok ok (10 test cases)

Test #66:

score: -100
Runtime Error

input:

1
100000
70720045 -382955525
180416482 414551370
-321808609 -148240525
-959621209 239890090
279590168 239445206
-672414454 -968764851
978907902 855176899
-927586531 -493246847
-87140549 -239161862
394302217 -390243883
747094712 472952985
437187652 834551586
-394349288 431373156
954522299 545636033
-...

output:


result: