QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#305207#5008. Zero AAMP Currentsezteam1AC ✓64ms37304kbC++142.3kb2024-01-14 21:04:502024-01-14 21:04:50

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4 7
1 2
2 3
3 1
1 4
2 4
1 4
3 2

output:

1
2
-3
4
3
4
-2

result:

ok good one

Test #2:

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

input:

2 2
1 2
2 1

output:

1
-1

result:

ok good one

Test #3:

score: 0
Accepted
time: 27ms
memory: 27792kb

input:

13758 193861
8665 5619
9734 11588
936 1302
2748 2317
3141 5818
8849 11418
248 943
9907 3274
8337 359
13597 8368
7809 3431
11374 13189
5135 4551
11688 1841
4071 4437
796 364
8000 4384
12954 7759
3399 3585
1918 5592
7368 7392
8872 7186
217 9202
11502 9587
13399 10630
947 3691
1486 8804
8226 7143
2734 ...

output:

-140
-21
-20
-61
-10
70
-10
-85
-29
122
12
111
-91
117
-2
48
38
181
-112
-139
-24
34
1
36
-94
9
120
-93
57
103
-37
24
-1
36
60
32
-74
-109
86
80
-68
63
-72
72
125
5
-32
17
-28
50
101
-10
-130
49
-1
-45
-22
21
-51
125
-1
89
-89
1
-146
31
76
-2
10
-22
-78
-169
28
58
8
59
-1
-78
-4
-16
-145
-11
68
55
-...

result:

ok good one

Test #4:

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

input:

2576 198513
2126 2537
2007 428
1155 1644
1657 1832
1459 1922
2240 1132
230 1696
1376 704
971 597
109 533
310 2328
692 1335
757 443
1964 2388
136 263
2139 2546
1451 1917
2048 1636
2502 137
757 2575
647 2480
2004 618
256 1715
2433 2085
79 1933
83 2549
1659 2016
1936 786
1816 2512
1359 953
1747 2366
19...

output:

-93
-41
28
-45
-98
-85
-9
-90
38
6
10
-62
-156
-16
98
-67
75
5
35
-142
-63
-54
-28
-12
3
7
50
-12
124
-3
-106
-30
-56
-164
-15
152
135
-126
50
15
20
-109
-89
73
110
12
-118
-49
-1
55
-82
63
1
-77
-27
-46
121
-58
8
-2
31
-8
14
86
-91
-75
2
-27
25
-34
-70
-90
-65
95
41
81
-34
48
-37
9
133
14
63
-90
-3...

result:

ok good one

Test #5:

score: 0
Accepted
time: 52ms
memory: 32372kb

input:

82644 198952
7250 60424
14369 31861
37573 68142
518 73568
74639 26836
50082 46206
25507 52142
59920 68131
55089 52689
53869 67254
32548 11363
57133 35487
69810 22267
51959 3483
69787 67700
26981 50678
30328 1083
18162 39761
49695 23254
54278 33751
2529 28612
13175 38044
27929 60984
11278 39952
46896...

output:

29
-45
0
-2
-1
-3
2
-2
182
2
1
-93
0
-263
-180
57
-2
168
217
-192
-167
189
0
-3
0
0
23
2
-1
-3
-129
0
134
-11
0
0
58
-193
0
37
-59
11
1
10
0
1
2
3
3
0
88
-2
-70
0
0
2
22
63
59
-11
1
-50
-14
0
0
93
1
-132
-1
-128
-75
0
-1
1
92
102
0
0
123
0
-109
-184
5
64
18
-2
-60
0
-193
-2
-1
3
1
2
-29
12
0
0
11
-3...

result:

ok good one

Test #6:

score: 0
Accepted
time: 24ms
memory: 24200kb

input:

3066 190306
1154 186
1738 2367
2880 2483
1819 148
743 909
2190 878
1769 470
426 638
649 1065
2171 399
1935 1067
465 1763
1188 1773
1024 2198
2128 2238
175 1150
1497 1309
161 449
616 259
1573 1742
2607 2505
2412 2073
1221 1928
1803 1556
2390 1153
2595 3022
2171 2756
991 2114
1250 289
1212 2488
886 24...

output:

-64
105
-8
-49
36
-62
-9
13
-106
-39
51
61
-20
13
3
13
-63
57
39
-28
-2
-6
140
-75
86
-78
-24
-84
41
-108
90
4
-33
-70
26
26
-46
-123
-26
15
19
74
-21
22
66
-150
-20
-98
89
-37
64
-41
30
29
18
-145
90
-67
103
8
133
129
62
27
-46
-57
-108
-40
55
43
9
-64
-84
-16
-29
56
-52
-40
148
89
94
-124
87
159
5...

result:

ok good one

Test #7:

score: 0
Accepted
time: 48ms
memory: 31408kb

input:

62947 193186
22551 46152
47519 19425
11727 62118
1314 39189
12100 58408
1939 22952
27035 2101
8727 11566
31352 16360
6087 34237
55265 53249
11568 56162
45145 17492
25851 58165
20558 49212
54825 3353
61284 39686
8357 8978
12265 10697
3789 41042
14696 54530
34033 18793
44036 1524
10967 28191
34241 333...

output:

-2
-145
-87
104
-128
96
-133
108
0
0
2
93
181
13
13
-3
1
166
3
-31
55
6
0
-118
107
100
-1
37
-142
-1
73
106
1
-2
3
0
-36
-1
175
-53
0
-1
15
7
-1
-3
76
98
-118
22
-206
16
-54
11
-88
-1
12
-61
-106
28
35
-54
1
-38
-3
31
1
-12
-3
-140
157
40
-99
27
0
3
137
2
0
-1
124
2
-189
-2
140
141
-2
-99
3
-55
-1
2...

result:

ok good one

Test #8:

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

input:

43480 191239
2764 9693
11155 3878
35008 22467
15585 19079
18258 36650
22436 8886
40098 31323
29864 15570
28429 18175
32157 17602
28377 39275
34373 38165
35860 30680
15971 17678
28142 21403
36344 28834
4823 35491
42548 9942
8734 26474
333 25614
8695 6193
28083 42472
20275 32280
10644 13870
39269 3238...

output:

-44
-6
22
-111
61
-3
113
-2
2
-112
-3
35
-69
-203
-28
7
115
208
137
64
31
-61
3
-169
-72
-26
-53
146
-2
1
129
-37
2
-85
82
-1
193
-153
55
1
-1
33
80
-2
-18
88
-2
31
-21
-1
1
1
43
2
-1
88
112
-115
-38
-119
-1
-3
136
-30
78
96
80
113
-18
-102
179
-16
-3
-9
29
68
-17
61
-120
-3
-2
16
21
-23
-3
-90
2
18...

result:

ok good one

Test #9:

score: 0
Accepted
time: 40ms
memory: 30432kb

input:

44894 196108
4806 34877
9136 30358
10866 17290
15667 13264
17961 12496
32755 29806
2921 42651
13853 5805
13222 34459
13583 19243
43448 3758
12773 19121
3092 25400
27927 43493
43466 16023
17001 40852
12530 4439
27639 6554
3858 34705
42998 21472
293 25255
38745 20928
23393 27405
20963 5755
8850 33548
...

output:

-35
83
-41
66
-1
2
-2
-87
181
263
5
-34
213
-14
-100
144
-1
61
7
3
-63
-168
3
-352
5
62
1
246
240
-1
-9
-200
1
-3
3
7
133
245
129
-3
-16
1
2
3
3
75
-194
3
-111
115
-51
284
-3
100
191
-152
2
-271
91
-108
-51
-125
216
8
-29
187
-71
-1
-219
-3
1
244
2
-100
1
-305
-189
143
-18
-102
135
26
101
269
-3
-61...

