QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#103323#5008. Zero AAMP CurrentsjoesmittyAC ✓58ms5476kbC++203.2kb2023-05-05 10:43:592023-05-05 10:44:03

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-05 10:44:03]
  • 评测
  • 测评结果:AC
  • 用时:58ms
  • 内存:5476kb
  • [2023-05-05 10:43:59]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef vector<int> vi;
typedef vector< vector <int> > vvi;
typedef pair<int, int> pii;
typedef pair < pair < int, int >, int > piii;
typedef pair < pair <int, int > , pair <int, int> > piiii;
typedef pair<ll, ll> pll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
 
#define FOR(i,a,b) for(int i = a; i < b; i ++)
#define RFOR(i,a,b) for(int i = a-1; i >= b; i --)
#define all(a) a.begin(), a.end()
#define endl '\n';
#define sz(x) (int)(x).size()
 
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
 
template <typename T>
void pr(vector<T> &v) {
    FOR(i, 0, sz(v)) cout << v[i] << " ";
    cout << endl;
}
template <typename T>
void pr(vector<vector<T> > &v) {
    FOR(i, 0, sz(v)) { pr(v[i]); }
}
template <typename T>
void re(T &x) {
    cin >> x;
}
template <typename T>
void re(vector<T> &a) {
    FOR(i, 0, sz(a)) re(a[i]);
}
template <class Arg, class... Args>
void re(Arg &first, Args &... rest) {
    re(first);
    re(rest...);
}
template <typename T>
void pr(T x) {
    cout << x << endl;
}
template <class Arg, class... Args>
void pr(const Arg &first, const Args &... rest) {
    cout << first << " ";
    pr(rest...);
    cout << endl;
}
void ps() { cout << endl; }
template<class T, class... Ts>
void ps(const T& t, const Ts&... ts) {
    cout << t; if (sizeof...(ts)) cout << " "; ps(ts...);
}
 
const ll MOD  =  1000000007;
#define inf 1e18;
#define INF INT_MAX;

long double PI = 4*atan(1);
long double eps = 1e-12;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//default_random_engine g{1};