result:

ok good one

Test #10:

score: 0
Accepted
time: 52ms
memory: 32040kb

input:

88238 193852
46448 59478
77052 49817
26135 8158
489 74346
73637 53130
86918 84923
32946 55226
7645 65340
55271 18234
76520 5302
18306 64706
39035 21340
61079 82551
79787 76260
82351 4804
59136 25995
18730 43376
34068 20258
8703 20152
18577 86217
2681 42652
31028 46158
57629 2012
11382 2744
55829 724...

output:

1
94
1
2
1
2
0
0
-1
-1
48
-66
1
-2
1
-94
1
315
-325
0
2
2
0
0
0
356
212
0
106
-2
462
8
-1
1
-1
114
-2
0
0
521
-136
-1
-118
1
36
26
-1
-1
2
-3
-1
-2
-3
-98
143
116
-436
3
318
3
0
2
-1
-15
562
0
0
0
-95
-20
351
1
3
-3
2
3
1
2
-225
-3
-3
-179
0
-1
0
2
279
50
-2
-2
-614
1
-3
-209
1
0
136
0
-395
33
1
-58...

result:

ok good one

Test #11:

score: 0
Accepted
time: 48ms
memory: 31524kb

input:

57117 191812
53629 33354
8343 12030
25097 45053
10232 43485
41581 27734
6982 26296
11675 9015
54025 817
5712 1030
51794 1681
5041 35170
36971 17853
41180 26869
2695 34545
12630 24160
28687 9970
5945 48619
10552 31410
39963 49269
29651 39405
55892 52341
52613 53900
21986 16435
36002 12820
55903 38326...

output:

-392
-383
2
-26
-86
-3
289
62
2
-44
-1
-113
-129
0
75
9
154
206
367
174
-407
348
2
262
1
-182
300
171
309
76
-349
48
-2
-353
-305
-13
-76
-208
312
3
-289
128
1
2
13
-1
1
-157
-1
303
66
31
3
-84
178
30
-3
143
-522
-2
66
309
-269
-361
-241
-3
-376
0
-2
2
186
23
-2
1
189
467
-340
338
-299
49
119
2
22
2...

result:

ok good one

Test #12:

score: 0
Accepted
time: 32ms
memory: 29624kb

input:

30067 190595
10345 14018
13995 4745
1600 20148
252 15031
12820 20909
17958 27642
5724 6189
27053 22793
1144 28863
8622 3153
28637 22765
29959 20058
27027 2115
3100 548
7156 14515
7765 8073
14728 19693
26144 29357
20672 10328
17818 28830
15070 21837
13240 8941
19948 8167
10401 49
12118 8658
26577 286...

output:

89
-69
241
1
-152
70
-2
-1
-130
3
1
-118
97
-1
236
-211
-142
-110
302
1
-4
-28
-115
-160
-353
-121
144
36
-15
-21
98
-39
-2
101
-9
14
-1
-3
194
-130
-1
3
90
31
95
104
-121
52
-105
211
-94
-228
320
15
-57
3
211
177
-2
-3
-106
89
-264
-102
-104
-209
-116
102
172
112
-120
28
-74
166
-221
-162
169
-68
2...

result:

ok good one

Test #13:

score: 0
Accepted
time: 45ms
memory: 31788kb

input:

60185 194321
48556 16368
33074 37628
16897 6151
53328 35423
24938 28966
4446 20680
10805 34656
55104 21351
4794 1562
16489 1003
42454 40020
27828 30159
53382 27263
2136 39772
5791 10977
46156 56376
41674 43756
50684 35300
3446 43407
52540 59392
22999 50053
21235 42574
21676 40382
27243 43401
7693 34...

output:

-48
69
2
0
-90
1
17
34
146
2
-134
-2
1
-215
46
0
-3
-24
12
-229
51
-50
77
-90
-3
5
32
-24
-1
122
44
20
100
-62
-11
36
199
-3
31
28
-1
-40
2
3
-1
-87
136
-1
-2
-1
161
-3
-2
-8
95
46
94
-48
-2
-138
-1
292
-168
165
2
3
210
212
271
-87
1
57
-92
-27
-212
100
3
-192
-136
1
110
-93
2
-2
-298
-286
-104
-180...

result:

ok good one

Test #14:

score: 0
Accepted
time: 36ms
memory: 29412kb

input:

30986 192197
7315 4118
2366 20107
17954 12256
7269 23827
14233 23892
725 14826
16798 21774
21071 14124
17811 17311
13247 30296
4559 8167
30370 26915
19016 29256
4741 23129
3198 20086
27821 8224
4020 7717
653 22091
29067 5775
20783 29559
13780 10504
14648 24300
18455 25243
27325 13419
144 10962
3944 ...

output:

32
-125
4
-263
196
337
352
264
123
-159
-44
2
178
-17
-7
281
24
-72
17
-91
3
57
-136
-61
-99
-253
-143
-234
-86
212
201
-116
18
352
127
8
137
33
-36
14
-219
-104
50
139
-3
-136
252
-149
162
-42
75
-112
117
118
-134
349
66
-196
24
-43
39
-1
4
-177
167
141
-46
-110
-22
135
171
-1
37
-244
333
31
54
-17...

result:

ok good one

Test #15:

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

input:

39822 198848
31937 20331
33697 34785
1717 17646
1987 16747
14936 31909
29747 19519
29449 19291
25943 1566
25902 33889
33198 38326
351 2905
32397 10664
22512 7042
33766 3167
16398 26018
33906 29987
2809 30135
8202 16503
31051 32967
29085 14715
12287 20834
27030 15322
21704 12413
37524 25073
25343 168...

output:

158
153
-1
-210
140
-222
158
-91
175
344
-58
-192
-35
-36
-1
89
-171
80
195
-2
2
63
-369
-1
103
-155
-14
19
105
-8
-75
-53
-37
-179
33
50
-42
-1
-8
-149
-173
-154
56
248
-63
112
-1
99
143
259
-68
132
3
-90
-41
166
-123
81
46
-1
165
1
-177
1
94
-33
146
82
124
-2
253
-46
3
127
-162
-97
2
237
-36
-3
31...

result:

ok good one

Test #16:

score: 0
Accepted
time: 52ms
memory: 32164kb

input:

91910 197832
10305 11965
19190 39378
3223 2745
353 10263
88073 74784
1517 73626
43781 33872
81744 12703
25242 6863
90804 27937
55800 37501
32343 55209
44395 90499
46918 1622
42613 30682
50382 28083
46856 20870
59072 31005
54528 60124
51736 90761
46972 46468
31309 49895
38016 37238
39352 48876
30424 ...

output:

84
-239
-130
0
0
0
-3
-303
319
-14
1
0
0
130
37
64
-204
0
0
-3
0
-168
12
-1
0
12
1
0
-1
-122
-47
-1
0
0
2
-84
-168
-2
-103
-206
148
-71
-98
0
2
1
1
-293
2
-3
0
168
194
-11
3
69
0
0
-1
0
2
77
-2
2
1
-261
-175
-260
-240
-3
-1
1
1
0
-5
0
8
2
1
35
89
2
-1
0
8
193
-1
1
-1
-3
143
-1
-219
-166
109
0
-12
-2...

result:

ok good one

Test #17:

score: 0
Accepted
time: 48ms
memory: 34400kb

input:

80690 198571
21961 51934
52078 46795
78135 5442
3250 27750
68754 16151
36458 22844
45270 13966
61722 10500
50375 54405
48741 54238
685 30072
53054 31282
22548 2253
18272 903
15040 71394
955 42852
7085 68179
29934 27110
71470 9399
37754 43073
56895 21800
35571 15658
7845 46050
10177 76606
40711 73305...

output:

0
2
289
-85
139
-226
184
15
0
-227
30
-2
-1
0
-308
-1
-1
-118
-106
220
172
-170
-3
3
-2
-1
-15
-3
2
-1
2
-1
3
0
250
-149
47
0
1
0
-228
0
180
0
-25
3
-15
-1
46
-112
243
129
2
2
191
-3
-1
-2
1
271
127
-182
-2
47
-76
-299
-1
92
3
-2
-344
1
-376
-102
-2
-176
-137
0
3
1
-1
-3
0
0
118
214
1
2
1
-107
182
1...

result:

ok good one

Test #18:

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

input:

37473 192482
13440 21528
23924 4048
24987 29389
34848 5471
15690 31834
12663 33414
2795 11287
10611 21751
35400 1942
12452 27183
3392 236
16140 13876
37230 13080
37012 24456
1399 8715
977 12031
23282 2457
12896 14765
36890 5722
19335 36150
25549 31540
8901 33529
18235 4416
970 18218
6403 4569
17319 ...

output:

195
41
164
1
-3
-1
-372
2
128
112
-61
-391
-3
-146
-421
-2
1
280
0
-25
-14
52
125
2
-81
1
-2
236
-136
98
237
68
116
151
75
-1
-2
55
284
-277
57
1
-82
119
1
180
138
-210
96
-429
2
-18
-267
133
146
-28
-150
157
-122
-215
1
-31
96
-97
119
108
1
-159
-74
-157
3
-1
273
-276
158
-50
-1
1
65
236
185
-1
3
4...

result:

ok good one

Test #19:

score: 0
Accepted
time: 29ms
memory: 29148kb

input:

100000 200000
95846 76140
70125 3369
91264 90314
8492 46342
11760 94433
91249 1250
81517 63944
72014 37341
3303 9722
243 77717
26751 99494
95347 17205
15724 15677
85675 26653
28830 90255
36019 36997
10488 79704
54538 36274
57304 23167
39393 56311
71726 69930
51786 17224
46624 76446
2999 48250
62722 ...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok good one

Test #20:

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

input:

100000 200000
83849 21488
52302 37545
82359 71980
95443 81516
65961 93512
77251 57522
59200 92396
48566 83664
7040 14688
14427 87861
49501 57013
47974 74312
16452 3911
1221 73835
63180 20884
88776 40807
95947 42562
31067 73821
53920 43172
74694 39481
15429 84143
3399 87168
71412 46522
97152 11683
47...

output:

3
-1
225
-130
3
-2
-54
3
-1
-1
-2
2
-127
3
0
0
116
-309
-182
157
15
-1
0
427
-281
-3
-47
259
0
3
-1
0
-149
-3
0
0
0
-132
122
-276
-1
1
0
3
3
0
-27
-403
0
0
1
-1
-3
17
276
-2
122
3
-1
-224
-1
-2
449
-2
0
-11
0
1
0
3
1
23
-127
2
2
-29
1
8
-286
0
-153
-4
-45
1
-173
-315
-291
32
2
-3
-1
-1
3
0
304
89
-4...

result:

ok good one

Test #21:

score: 0
Accepted
time: 61ms
memory: 32448kb

input:

100000 200000
58987 61049
71738 53668
26361 2281
87841 73526
77982 66740
49515 22092
84826 7690
1387 72150
49976 615
63841 44885
17357 60030
83752 60207
52473 96219
93778 10715
92695 55171
36451 99872
1405 99234
60020 87483
80774 25801
46063 37442
30974 8875
4697 13596
34335 72872
41817 25484
49698 ...

output:

-62
76
-36
2
-3
-2
2
0
373
-2
-93
0
-132
-1
3
-3
-308
-73
-3
-44
28
248
-126
159
-16
-1
-1
0
41
-1
-48
-56
1
1
1
-138
-2
98
-156
-349
0
-134
2
3
-2
0
-122
2
-3
1
45
4
23
149
0
2
77
94
1
3
-178
0
0
-240
0
-1
0
0
19
1
-117
212
0
125
-133
3
3
8
18
95
0
2
-210
2
0
-94
2
-20
0
-3
0
2
0
2
-3
0
0
-197
3
2
...

result:

ok good one

Test #22:

score: 0
Accepted
time: 64ms
memory: 32584kb

input:

100000 200000
61531 39695
44632 20774
47490 63977
11320 87977
22483 84362
97339 83997
66856 45614
58751 92088
50968 22234
15401 55813
24179 58381
50919 52415
27723 14965
73732 26913
97080 22998
29750 89034
94983 76318
11015 96185
65987 90703
93206 85215
35593 10642
26499 55355
58488 60609
84201 5522...

output:

0
9
-65
0
0
13
265
0
-99
0
0
35
-219
0
257
0
-2
261
1
1
1
-43
-2
0
208
39
-154
1
2
-33
12
-1
-11
-28
0
-1
6
-61
84
0
29
-298
0
3
-1
-326
-63
191
-3
17
0
324
46
-2
0
-15
1
-2
-26
-2
0
-328
0
-208
0
-287
0
-3
1
-78
3
-2
-3
-1
1
3
-32
0
-3
-266
392
185
8
0
18
-44
231
49
-1
-6
-2
-37
0
0
136
42
0
-27
70...

result:

ok good one

Test #23:

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

input:

100000 200000
53412 96815
66768 25886
52007 38071
3793 84234
10089 78405
19880 70751
49212 11313
88319 94289
48424 43501
56528 43410
81110 4648
76913 8860
8685 3118
35692 55330
784 15167
92405 37975
25886 10675
53631 64986
23498 68235
84426 8010
76287 62434
84435 23848
16561 91183
53030 23483
76417 ...

output:

2
0
0
-175
0
14
-1
-1
227
-1
1
92
-3
-51
-2
0
0
0
0
58
247
183
332
-220
-1
1
0
0
0
0
371
3
5
-3
-3
130
-198
-3
-22
-1
-358
0
-263
-276
0
2
0
243
208
373
-45
253
338
0
-22
0
0
0
2
3
23
2
66
-7
-3
-13
0
4
107
-243
163
0
-2
-3
0
0
261
-3
0
-71
-2
-10
3
313
279
3
-40
-33
0
-1
-68
273
0
3
429
0
1
-302
1
...

result:

ok good one

Test #24:

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

input:

100000 200000
5131 78762
42404 93493
52235 71438
85648 7787
81905 66559
29178 27650
48236 74286
64218 35483
65744 50690
589 46895
3077 56002
89577 32355
49453 92405
78780 61760
79011 68198
80862 39323
64144 31834
84503 52051
40908 65062
19814 87794
66213 97894
23455 88113
96323 12512
42435 46880
976...

output:

1
1
-270
192
-1
1
-149
2
-2
-3
3
2
278
-45
-1
0
0
-1
-99
-86
-1
3
-3
0
-105
16
-2
2
-2
2
-105
165
0
0
-49
-13
2
-15
345
-1
0
-234
-1
2
-149
-285
-49
-337
3
2
-19
1
2
103
3
1
32
0
0
237
262
-3
0
-3
-56
-1
3
-2
155
279
0
0
-47
0
1
-2
0
3
2
-2
0
-327
1
2
270
0
-244
383
-3
0
3
-3
152
42
32
-3
-1
0
0
-1
...

result:

ok good one