int main() {
    //auto start = chrono::high_resolution_clock::now();
    ios_base::sync_with_stdio(0);cin.tie(0);
    // ofstream cout("pieaters.out");
    // ifstream cin("pieaters.in");
    #ifdef DEBUG
      freopen("input.txt", "r", stdin);
      freopen("output.txt", "w", stdout);
    #endif 
    

    int n,m; cin >> n >> m;
    vector<pii> e(m);
    vi deg(n);
    FOR(i,0,m) {
        cin >> e[i].ff >> e[i].ss;
        e[i].ff--; e[i].ss--;
        deg[e[i].ff]++;
        deg[e[i].ss]++;
    }
    bool good = false;
    vi ass(n);
    

    FOR(i,0,n) {
        int k = uniform_int_distribution<ll>(0,1000)(rng);
    }
    int cnt = 0;
    while(!good) {
        
        good = true;
        FOR(i,0,m) {
            if(ass[e[i].ff] == ass[e[i].ss]) {
                good = false;
                if(deg[e[i].ff] < deg[e[i].ss]) {
                    ass[e[i].ff] = uniform_int_distribution<ll>(0,1000)(rng);
                } else {
                    ass[e[i].ss] = uniform_int_distribution<ll>(0,1000)(rng);
                }
            }
        }
        cnt ++;
        
    }
    // cout << cnt << endl;
    

    

    FOR(i,0,m) {
        cout << ass[e[i].ff] - ass[e[i].ss] << endl;
    }


    // auto stop = chrono::high_resolution_clock::now();
    // auto duration = chrono::duration_cast<chrono::microseconds>(stop - start);
    // cout << duration.count() << endl;
    //cin.close();
    //cout.close();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3388kb

input:

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

output:

-224
-11
235
-931
-707
-931
11

result:

ok good one

Test #2:

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

input:

2 2
1 2
2 1

output:

-983
983

result:

ok good one

Test #3:

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

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:

179
-25
9
79
-11
-722
715
-279
-583
440
403
723
-187
-234
-1
640
110
29
398
619
242
-25
717
441
665
240
-272
-192
-758
-165
-513
412
221
680
443
-172
-306
-422
-199
-434
945
-134
147
-491
203
-637
-487
-162
-258
-40
413
294
65
91
-406
-358
-72
-19
729
216
-315
187
-68
430
-92
5
391
621
-119
216
186
...

result:

ok good one

Test #4:

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

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:

415
398
-146
232
-586
-512
-531
399
-7
-320
595
-648
681
540
-28
490
-780
51
-351
694
182
22
414
-209
199
4
486
-383
-747
351
-145
-321
441
-837
213
101
-254
-167
-514
228
608
56
689
-247
-312
172
-298
-132
89
-90
722
115
-287
-88
349
211
-541
423
-545
-50
153
-618
114
-85
-24
36
-640
210
-400
-111
...

result:

ok good one

Test #5:

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

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:

-726
751
-259
482
-675
176
632
642
-563
520
-339
861
40
516
861
-192
165
-406
246
-787
221
-124
-589
-660
281
391
234
-767
515
-671
-921
-387
468
421
558
-497
205
909
805
-647
500
882
24
799
383
-14
-810
513
-61
-628
822
149
610
-770
623
146
630
167
375
-331
70
153
-118
410
296
389
125
-353
378
70
-...

result:

ok good one

Test #6:

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

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:

252
-122
-489
-893
-490
619
-407
607
-75
86
-394
473
-186
-600
21
249
-8
-499
-35
373
-361
463
817
647
129
117
-212
-572
-538
-793
869
-848
398
474
50
164
405
-193
-49
134
-12
22
-401
-935
547
214
38
-647
-630
167
497
-627
170
937
-270
-28
-494
188
746
-557
22
260
449
155
-628
-681
-190
-102
37
236
...

result:

ok good one

Test #7:

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

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:

580
-653
784
394
766
-165
-428
375
-69
700
-433
148
-201
117
-444
-807
139
830
385
-88
-861
-107
821
-360
-433
-806
239
151
-903
-282
-507
216
380
-674
-67
-567
-660
-743
230
-797
566
-84
964
236
-23
114
5
886
327
925
-859
156
-679
-824
441
-437
679
189
4
588
262
560
10
-154
-282
198
-624
427
365
-2...

result:

ok good one

Test #8:

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

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:

-21
12
307
697
-537
-224
-870
576
79
174
-474
521
290
118
-512
860
-443
-761
228
-172
-177
592
-30
17
-180
782
-179
135
-146
124
-288
414
-61
11
975
684
767
-189
-74
555
-793
911
760
94
-82
402
-702
-106
-348
54
-366
137
415
253
-81
303
-180
-380
-418
-393
-555
480
-623
-752
-380
-999
107
614
313
-5...

result:

ok good one

Test #9:

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

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:

536
11
-96
-317
-376
-375
-537
-757
-656
-86
536
329
247
-163
-698
497
199
-80
125
-451
191
-529
337
428
-363
22
-367
58
223
146
114
-16
27
-448
588
-327
-343
-609
423
191
250
225
730
314
385
-346
465
-70
943
197
-71
862
-2
-514
-876
-849
140
-337
523
544
408
-208
578
85
527
-316
-383
-520
-337
-160...

result:

ok good one

Test #10:

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

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:

-389
158
284
-350
-232
208
-314
413
-126
-634
-226
-185
105
130
-352
50
252
171
-473
-414
154
-540
91
251
-723
-328
367
607
938
162
544
106
-987
451
-102
-208
-720
110
-39
565
461
-300
169
200
-712
-439
-403
1
296
233
-164
-323
-292
-150
213
871
56
579
121
-603
260
-953
10
-328
91
108
116
-407
316
9...

result:

ok good one

Test #11:

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

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:

-511
-226
-35
409
897
-222
662
-248
-229
-93
262
914
783
-87
207
-340
680
78
211
88
-914
-97
354
-172
488
-458
187
443
333
370
-430
426
-486
375
-718
-554
-453
-373
255
-255
-377
-298
840
26
120
-202
669
-65
-822
99
-595
-405
-337
280
-122
567
511
-626
111
-245
29
272
-650
-278
90
367
-675
524
688
-...

result:

ok good one

Test #12:

score: 0
Accepted
time: 34ms
memory: 4940kb

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:

300
-344
350
-85
-692
-532
-181
-28
-31
503
-375
-604
-403
556
486
429
-86
-87
177
-100
-944
-645
-193
-805
759
329
-21
632
-318
-319
160
250
98
143
152
-178
-335
421
112
-406
435
279
-248
-689
176
80
616
680
977
-568
299
-674
-415
308
-222
46
90
302
-403
570
-653
293
-230
874
838
-16
185
270
429
-1...

result:

ok good one

Test #13:

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

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:

-96
432
-258
583
-177
-250
-935
-301
9
161
-674
559
-929
-332
-104
573
-62
-401
358
80
75
225
-355
782
78
-283
-349
-153
-119
-815
-269
-109
-354
-32
12
288
193
6
91
-555
397
75
710
101
658
198
-652
-790
-614
221
315
-680
-44
376
604
312
-97
-121
-625
360
-636
-598
6
-542
948
-254
359
-883
-54
167
-...

result:

ok good one

Test #14:

score: 0
Accepted
time: 26ms
memory: 4884kb

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:

-151
-486
-86
-636
-214
-288
586
331
-636
-719
154
161
411
-123
187
76
183
269
-516
692
156
215
400
44
509
-780
209
579
-79
-589
924
-81
269
119
-129
702
-198
94
-265
-540
-246
-798
-296
72
584
-292
-427
-227
-519
-680
-476
615
323
-409
-188
-258
-308
13
381
419
289
-498
-772
-95
96
270
329
683
-382...

result:

ok good one

Test #15:

score: 0
Accepted
time: 51ms
memory: 5004kb

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:

-217
375
-468
-174
-186
112
508
-22
-275
72
-250
-209
724
-251
-116
-907
-195
-736
267
-97
-418
-22
134
516
218
263
-386
-502
284
266
-353
-542
482
484
-190
235
-131
703
-58
698
14
-593
-353
-208
-701
-223
204
-13
327
700
187
-26
-763
30
266
-258
86
445
-11
-386
-8
-437
-459
140
-533
-496
-472
90
-9...

result:

ok good one

Test #16:

score: 0
Accepted
time: 39ms
memory: 5392kb

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:

372
-610
-170
268
-56
650
-694
466
154
-873
-565
60
110
645
-335
707
893
-291
-9
-335
-746
-945
517
-247
610
-684
-133
-308
29
315
-538
278
495
668
-827
-447
-594
-18
394
-873
13
-204
9
41
741
676
-20
39
108
-44
303
-215
788
-736
-714
368
337
-135
-56
-467
-819
-413
-560
-76
223
-962
-580
512
-211
-...

result:

ok good one

Test #17:

score: 0
Accepted
time: 46ms
memory: 5360kb

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:

-579
407
189
-222
493
-652
516
-332
-603
-42
-590
-611
-243
865
303
-123
-728
-331
-481
-541
103
-539
120
-370
458
-253
-499
-20
725
-443
-586
335
-306
43
-366
519
242
-619
102
600
590
-478
-73
-148
105
-597
-310
-348
-309
-304
630
78
-730
-688
-67
-567
570
-740
-68
450
126
72
-86
-562
-121
72
106
2...

result:

ok good one

Test #18:

score: 0
Accepted
time: 34ms
memory: 4968kb

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:

707
441
-587
800
-407
-397
426
341
-716
384
272
-2
23
209
-373
-658
-261
689
-363
877
-127
399
8
779
-179
-342
-714
-206
-939
-294
838
49
575
-893
632
594
-825
686
680
320
760
181
-317
706
352
278
538
349
-523
244
-289
68
275
-618
-261
224
-220
-276
-595
512
555
745
-530
-176
515
-257
148
-203
-765
...

result:

ok good one

Test #19:

score: 0
Accepted
time: 43ms
memory: 5356kb

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:

630
15
-133
506
437
933
-91
244
-356
606
718
708
913
506
165
-128
416
-85
-211
957
47
-533
226
-354
298
-220
-141
-741
-261
682
420
-319
-414
-280
-4
719
468
208
-723
-184
-92
297
883
-289
533
669
-108
674
271
-756
203
-54
986
-723
-82
45
684
197
-580
759
-54
58
-156
-460
964
137
-621
342
17
-136
-4...

result:

ok good one

Test #20:

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

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:

34
-168
-486
216
-233
-461
-314
677
-851
-331
-253
222
749
576
-112
846
719
861
629
-748
-116
-384
-147
-664
120
-632
-89
136
742
295
16
336
-889
550
-26
459
-295
270
472
444
-34
-420
539
848
-37
718
-402
-704
635
247
-65
531
800
-210
-320
-129
281
612
-735
121
269
173
-170
-14
611
-527
-17
832
680
...

result:

ok good one

Test #21:

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

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:

-264
673
-287
-542
-223
-150
845
-81
416
559
178
-26
-462
849
-91
-574
-710
610
-340
-436
469
870
-117
872
-303
-921
-587
-160
413
-414
-923
-455
-858
524
-98
863
-84
-68
-172
61
73
-861
401
-127
210
538
-61
189
86
225
150
331
-867
98
-261
165
-24
316
606
-748
-611
633
-465
51
-348
-751
-93
82
-97
2...

result:

ok good one

Test #22:

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

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:

-300
-882
-395
-39
-310
632
-711
-153
-9
529
67
-620
-189
-19
-325
55
-80
-216
310
-105
-3
-817
-13
292
-105
-468
-115
-504
-553
405
-15
586
-284
205
-299
-511
380
166
758
-239
101
-452
307
-140
295
73
-927
369
-995
156
-389
-600
-860
-49
-64
769
893
-859
774
336
-43
35
2
702
324
33
530
-572
-372
-2...

result:

ok good one

Test #23:

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

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:

372
-967
850
451
5
547
525
-471
-374
-525
-818
-542
109
-354
-108
899
688
898
304
-289
56
-115
406
884
-63
145
147
-704
30
214
-988
23
-349
786
-209
-197
-341
741
-419
-425
313
-488
159
74
422
-709
628
-159
35
-6
-29
875
22
-99
-177
-414
-850
715
-490
155
676
-283
338
155
-205
-78
-83
-419
-68
671
-...

result:

ok good one

Test #24:

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

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:

-43
65
435
104
-895
-851
-414
61
-49
-766
-662
246
-503
731
-165
-29
-365
-604
-92
389
-242
259
479
-732
238
585
-551
-243
68
-681
-276
479
-824
-223
-798
-563
-953
-488
144
21
224
-871
134
-912
-119
931
-324
-202
-320
-871
-494
-970
-351
67
-84
-419
-761
179
563
-116
-247
-316
-164
-934
690
-661
65...

result:

ok good one

Test #25:

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

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:

-909
322
350
160
221
-296
63
-383
-483
183
636
371
433
123
-325
-149
-142
518
316
-450
-97
179
220
-389
451
-226
910
-118
-565
-325
673
499
-359
-575
92
-317
-144
-467
304
540
-182
668
798
-33
-401
460
314
669
-483
-536
-772
-687
-609
196
-745
397
347
804
-55
-100
205
-829
172
-175
532
163
686
419
3...

result:

ok good one

Test #26:

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

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:

593
458
-621
-467
54
65
-863
487
324
538
-537
-475
537
-287
99
678
-99
563
-686
375
-849
-254
-379
-565
191
-669
747
173
-548
-855
-626
-434
-432
367
-793
359
-402
375
479
-391
-635
362
353
-194
-71
834
407
170
958
526
-970
-159
-366
-468
-275
546
-863
38
-187
-229
687
-106
881
-91
-183
-66
412
607
...

result:

ok good one

Test #27:

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

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:

-335
-854
132
-219
-947
111
-178
238
-70
199
939
-949
117
-734
-211
-901
-912
721
-69
166
20
12
561
-275
-684
-327
654
-986
-390
-71
-276
322
-535
-696
-485
42
928
246
759
-230
-462
-540
517
-752
254
170
-860
288
250
703
88
-993
564
362
-966
115
406
237
501
62
-766
-650
556
220
328
228
740
-284
-374...

result:

ok good one

Test #28:

score: 0
Accepted
time: 34ms
memory: 4944kb

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:

275
157
-152
-779
543
381
-885
101
791
-728
625
-860
903
-441
-223
390
312
-755
115
203
-254
-73
379
-436
402
-110
226
-512
691
104
-636
341
-59
-412
-10
786
-249
-357
608
-745
296
17
118
344
-577
-23
-237
277
-410
406
-93
-303
231
726
-969
266
-154
264
-227
810
-471
-452
337
-395
449
-39
-219
204
6...

result:

ok good one

Test #29:

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

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:

-5
27
-204
-251
-479
790
-174
-52
-410
736
-165
-721
-25
169
319
-228
91
505
-739
746
-861
400
-148
258
-259
151
-180
656
-330
-425
172
-195
490
113
137
-32
-723
457
23
-105
-255
580
-764
237
530
-595
500
-424
-283
867
-5
-441
105
-200
456
174
-538
157
128
59
-352
-266
499
-604
763
-143
-590
887
-92...

result:

ok good one

Test #30:

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

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:

-879
413
245
221
-177
-271
-321
321
448
-197
-203
98
48
47
-12
219
-19
-671
338
19
-645
978
-627
-367
515
4
-25
-139
-108
725
-517
539
-56
56
-251
251
-868
217
322
-422
751
-891
260
155
372
-189
293
-654
226
201
-491
480
-210
359
89
-778
493
-65
350
-204
-570
774
-461
355
-704
810
-139
34
105
-457
-...

result:

ok good one

Test #31:

score: 0
Accepted
time: 39ms
memory: 4624kb

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:

-298
409
-194
-111
-108
207
492
-721
-130
895
-563
102
456
-933
774
-411
296
77
-129
-528
464
302
-499
-245
226
-105
578
-277
-154
-286
687
-482
175
97
-498
226
-7
35
141
-188
-94
200
-226
269
104
183
48
45
-474
76
-377
-3
713
-666
315
433
34
-397
514
-568
578
-419
422
-375
-510
-89
463
271
13
-591
...

result:

ok good one

Test #32:

score: 0
Accepted
time: 43ms
memory: 5100kb

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:

-316
-57
-168
110
93
-261
616
-942
107
160
55
-183
160
636
7
-674
599
-605
680
-562
-142
634
-32
-455
-159
-115
149
-69
751
-353
308
-426
428
-217
-635
377
315
203
-35
-145
-208
-548
378
558
-865
845
-640
660
-443
357
-874
960
-239
138
-627
614
-405
519
-788
788
-418
418
-989
740
-24
-52
63
262
-296...

result:

ok good one

Test #33:

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

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:

-19
-45
136
129
418
-68
-373
-230
-25
-256
455
497
-507
282
-511
334
402
-493
55
-343
521
-344
-194
282
450
-422
-344
498
334
-118
-110
-147
-621
996
-995
110
342
54
489
-953
953
-804
126
-304
402
342
-752
614
116
-208
-203
-125
31
546
219
-528
-357
594
182
-130
-730
737
-331
518
45
-227
-422
-234
7...

result:

ok good one

Test #34:

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

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:

-280
612
-284
605
-251
171
128
-790
-169
200
560
-196
-139
-275
809
-187
-496
590
-329
422
-848
265
166
417
-20
14
-274
197
-118
141
-717
588
-125
243
-196
267
-433
-461
261
633
-375
-605
95
504
-323
-273
114
-90
915
-308
-210
-119
429
-248
174
-653
973
-712
385
301
-454
-406
714
-207
204
-744
659
1...

result:

ok good one

Test #35:

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

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:

392
-152
-794
629
249
62
-463
343
126
-991
835
-236
-127
-473
95
235
173
-377
859
-9
-487
-271
774
-128
-504
-21
186
467
-856
-48
631
273
-435
-454
889
-58
-874
-31
963
-756
756
-913
301
464
-605
265
-257
745
-194
59
-669
348
-14
470
-228
228
-946
293
174
479
-557
557
-539
539
-484
-482
563
124
-79
...

result:

ok good one

Test #36:

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

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:

-77
655
144
-770
-94
373
14
380
87
-734
-247
350
341
-328
-42
581
-47
142
-232
-365
339
-391
598
-236
-639
624
105
156
-390
-498
461
468
-481
46
-251
87
524
-682
203
500
-95
-837
267
-37
717
-509
548
-89
-98
-487
107
398
-752
662
-504
-70
670
60
-248
-433
784
-388
-95
-92
-55
415
-575
261
-88
97
520...

result:

ok good one

Test #37:

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

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:

246
-246
149
-277
40
-304
462
162
-654
451
295
38
-64
-264
-246
212
-499
491
-417
711
-261
195
135
-759
651
-333
-447
828
-828
299
113
53
179
58
-169
-572
438
-479
-133
326
-323
-20
176
542
68
-89
-297
-374
44
124
111
484
-614
-134
297
239
-5
-455
474
285
-505
-232
624
597
-547
-14
371
-61
28
-349
7...

result:

ok good one

Test #38:

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

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:

-175
175
32
395
32
-103
401
-757
-124
285
-94
27
-94
-71
-41
56
-90
-230
-221
597
-807
630
177
-406
3
403
541
-8
-8
-525
317
-407
90
59
-59
-175
27
-41
338
-609
460
644
-270
-270
-104
462
59
-521
541
-541
-174
-473
926
-279
-506
280
226
700
-700
308
-85
134
-69
-288
-146
221
272
-331
628
-175
-352
1...

result:

ok good one

Test #39:

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

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:

-657
493
-479
-345
599
389
-224
-571
-142
-14
906
45
-468
165
-576
879
885
-692
72
634
-874
116
216
-314
513
343
-79
-141
-314
266
-630
332
260
-471
777
-530
-358
281
-184
177
-69
379
304
-579
-61
573
67
-96
96
-625
312
-74
-140
106
421
-514
65
-460
133
776
-361
361
-5
-963
941
-902
105
27
223
-364
...

result:

ok good one

Test #40:

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

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:

-425
656
-213
200
-590
516
-144
-758
758
-101
-178
514
-235
367
-313
401
-549
442
-104
-244
776
-414
-539
400
183
-406
561
21
-163
-419
-584
584
77
-77
267
-773
597
-196
105
37
-567
185
623
-374
96
-308
308
-79
25
-541
595
87
-554
467
-98
98
442
171
-677
64
-61
61
203
383
130
131
-779
295
356
178
-2...

result:

ok good one

Test #41:

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

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:

99
-757
202
-334
889
-498
498
-431
431
-367
-534
88
714
-260
892
-194
154
-106
-204
94
-628
308
233
-79
72
-284
-16
-153
803
-239
-341
61
519
-996
678
-184
215
171
-357
212
-192
-463
465
426
-804
395
-469
557
-455
-170
354
607
-553
319
-174
385
-79
-197
-8
-43
142
-540
614
-216
-307
-212
115
-176
29...

result:

ok good one

Test #42:

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

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:

285
-613
-15
30
598
-428
-453
815
-363
167
36
-292
-225
283
131
-242
-11
236
265
-276
-520
804
-698
34
283
145
-464
69
704
-258
220
-143
-189
370
-616
-154
-6
240
536
-283
-231
-72
520
-754
49
643
-611
90
185
-494
107
16
238
-368
965
-511
166
-615
249
711
-430
384
-169
-634
849
-718
643
-315
105
246...

result:

ok good one

Test #43:

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

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:

-357
997
-234
-377
421
29
-278
-409
848
-197
-76
-125
134
98
-703
285
-1
-176
-194
26
168
157
139
-493
269
-243
321
35
486
-552
607
-295
198
-385
257
-22
-292
-208
-162
117
517
-277
-31
618
-16
-332
182
95
-820
107
509
-348
-250
514
220
108
-558
-273
629
136
-716
755
-729
-156
333
-302
688
144
-475
...

result:

ok good one

Test #44:

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

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:

-156
945
-878
289
92
-356
844
-115
-356
-14
-203
139
177
-370
563
-77
-91
75
223
-625
152
-66
521
-32
-149
-279
-178
132
-117
587
-501
-325
644
-110
-192
-135
-41
167
-44
507
-528
313
181
-174
-584
827
-824
645
50
-281
333
53
-848
545
-133
-164
110
288
-644
826
-135
117
-19
-407
500
-356
-468
820
-6...

result:

ok good one

Test #45:

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

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:

-232
97
-257
392
-121
-632
322
427
4
-724
-2
128
-151
618
-130
261
-934
305
420
-735
834
110
-54
-52
-339
288
-116
-302
-93
-315
752
231
-681
681
-798
798
-385
-422
143
42
622
-928
402
226
213
-6
93
-733
16
612
75
-99
-668
542
-98
15
-353
249
-340
247
-85
-247
842
-846
-96
967
-446
-22
104
-126
-78
...

result:

ok good one

Test #46:

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

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:

-659
-62
32
71
296
269
-366
-35
-268
230
278
-389
-201
995
-652
592
-525
-321
453
-112
-319
505
-282
300
31
182
-597
18
371
-463
817
-211
-400
555
-506
-99
475
-346
235
-508
41
419
-639
502
382
-231
195
9
-859
74
22
760
-567
2
-14
-204
558
-326
407
-187
451
-47
-101
-565
-105
168
394
-263
264
-106
9...

result:

ok good one

Test #47:

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

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:

651
-588
348
-184
318
-549
835
-865
-121
659
94
-138
-615
354
632
-61
-885
607
339
-620
311
105
-83
-100
-444
251
180
-355
755
-421
-204
111
-427
707
-698
789
-721
864
-754
61
-99
80
120
592
-237
-607
423
421
-47
-224
-640
911
-755
-41
792
-214
-574
792
-207
207
-132
132
-359
-36
-595
782
29
179
-12...

result:

ok good one

Test #48:

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

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:

-148
-719
246
371
252
-816
100
92
426
-237
124
-484
513
-607
-79
102
866
-774
12
63
425
-420
653
-494
-352
617
-672
357
585
-317
203
-642
-50
792
-843
682
9
-260
426
-83
83
-616
314
302
-101
-388
479
-899
96
74
658
-686
545
-544
766
-606
213
140
-285
538
-767
505
211
-147
198
-76
-170
-145
307
-313
...

result:

ok good one

Test #49:

score: 0
Accepted
time: 46ms
memory: 4968kb

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:

-287
197
531
-411
200
-133
482
-306
-401
632
-53
128
-904
706
198
-246
-382
628
-122
122
-857
669
-587
775
-349
-454
468
246
-238
277
-861
831
-62
-76
-676
894
-846
-97
825
118
-461
431
-224
69
-108
-363
516
-476
397
-45
-421
618
-865
352
-151
606
-184
-85
-442
545
-157
-386
306
-86
428
-51
-449
-24...

result:

ok good one

Test #50:

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

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:

756
-575
231
461
-218
-29
-162
-406
605
48
-473
-133
330
-201
-207
574
-137
-374
496
-217
167
-249
671
-128
-682
-54
621
243
-957
141
188
628
-598
-287
885
-884
647
-435
672
-344
344
-780
196
-263
-84
-5
904
32
-742
252
197
293
-482
482
-969
969
-946
-23
226
743
-376
376
-934
780
-43
-127
116
-47
-2...

result:

ok good one

Test #51:

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

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:

167
209
291
-123
-591
25
374
-618
899
-307
268
-24
25
-188
208
-430
159
54
191
63
-666
-59
278
-16
258
-353
156
251
-352
-9
-411
938
-392
392
-559
93
-314
73
358
-77
-328
168
294
-106
317
-709
-80
248
529
-255
268
-648
707
-669
310
-80
-327
475
-371
319
364
-22
-851
719
-590
744
-953
557
372
-418
44...

result:

ok good one

Test #52:

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

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:

-424
794
-176
-209
-21
225
-569
576
174
-791
421
-511
738
-392
-316
202
407
-668
532
-231
-51
146
-400
559
171
-176
15
18
-66
133
-405
512
-357
-143
424
-673
182
685
-512
-30
-244
790
-772
-205
665
312
-847
812
-856
317
-60
522
-403
-1
347
-64
-342
434
-300
-39
227
-568
-42
287
565
-545
556
-776
526...

result:

ok good one

Test #53:

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

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:

27
-560
533
-784
463
-21
388
-468
-206
223
-36
-284
252
-162
-119
688
66
-100
-143
38
322
-587
100
-195
802
30
-392
-312
69
319
-517
613
-683
882
-459
-299
-52
533
-682
437
55
-218
595
-261
105
-2
432
-605
304
-420
436
243
-711
306
-362
230
121
442
-248
273
-176
212
-784
-17
-24
65
233
607
-912
-30
...

result:

ok good one

Test #54:

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

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:

-483
-373
735
121
-280
-393
203
66
404
-350
167
162
-266
8
116
163
-793
724
46
-500
-234
96
234
-225
650
2
-76
-422
-443
508
339
94
-851
851
-761
761
-372
-274
463
-666
849
-750
307
200
3
-408
648
-922
523
-338
480
-179
-387
39
784
-888
383
359
-299
-367
-52
442
-319
-41
284
498
-520
-96
331
201
-17...

result:

ok good one

Test #55:

score: 0
Accepted
time: 39ms
memory: 4564kb

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:

-819
653
28
80
-215
-81
455
-190
-528
675
-905
695
-227
-337
199
441
-112
-162
286
-335
347
-500
446
-82
173
-142
-551
376
-516
862
-441
-190
-48
668
-454
-89
-261
842
-696
476
-380
18
-315
758
41
-452
1
-324
125
-122
343
379
-156
263
90
-598
219
289
327
-222
111
414
-364
-144
-256
626
-448
-192
687...

result:

ok good one

Test #56:

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

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:

-5
98
562
-320
356
-314
409
-578
-49
-260
731
-325
33
21
-525
74
878
-912
207
526
-509
522
166
-142
-796
116
315
-181
688
-591
-6
511
-546
-35
-3
46
-171
52
78
110
-423
853
-53
178
-224
95
-829
38
149
180
380
211
-888
-45
690
-169
120
292
-254
-627
7
874
-416
-553
557
13
298
101
-110
-855
643
322
-1...

result:

ok good one

Test #57:

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

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:

-129
-394
-167
655
-861
411
14
-397
310
-364
798
186
-233
-192
-521
771
-9
170
-140
-421
140
-265
-71
81
546
-275
-294
320
178
-778
436
-156
328
34
-446
227
-248
577
241
-268
268
-157
-246
263
-285
347
-301
-490
65
461
-445
526
-309
6
565
-449
-545
994
-258
104
-337
102
102
-69
356
-329
-234
55
-311...

result:

ok good one

Test #58:

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

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:

-86
161
-702
842
-457
434
23
-234
131
-849
662
290
-808
-149
957
-739
108
3
-15
643
-94
-509
290
313
-285
285
-426
118
-267
423
-500
-211
47
-9
82
743
-753
605
-421
569
-159
-623
264
518
-961
370
-373
323
71
178
-213
-319
710
210
-927
593
-554
298
517
-193
-518
675
-505
548
26
-96
-41
181
-62
-866
4...

result:

ok good one

Test #59:

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

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:

-255
228
-113
618
-333
-74
-262
378
365
-960
758
-71
-454
109
53
475
88
-691
242
-153
574
-842
872
-465
275
94
-759
506
147
-531
355
378
-654
10
644
-491
-167
652
6
-525
22
-315
117
582
-868
725
83
179
-377
-615
751
241
-658
658
-975
975
-773
456
-306
623
-154
154
-772
772
-35
-845
177
594
-765
54
-...

result:

ok good one

Test #60:

score: 0
Accepted
time: 39ms
memory: 5184kb

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:

-638
475
131
-601
-345
896
-843
644
-65
-553
18
382
499
-761
-218
495
-474
958
-847
-38
237
536
-264
-17
-325
164
468
-837
38
728
-292
315
-605
739
-656
128
-454
605
124
-536
440
-203
-285
735
-69
-6
177
-530
-86
454
-684
792
-102
-761
23
-4
689
-556
142
94
-414
449
-32
76
151
299
-148
16
-500
-139
...

result:

ok good one