Test #25:

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

input:

100000 200000
41616 13893
25722 75287
53284 35348
59288 22280
32989 4762
22159 16632
96009 60218
57263 89931
36667 34473
78984 32519
70597 73841
32896 43752
29709 74369
94444 27128
75931 80679
74452 42941
83117 42464
57606 93177
99417 88728
41366 1361
37980 61662
75105 82403
43353 50922
46255 3399
7...

output:

-9
-3
16
1
0
-1
132
-191
-182
-3
-1
0
-66
-43
-22
-138
-53
0
2
3
247
0
-2
-131
-66
-2
0
0
3
-1
2
3
0
3
0
1
-2
0
-3
139
0
-237
0
23
-1
0
89
-54
1
-1
-2
0
34
-1
-96
0
-1
1
3
3
-214
-2
46
0
-6
1
3
-1
0
1
2
-1
2
1
1
2
172
3
-217
0
-3
-79
0
-2
1
0
-45
-3
-1
0
-205
0
16
216
-279
-37
-1
-2
145
-78
1
0
-33
...

result:

ok good one

Test #26:

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

input:

100000 200000
50724 36149
50482 85130
62118 23067
7817 74516
60553 82912
57489 63150
49494 15229
85938 55220
70603 91964
77101 22606
37898 18718
25168 39454
21603 86140
25491 25615
14343 2590
50233 15978
67796 7141
76406 5654
48616 15580
43403 31818
44891 42339
96839 31754
36102 44574
41231 2546
971...

output:

1
-1
1
-38
2
0
-179
-230
3
0
-1
3
-137
2
3
-54
1
-1
0
0
2
0
0
-3
0
-168
-1
2
0
185
0
118
85
1
-44
2
0
-230
3
1
3
-2
2
-1
-1
0
109
-25
-3
-1
-8
-213
-115
-188
-3
0
-116
-25
1
-1
1
52
0
-247
2
0
25
206
-19
-2
-53
0
-93
0
0
3
140
144
1
89
-64
-125
-1
-198
-2
0
-36
70
0
0
-37
1
-217
-238
0
-70
-2
42
-25...

result:

ok good one

Test #27:

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

input:

100000 200000
56671 48189
34975 48598
30103 97369
93468 73079
62494 17602
2359 36405
78972 73193
86427 39506
33465 16790
5372 24962
98974 59261
82529 8093
59407 32284
23001 16363
43385 27646
84703 46571
11229 45529
9261 85651
45367 56089
2786 72313
6788 1068
91398 96916
91655 24664
30858 28977
21593...

output:

2
0
-286
3
0
1
0
0
274
-3
1
0
1
2
-3
-3
-3
131
0
2
98
1
0
-325
-1
233
-3
-1
0
-274
1
1
-76
-2
-2
3
-62
2
-35
3
-23
0
3
3
0
-3
-2
0
1
0
3
1
-315
0
0
-101
-1
-374
314
3
-16
-45
-24
0
0
0
-1
-82
-3
-345
-5
-240
-1
-2
-90
-42
-15
0
2
67
0
-187
-1
-1
0
-2
0
85
0
-2
0
-3
0
0
-331
-103
0
0
1
3
0
12
95
0
24...

result:

ok good one

Test #28:

score: 0
Accepted
time: 27ms
memory: 28192kb

input:

13758 193861
9734 10314
10314 10872
10872 1602
1602 7202
7202 13249
13249 11073
11073 6133
6133 6517
6517 1371
1371 6674
6674 5085
5085 11683
11683 6382
6382 13011
13011 5390
5390 4879
4879 8256
8256 11007
11007 9724
9724 10240
10240 8101
8101 5891
5891 4738
4738 10854
10854 11567
11567 8155
8155 49...

output:

42
-119
83
-55
18
-1
-97
116
76
-115
-55
47
12
-45
102
1
7
3
-16
-99
41
75
-3
-3
3
-101
62
-66
-10
116
-87
-60
154
-24
55
-89
-27
57
-2
26
-75
6
111
-141
50
54
-35
45
-21
-28
-10
25
-95
-1
84
-23
-89
195
-59
-55
-46
72
-83
30
93
-77
40
2
-74
78
-82
13
21
108
-43
1
-118
82
14
-4
-31
43
-26
-2
-23
-77...

result:

ok good one

Test #29:

score: 0
Accepted
time: 24ms
memory: 24984kb

input:

2576 198513
2007 2105
2105 1045
1045 2544
2544 1693
1693 142
142 1041
1041 809
809 2136
2136 1863
1863 2322
2322 849
849 2112
2112 857
857 1083
1083 638
638 1661
1661 226
226 548
548 2365
2365 56
56 1846
1846 811
811 742
742 1964
1964 1227
1227 1776
1776 916
916 907
907 195
195 1021
1021 1901
1901 4...

output:

14
-32
9
26
40
-84
69
-21
-19
8
-28
27
52
5
-42
-29
44
-61
33
-13
9
6
-3
7
15
-1
-4
22
18
-71
68
-63
-3
68
-13
-26
38
-38
-49
44
41
-48
22
-25
-2
37
0
21
-46
5
40
-30
-6
49
-23
-17
-56
20
45
21
-59
-27
28
29
-2
-5
0
-34
-3
63
-75
44
-20
31
19
-15
-74
92
-65
-14
1
43
-9
-7
29
-60
17
25
26
-17
-20
44
...

result:

ok good one

Test #30:

score: 0
Accepted
time: 50ms
memory: 36868kb

input:

82644 198952
14369 38166
38166 8025
8025 74259
74259 20862
20862 21855
21855 23561
23561 33654
33654 19654
19654 65205
65205 50573
50573 28578
28578 9376
9376 48693
48693 45281
45281 15921
15921 78701
78701 30418
30418 46756
46756 45707
45707 70841
70841 22881
22881 57706
57706 32178
32178 69215
692...

output:

-101
3
-1
1
-1
1
229
3
-62
-3
-61
59
-128
2
1
110
-28
1
2
2
-27
-1
1
-63
-45
1
-2
2
-3
-1
1
-3
-1
184
-1
37
-1
-3
-1
-1
-2
1
-2
-10
-1
-3
3
-132
96
1
23
-209
237
-2
-119
-3
86
1
39
-136
-1
-65
3
-1
1
148
-1
-2
-3
-155
-2
2
202
2
-115
-39
-1
-62
2
-2
1
31
180
-295
-1
207
-103
95
-1
2
-15
45
-29
-2
-6...

result:

ok good one

Test #31:

score: 0
Accepted
time: 25ms
memory: 24700kb

input:

3066 190306
1738 2537
2537 1704
1704 1292
1292 1261
1261 1156
1156 2399
2399 2358
2358 1474
1474 560
560 415
415 2863
2863 1902
1902 1805
1805 369
369 1926
1926 379
379 1298
1298 39
39 2896
2896 2623
2623 2960
2960 1972
1972 372
372 346
346 1206
1206 790
790 66
66 231
231 2401
2401 1551
1551 720
720...

output:

-71
54
45
-21
-61
83
-31
-12
2
3
4
-1
27
-76
-95
159
-2
-24
-130
136
-2
-8
25
-24
75
-67
77
-118
-19
49
19
-56
53
51
21
-124
58
-40
49
-97
-33
-36
78
87
-9
-4
31
-41
7
-26
-91
143
28
-54
-9
18
-160
172
-13
-19
-48
1
43
9
-7
34
-171
162
-17
-38
20
-51
-3
13
54
0
16
-145
146
13
-1
28
-97
69
-44
-23
85...

result:

ok good one

Test #32:

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

input:

62947 193186
47519 44243
44243 11193
11193 10826
10826 8728
8728 6887
6887 10776
10776 59071
59071 42377
42377 51605
51605 3133
3133 52665
52665 62934
62934 9355
9355 21865
21865 25494
25494 31300
31300 32398
32398 18242
18242 45820
45820 47445
47445 26114
26114 31067
31067 21478
21478 19558
19558 5...

output:

3
-28
-53
2
3
46
-2
-153
179
-200
-16
126
-3
3
254
-3
1
1
-378
-2
1
178
-1
-1
-109
-2
-3
-2
1
110
-1
-3
-154
40
278
-149
1
-63
3
-58
3
-3
1
3
217
2
-140
-2
-63
-2
-2
84
-1
-91
2
-3
1
-82
-2
2
120
89
-105
3
-2
26
-140
2
-3
-3
192
-106
-1
-2
-67
-1
-5
-1
2
-2
15
-2
241
-288
238
-22
1
6
-2
-128
1
-1
-3...

result:

ok good one

Test #33:

score: 0
Accepted
time: 37ms
memory: 30468kb

input:

43480 191239
11155 10225
10225 43244
43244 1713
1713 14645
14645 27359
27359 23140
23140 18479
18479 6396
6396 28179
28179 19088
19088 42538
42538 36224
36224 27054
27054 19997
19997 23865
23865 29197
29197 25035
25035 32937
32937 32337
32337 14753
14753 14105
14105 33516
33516 36557
36557 24963
249...

output:

172
-136
-2
-3
-2
1
324
-105
2
-42
-2
-3
-38
3
-44
229
-237
142
-68
-160
253
-1
69
-217
-101
89
-57
3
-3
-30
73
-1
12
58
-75
-1
3
2
166
-157
-64
100
21
67
-2
-2
-2
-1
32
-1
3
-191
-3
105
76
3
-35
2
-192
75
1
76
-10
-121
240
3
-3
-295
150
2
204
-176
1
-148
48
-1
3
0
95
-1
-90
3
122
3
-173
88
143
-2
-...

result:

ok good one

Test #34:

score: 0
Accepted
time: 44ms
memory: 33696kb

input:

44894 196108
9136 34157
34157 14616
14616 13372
13372 30799
30799 25932
25932 12847
12847 9656
9656 12309
12309 14718
14718 26967
26967 35141
35141 7851
7851 25591
25591 9544
9544 28866
28866 21085
21085 41045
41045 36348
36348 21752
21752 23669
23669 839
839 7252
7252 28433
28433 16461
16461 36184
...

output:

185
-99
39
70
2
2
-227
218
-209
3
-41
2
-2
263
-184
-1
-53
2
-2
-13
-3
168
106
93
2
-227
-145
-1
416
-140
-116
15
-2
3
-49
101
-126
-3
91
-67
-1
1
-3
5
21
1
-82
191
-158
-60
-2
150
-238
2
163
-136
-2
-3
428
-451
174
3
1
153
-81
1
-263
161
3
169
3
-222
2
-3
1
1
-3
-80
59
-97
137
-1
84
-31
-109
292
-1...

result:

ok good one

Test #35:

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

input:

88238 193852
77052 68192
68192 77813
77813 39146
39146 45801
45801 665
665 76961
76961 85198
85198 78074
78074 67590
67590 52330
52330 5738
5738 48259
48259 87814
87814 28365
28365 77083
77083 67906
67906 38325
38325 53288
53288 7728
7728 74011
74011 80072
80072 29963
29963 28230
28230 9749
9749 139...

output:

-410
-1
-3
2
1
-1
385
-1
-133
84
-3
-448
-2
-1
63
301
-1
-3
1
-1
26
-1
-70
3
101
-1
-160
262
-347
58
-3
187
-1
-3
-446
-3
-1
566
-19
8
-3
3
-3
-2
36
-336
-277
-1
-2
-2
-1
3
-3
-3
76
510
-131
22
-1
-459
-3
432
108
2
-28
-1
-1
-370
1
-160
-1
-3
535
-3
-3
100
2
-2
2
1
-2
2
3
-524
2
460
1
-490
2
2
1
-3
...

result:

ok good one

Test #36:

score: 0
Accepted
time: 49ms
memory: 31888kb

input:

57117 191812
8343 12597
12597 45223
45223 2159
2159 52976
52976 48490
48490 25963
25963 32595
32595 30306
30306 5149
5149 26914
26914 9456
9456 15655
15655 45190
45190 26814
26814 45052
45052 24030
24030 5561
5561 52213
52213 55549
55549 39706
39706 36036
36036 48171
48171 45129
45129 8329
8329 4025...

output:

14
-1
-201
276
-1
-34
-1
3
-227
243
2
3
0
-195
181
3
1
-1
-1
-3
-226
1
2
128
71
1
-91
93
-1
3
-26
-3
1
-3
29
-122
79
-95
-2
-3
3
2
-1
-1
-132
288
1
-1
-330
40
2
-2
371
-242
-1
-47
3
147
56
-3
-182
-1
-27
1
169
-103
62
-212
268
3
-213
-1
-3
245
-86
84
-29
3
2
-118
1
99
-156
2
26
114
4
-254
286
-1
2
1...

result:

ok good one

Test #37:

score: 0
Accepted
time: 27ms
memory: 24916kb

input:

13758 193861
9734 10314
10314 9734
11967 6004
6004 7514
7514 12027
12027 10332
10332 9106
9106 3200
3200 10217
10217 8950
8950 10230
10230 10093
10093 2789
2789 2654
2654 13389
13389 11967
8288 9693
9693 5244
5244 2265
2265 1367
1367 139
139 8284
8284 3570
3570 7382
7382 729
729 2726
2726 8689
8689 ...

output:

166
-166
27
87
69
-174
46
-128
-15
154
-122
84
103
-82
-65
16
-214
-2
-3
106
-81
56
-14
-47
-58
78
-57
80
32
-61
46
10
-6
-136
271
102
-158
145
-43
-2
-48
-22
-3
76
81
-162
125
-1
-43
-83
100
100
-168
58
2
-12
147
-193
45
14
-40
55
-72
2
27
-70
101
49
-72
89
-68
165
-184
68
1
-96
180
-217
19
6
139
-...

result:

ok good one

Test #38:

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

input:

2576 198513
2007 2105
2105 2007
975 2090
2090 2444
2444 1776
1776 434
434 2148
2148 975
2457 1125
1125 1723
1723 1826
1826 1202
1202 2457
1383 2283
2283 1473
1473 980
980 295
295 64
64 1344
1344 1383
1785 1066
1066 930
930 1785
1127 2395
2395 449
449 1127
33 1227
1227 1853
1853 1567
1567 33
841 1727...

output:

-16
16
8
-6
9
-2
-25
16
-6
8
-25
63
-40
29
-75
17
16
-26
33
6
77
-1
-76
-20
-32
52
-55
16
31
8
-20
-12
32
23
-23
1
49
-72
29
-6
-1
-98
63
-57
92
-37
-8
45
49
-49
93
-60
60
-93
-7
66
-59
5
-5
57
-79
48
-42
16
-60
-26
98
-48
-32
56
-63
7
66
2
-29
29
106
-3
-78
9
0
-17
28
23
-73
56
-51
-17
63
44
-90
-3...

result:

ok good one

Test #39:

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

input:

82644 198952
14369 38166
38166 8025
8025 74259
74259 20862
20862 21855
21855 23561
23561 33654
33654 19654
19654 65205
65205 50573
50573 28578
28578 9376
9376 48693
48693 45281
45281 15921
15921 14369
11082 11038
11038 67780
67780 13760
13760 47917
47917 48309
48309 73163
73163 76268
76268 14098
140...

output:

-16
1
-1
-222
195
-3
-2
2
-239
-91
45
42
3
1
287
-2
-37
-160
-1
115
-1
-143
1
24
7
2
-3
1
-253
398
1
1
-52
-169
156
1
-3
2
1
-92
-2
2
-21
-36
-192
433
-217
3
3
3
1
-126
111
6
1
2
1
-1
2
-1
213
-1
-3
2
-49
1
-3
-164
207
-2
-1
-2
-3
3
-281
76
-1
52
3
-18
1
-1
-2
-135
120
-230
248
-1
2
-3
-3
-319
374
-...

result:

ok good one

Test #40:

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

input:

3066 190306
1738 2537
2537 1704
1704 1292
1292 1261
1261 1156
1156 2399
2399 1738
2973 1661
1661 2973
1925 2711
2711 2285
2285 1206
1206 1925
1838 2490
2490 181
181 689
689 138
138 1679
1679 2966
2966 1838
1492 2064
2064 2991
2991 2187
2187 2184
2184 1647
1647 1492
2270 1821
1821 2707
2707 1693
1693...

output:

13
11
-34
62
-99
1
46
-8
8
111
-99
58
-70
-18
28
-16
-3
-5
-6
20
-99
34
-33
-15
69
44
42
-4
-54
16
10
-10
48
-48
16
32
-59
2
9
62
-34
-35
25
32
-50
71
-71
-16
120
-54
-50
44
4
-48
-56
56
-13
44
2
-33
28
-28
-34
0
89
-89
3
79
5
-102
25
45
-51
75
-8
-89
29
49
25
-51
-37
37
6
83
-89
84
-84
-53
53
-71
7...

result:

ok good one

Test #41:

score: 0
Accepted
time: 48ms
memory: 32832kb

input:

62947 193186
47519 44243
44243 11193
11193 10826
10826 8728
8728 6887
6887 10776
10776 59071
59071 42377
42377 51605
51605 3133
3133 52665
52665 62934
62934 47519
32298 17226
17226 35886
35886 31557
31557 57077
57077 12663
12663 59540
59540 26613
26613 28901
28901 22708
22708 16122
16122 40484
40484...

output:

257
2
63
-278
-3
2
-1
1
188
1
-273
2
39
-80
92
-1
-2
175
2
-76
13
-1
3
-289
1
398
-1
-362
255
-1
-1
2
17
-317
-2
-31
426
1
1
-368
333
-54
2
19
-2
-1
-1
-3
1
-307
-48
1
103
65
3
-1
3
2
-1
166
7
13
-74
-230
317
2
-319
52
-27
274
-3
-325
1
284
1
-1
4
-3
2
-190
234
51
-165
203
-176
-3
55
-1
2
2
-117
-3
...

result:

ok good one

Test #42:

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

input:

43480 191239
11155 10225
10225 43244
43244 1713
1713 14645
14645 27359
27359 23140
23140 18479
18479 6396
6396 28179
28179 19088
19088 42538
42538 36224
36224 27054
27054 19997
19997 23865
23865 29197
29197 25035
25035 32937
32937 32337
32337 14753
14753 14105
14105 33516
33516 36557
36557 24963
249...

output:

72
1
95
-17
-1
-181
123
-73
2
-3
-41
15
134
-59
81
-123
3
126
-162
170
-46
1
57
-113
211
-115
-33
-110
1
-2
2
118
-26
-3
-42
-87
-1
-2
16
104
114
-47
-3
-38
18
3
1
3
-181
2
-1
103
-1
-54
23
53
-18
37
73
-161
-1
-24
73
1
-91
-3
-3
27
3
-29
1
-194
125
-130
17
-3
110
35
89
-120
-3
-63
32
-74
84
81
1
-1...

result:

ok good one

Test #43:

score: 0
Accepted
time: 31ms
memory: 24848kb

input:

13758 193861
9734 10314
10314 10872
10872 1602
1602 7202
7202 13249
13249 11073
11073 6133
6133 6517
6517 1371
1371 6674
6674 5085
5085 11683
11683 6382
6382 13011
13011 5390
5390 4879
4879 8256
8256 11007
11007 9724
9724 10240
10240 8101
8101 5891
5891 4738
4738 10854
10854 11567
11567 8155
8155 49...

output:

-20
-1
85
-56
161
-119
-102
201
-62
-82
77
-76
-18
67
-97
-7
50
3
-50
106
-31
18
89
-189
1
15
1
79
5
-59
-94
117
-42
-10
-8
9
-67
152
-106
12
-29
-36
94
156
-169
-8
7
171
5
-63
-87
42
-33
21
14
-38
73
9
-92
64
-39
117
-248
13
156
-70
63
-57
-2
-43
57
-40
27
-2
42
19
-88
-22
192
-99
-43
-46
-40
44
-3...

result:

ok good one

Test #44:

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

input:

2576 198513
2007 2105
2105 1045
1045 2544
2544 1693
1693 142
142 1041
1041 809
809 2136
2136 1863
1863 2322
2322 849
849 2112
2112 857
857 1083
1083 638
638 1661
1661 226
226 548
548 2365
2365 56
56 1846
1846 811
811 742
742 1964
1964 1227
1227 1776
1776 916
916 907
907 195
195 1021
1021 1901
1901 4...

output:

-38
54
3
-38
13
28
-1
-10
3
-2
25
13
-63
0
32
-6
-6
3
14
-17
-20
49
-18
-16
8
40
-29
-16
43
-50
15
-23
63
-37
31
-64
17
23
-18
21
14
-50
28
-27
49
9
-36
21
-7
5
26
-38
-1
-6
25
-21
2
28
-46
50
-56
11
29
-1
-49
0
2
52
-41
-11
38
-16
-24
4
64
-63
36
-3
-33
2
28
43
-70
1
-4
9
62
-62
37
15
-56
18
64
-70...

result:

ok good one

Test #45:

score: 0
Accepted
time: 50ms
memory: 34700kb

input:

82644 198952
14369 38166
38166 8025
8025 74259
74259 20862
20862 21855
21855 23561
23561 33654
33654 19654
19654 65205
65205 50573
50573 28578
28578 9376
9376 48693
48693 45281
45281 15921
15921 78701
78701 30418
30418 46756
46756 45707
45707 70841
70841 22881
22881 57706
57706 32178
32178 69215
692...

output:

56
-239
1
3
-1
267
-325
3
78
-70
-3
318
1
-2
-237
11
-109
-75
-1
1
66
1
1
-1
153
-19
1
-1
1
213
3
-1
-369
-1
2
230
-1
-146
179
169
-1
-416
2
1
303
-1
2
-217
-163
158
128
1
-90
-1
-21
2
1
-2
1
138
2
-238
-106
553
-233
-88
-30
-3
-257
206
-3
373
-28
-551
-53
392
3
-320
2
-1
1
2
233
215
-1
-2
-209
178
...

result:

ok good one

Test #46:

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

input:

3066 190306
1738 2537
2537 1704
1704 1292
1292 1261
1261 1156
1156 2399
2399 2358
2358 1474
1474 560
560 415
415 2863
2863 1902
1902 1805
1805 369
369 1926
1926 379
379 1298
1298 39
39 2896
2896 2623
2623 2960
2960 1972
1972 372
372 346
346 1206
1206 790
790 66
66 231
231 2401
2401 1551
1551 720
720...

output:

1
51
-119
-5
63
19
-22
9
17
3
-13
4
27
-2
-101
71
-8
19
-26
41
-10
-15
29
-32
7
-5
6
38
-41
-42
46
-61
55
0
13
15
26
-52
53
-116
103
-134
115
13
11
-18
8
-43
0
-12
17
12
4
-77
22
20
57
9
-23
-35
23
-33
64
-36
8
-82
76
-14
8
4
-75
82
27
-99
129
-80
-4
10
32
-78
29
69
-42
-9
19
32
-37
27
-42
1
0
-9
43...

result:

ok good one

Test #47:

score: 0
Accepted
time: 37ms
memory: 32648kb

input:

62947 193186
47519 44243
44243 11193
11193 10826
10826 8728
8728 6887
6887 10776
10776 59071
59071 42377
42377 51605
51605 3133
3133 52665
52665 62934
62934 9355
9355 21865
21865 25494
25494 31300
31300 32398
32398 18242
18242 45820
45820 47445
47445 26114
26114 31067
31067 21478
21478 19558
19558 5...

output:

1
100
137
-71
-58
-1
52
-1
-1
-1
-44
123
-1
3
266
-2
-292
-3
34
3
-229
2
423
-324
112
-1
-1
-1
-71
-1
-1
-53
1
2
21
3
-1
-1
10
-1
3
-3
-1
20
84
276
-281
-3
45
-65
49
-1
-89
-103
91
3
-3
32
-36
-69
-2
3
-10
46
-2
116
-105
-2
63
1
-1
-59
3
-3
343
-334
50
-1
34
3
1
1
11
3
-65
-115
1
-2
1
164
2
86
3
-2
...

result:

ok good one

Test #48:

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

input:

43480 191239
11155 10225
10225 43244
43244 1713
1713 14645
14645 27359
27359 23140
23140 18479
18479 6396
6396 28179
28179 19088
19088 42538
42538 36224
36224 27054
27054 19997
19997 23865
23865 29197
29197 25035
25035 32937
32937 32337
32337 14753
14753 14105
14105 33516
33516 36557
36557 24963
249...

output:

-54
14
28
-27
132
-1
-114
49
54
-72
-89
5
52
-25
284
-3
-173
-1
-121
63
173
1
2
-145
-100
132
-109
-88
-1
108
-1
169
-112
-1
130
-133
-86
2
1
-1
-31
307
-226
-2
-3
-2
2
-3
28
-60
-2
86
-2
2
40
2
-144
59
-2
-96
3
-4
128
-3
-97
66
2
1
-28
-2
16
-1
-14
107
3
-3
-1
-174
189
3
-114
-3
262
-1
-349
2
224
-...

result:

ok good one

Test #49:

score: 0
Accepted
time: 33ms
memory: 30720kb

input:

44894 196108
9136 34157
34157 14616
14616 13372
13372 30799
30799 25932
25932 12847
12847 9656
9656 12309
12309 14718
14718 26967
26967 35141
35141 7851
7851 25591
25591 9544
9544 28866
28866 21085
21085 41045
41045 36348
36348 21752
21752 23669
23669 839
839 7252
7252 28433
28433 16461
16461 36184
...

output:

3
44
-131
150
-72
170
-286
34
229
3
-90
1
-1
0
-189
3
-3
267
-234
-25
27
149
-108
1
-12
116
-108
3
-2
-1
180
-8
-230
43
-1
-3
3
249
-259
-39
-3
1
24
-3
1
49
24
-39
49
3
-2
-47
-11
-66
321
1
-296
-1
163
-98
1
103
-8
-102
3
-1
-20
43
50
34
82
-187
-1
-2
-64
2
64
101
-152
166
-3
3
1
-178
34
148
-169
-2...

result:

ok good one

Test #50:

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

input:

88238 193852
77052 68192
68192 77813
77813 39146
39146 45801
45801 665
665 76961
76961 85198
85198 78074
78074 67590
67590 52330
52330 5738
5738 48259
48259 87814
87814 28365
28365 77083
77083 67906
67906 38325
38325 53288
53288 7728
7728 74011
74011 80072
80072 29963
29963 28230
28230 9749
9749 139...

output:

229
-2
-192
-2
-1
-34
-16
-3
169
1
3
-93
1
-99
-1
-2
106
-1
3
1
2
2
1
1
-2
-1
-3
3
-3
325
-2
-343
-3
35
134
-1
-73
1
-3
-109
-1
-2
1
2
1
3
-3
21
-2
-13
-3
188
-2
1
101
-194
-2
-1
-2
3
-1
-156
-1
1
1
-2
2
20
-3
-2
3
-1
67
-3
3
180
-1
-247
203
-200
353
2
-168
-104
3
-3
3
1
2
3
-1
-2
1
-63
21
-3
-2
-1
...

result:

ok good one

Test #51:

score: 0
Accepted
time: 45ms
memory: 34588kb

input:

57117 191812
8343 12597
12597 45223
45223 2159
2159 52976
52976 48490
48490 25963
25963 32595
32595 30306
30306 5149
5149 26914
26914 9456
9456 15655
15655 45190
45190 26814
26814 45052
45052 24030
24030 5561
5561 52213
52213 55549
55549 39706
39706 36036
36036 48171
48171 45129
45129 8329
8329 4025...

output:

55
-1
2
-475
362
-180
-56
2
-31
18
-2
-3
69
-3
304
3
2
-470
347
-42
-208
-1
2
6
217
1
183
-500
-2
-2
-1
250
21
-296
-3
-3
1
-3
2
-1
1
44
2
2
-3
-33
3
-1
-1
299
185
1
-1
-465
2
2
1
-3
47
-1
-69
2
112
2
225
201
-33
-399
-19
-41
-1
-3
57
429
-486
3
1
5
-2
2
37
319
-252
-126
44
176
0
248
3
-212
38
-277
...

result:

ok good one

Test #52:

score: 0
Accepted
time: 24ms
memory: 27736kb

input:

13758 193861
9734 10314
10314 10872
10872 1602
1602 7202
7202 13249
13249 11073
11073 6133
6133 6517
6517 1371
1371 6674
6674 9734
159 2254
2254 7254
7254 5821
5821 11128
11128 6031
6031 3478
3478 5563
5563 7930
7930 2631
2631 11373
11373 12517
12517 4714
4714 7234
7234 11563
11563 4160
4160 460
460...

output:

-165
55
-76
167
-132
146
-126
-33
203
-212
173
-144
179
-220
55
153
-210
110
-98
28
-47
49
6
-2
1
-3
117
65
-233
235
-250
23
-6
2
36
177
6
-208
-11
149
-122
128
-121
5
161
-120
82
-140
-2
-2
-20
169
-36
-135
170
-53
49
10
-165
19
182
-137
-51
-50
272
-2
-45
-82
-78
93
-65
-73
217
-37
-43
-95
-14
-3
...

result:

ok good one

Test #53:

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

input:

2576 198513
2007 2105
2105 1045
1045 2007
138 159
159 864
864 1461
1461 471
471 2279
2279 373
373 730
730 2510
2510 1397
1397 2387
2387 1405
1405 1129
1129 2343
2343 138
2198 431
431 1468
1468 1549
1549 828
828 1567
1567 1536
1536 1690
1690 214
214 1921
1921 2021
2021 1632
1632 1368
1368 1301
1301 1...

output:

31
1
-32
13
53
-64
33
-15
-5
18
7
-9
-20
14
9
-26
-8
2
-20
12
-6
-56
33
9
-44
8
-3
2
-12
13
-3
35
16
-18
13
-54
59
-25
6
-29
36
-20
24
-28
50
55
-26
30
-36
-33
53
6
-13
-28
50
-43
50
-79
-18
35
33
-37
-12
37
-30
-11
61
-10
26
-68
8
54
16
-64
42
-56
0
-3
31
-20
49
5
-42
-13
33
-27
-5
15
29
-38
30
-16...

result:

ok good one

Test #54:

score: 0
Accepted
time: 56ms
memory: 36952kb

input:

82644 198952
14369 38166
38166 8025
8025 74259
74259 20862
20862 21855
21855 23561
23561 33654
33654 19654
19654 65205
65205 50573
50573 28578
28578 9376
9376 48693
48693 45281
45281 15921
15921 78701
78701 30418
30418 46756
46756 45707
45707 70841
70841 22881
22881 57706
57706 32178
32178 69215
692...

output:

-1
-72
13
381
-3
-3
-1
-1
-321
-180
181
7
-1
2
-2
-18
-18
74
1
1
-3
-170
2
1
2
-1
473
-3
-328
47
3
-1
-2
121
-52
-28
1
-95
-30
-1
-54
137
3
-129
-1
-2
1
117
-165
129
3
-42
-53
3
2
1
3
62
197
-3
1
-246
115
-124
-3
95
-3
-1
-1
3
-3
-3
27
15
-101
3
1
3
-17
112
1
-82
91
257
-1
-1
-308
-11
2
1
-120
-2
23...

result:

ok good one

Test #55:

score: 0
Accepted
time: 27ms
memory: 24580kb

input:

3066 190306
1738 2537
2537 1704
1704 1292
1292 1261
1261 1156
1156 2399
2399 2358
2358 1474
1474 560
560 415
415 2863
2863 1902
1902 1805
1805 369
369 1926
1926 379
379 1298
1298 39
39 2896
2896 2623
2623 2960
2960 1972
1972 372
372 346
346 1206
1206 790
790 66
66 231
231 2401
2401 1551
1551 720
720...

output:

-44
66
-27
-38
12
35
-6
-27
3
70
-99
64
1
-1
-48
6
-9
16
42
-44
64
-33
12
-20
-35
71
-22
9
-33
11
-5
19
-28
34
-46
56
-62
42
-8
3
31
-65
-16
7
47
-34
5
45
-28
9
39
-11
-74
44
-37
10
15
12
36
-33
23
-70
10
40
7
-53
13
43
-15
-28
72
-72
42
-17
-2
44
-32
-4
10
-10
-40
35
22
-12
-41
9
69
-75
-8
73
-73
2...

result:

ok good one

Test #56:

score: 0
Accepted
time: 44ms
memory: 32724kb

input:

62947 193186
47519 44243
44243 11193
11193 10826
10826 8728
8728 6887
6887 10776
10776 59071
59071 42377
42377 51605
51605 3133
3133 52665
52665 62934
62934 9355
9355 21865
21865 25494
25494 31300
31300 32398
32398 18242
18242 45820
45820 47445
47445 26114
26114 31067
31067 21478
21478 19558
19558 5...

output:

282
-213
-122
-1
61
-2
59
-164
94
2
-61
82
84
3
2
-79
-41
1
424
-1
-1
-1
3
-36
-378
79
-3
-2
149
-315
297
3
224
1
-429
92
-150
-38
114
310
-425
52
2
265
-189
-2
-3
153
-142
3
2
2
2
3
1
-41
-1
-3
17
-82
1
298
4
-17
-270
-2
1
-1
-2
2
109
-97
-2
2
465
24
-1
3
-457
1
87
-1
72
-1
-175
97
158
-357
-2
122
...

result:

ok good one

Test #57:

score: 0
Accepted
time: 35ms
memory: 30768kb

input:

43480 191239
11155 10225
10225 43244
43244 1713
1713 14645
14645 27359
27359 23140
23140 18479
18479 6396
6396 28179
28179 19088
19088 42538
42538 36224
36224 27054
27054 19997
19997 23865
23865 29197
29197 25035
25035 32937
32937 32337
32337 14753
14753 14105
14105 33516
33516 36557
36557 24963
249...

output:

255
244
-369
-212
1
587
-36
-251
2
2
-271
70
347
-1
-284
-2
-126
-24
263
314
1
-424
293
-411
2
380
-372
520
-2
2
-226
-172
370
-426
422
-1
-2
40
1
-1
-423
393
1
32
8
-534
2
1
-81
337
259
1
1
-3
-515
521
2
-396
24
-2
1
-110
22
197
-306
583
3
-216
-3
-1
-2
-1
1
1
-2
3
2
-215
428
-1
-426
372
-435
2
1
1...

result:

ok good one

Test #58:

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

input:

44894 196108
9136 34157
34157 14616
14616 13372
13372 30799
30799 25932
25932 12847
12847 9656
9656 12309
12309 14718
14718 26967
26967 35141
35141 7851
7851 25591
25591 9544
9544 28866
28866 21085
21085 41045
41045 36348
36348 21752
21752 23669
23669 839
839 7252
7252 28433
28433 16461
16461 36184
...

output:

6
-414
-2
-38
27
1
449
16
-1
-426
-3
2
1
-60
90
-1
397
-526
-3
214
-30
537
-702
2
2
569
1
-1
-443
-1
19
2
-111
148
-3
3
10
457
-675
-7
-3
2
599
-7
106
1
-150
-395
132
-167
-1
2
1
589
-466
1
348
-606
319
397
-3
-1
-3
-398
301
3
-6
2
-3
-80
-278
-36
276
-307
521
9
-564
-63
-82
57
451
-420
94
566
3
-81...

result:

ok good one

Test #59:

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

input:

88238 193852
77052 68192
68192 77813
77813 39146
39146 45801
45801 665
665 76961
76961 85198
85198 78074
78074 67590
67590 52330
52330 5738
5738 48259
48259 87814
87814 28365
28365 77083
77083 67906
67906 38325
38325 53288
53288 7728
7728 74011
74011 80072
80072 29963
29963 28230
28230 9749
9749 139...

output:

271
-1
1
28
2
-89
-97
1
-317
-56
-3
-1
1
327
252
-1
-550
1
-2
546
-192
3
-3
-1
168
-202
43
108
2
-15
-559
3
2
3
64
-3
3
362
3
1
3
3
1
1
141
1
1
12
1
-2
-2
-2
-1
-672
49
649
-488
595
-165
-453
1
561
-2
-619
3
-1
-2
467
3
-2
-3
-1
-1
-1
-1
-2
-468
673
-648
595
1
3
1
-1
2
3
-1
-29
-3
3
26
1
3
-59
-332
...

result:

ok good one

Test #60:

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

input:

57117 191812
8343 12597
12597 45223
45223 2159
2159 52976
52976 48490
48490 25963
25963 32595
32595 30306
30306 5149
5149 26914
26914 9456
9456 15655
15655 45190
45190 26814
26814 45052
45052 24030
24030 5561
5561 52213
52213 55549
55549 39706
39706 36036
36036 48171
48171 45129
45129 8329
8329 4025...

output:

1
1
-1
-95
-1
-72
591
-2
-481
-58
1
-2
291
3
-1
-158
1
433
-653
2
354
-259
76
1
350
-248
-2
383
-508
597
-133
117
-589
1
1
1
578
3
1
-606
2
30
-1
1
-106
158
234
3
186
1
-599
695
3
3
-2
1
-3
-77
-1
-1
-3
-1
-1
2
-655
130
2
-3
12
410
185
-1
-671
470
207
-612
631
1
-1
1
-137
-490
394
-289
416
-295
280
...

result:

ok good one