QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#831107#8907. КонференцияCoffins35 26ms5464kbC++171.1kb2024-12-25 10:46:422024-12-25 10:46:42

Judging History

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

  • [2024-12-25 10:46:42]
  • 评测
  • 测评结果:35
  • 用时:26ms
  • 内存:5464kb
  • [2024-12-25 10:46:42]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
using vi=vector<int>;
const int N=1e5+5;
int n,l[N],r[N],id[N];
bool cmp(int x,int y)
{return (r[x]==r[y])?
(l[x]>l[y]):(r[x]<r[y]);}
int mj[N],m;bool tg[N];
void solve()
{
    cin>>n;m=0;iota(id+1,id+n+1,1);
    for(int i=1;i<=n;i++)tg[i]=0;
    for(int i=1;i<=n;i++)cin>>l[i]>>r[i];
    sort(id+1,id+n+1,cmp);int cr=-1;
    for(int i=1;i<=n;i++)
    if(l[id[i]]>cr)tg[id[i]]=1,
    cr=r[id[i]],mj[++m]=id[i];
    int L=r[mj[m/2]],R=l[mj[m/2+1]];
    vi vL,vR;for(int i=1;i<=n;i++)if(!tg[i])
    {
        if(r[i]<R)vL.push_back(i);
        else vR.push_back(i);
    }if(vL.size()>vR.size())
    {
        while(vL.size()+m/2>n/2)
        vL.pop_back();
        for(int i=1;i<=m/2;i++)cout<<mj[i]<<' ';
        for(int c:vL)cout<<c<<' ';cout<<'\n';
    }else
    {
        while(vR.size()+m/2>n/2)
        vR.pop_back();
        for(int i=m/2+1;i<=m;i++)cout<<mj[i]<<' ';
        for(int c:vR)cout<<c<<' ';cout<<'\n';
    }
}
int main()
{
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int t;cin>>t;while(t--)solve();return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

1
4
823983109 859315505
510901709 589624124
351308325 413158126
29447781 138101981

output:

2 1 

result:

ok answers are correct. (1 test case)

Test #2:

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

input:

1
10
344190293 385750493
951894838 978895800
82358344 338131819
540516504 607653166
820688970 951835774
395392706 419489159
623802732 644208366
798160348 818154082
680378878 682083538
467019518 519267671

output:

7 9 8 5 2 

result:

ok answers are correct. (1 test case)

Test #3:

score: 5
Accepted
time: 1ms
memory: 3484kb

input:

1
500
943625790 945741848
367933677 368747115
117030592 118328257
321658393 322265356
413440931 413466704
191801051 192382494
45318188 45578563
184352813 184557169
267846012 270194842
787080743 789209469
102034755 102793278
677264139 679983858
858429750 858446103
879077624 879224701
573990877 574468...

output:

349 263 48 105 477 165 318 58 189 269 275 55 216 307 339 16 161 64 389 83 156 497 224 111 24 15 188 166 362 26 382 228 213 481 260 17 439 127 388 100 108 304 437 217 256 268 442 286 414 341 53 453 236 206 198 476 254 20 421 154 289 208 182 283 364 158 435 452 367 399 175 199 115 470 328 159 361 385 ...

result:

ok answers are correct. (1 test case)

Test #4:

score: 5
Accepted
time: 1ms
memory: 3824kb

input:

1
1000
724221604 725069540
143194275 144876990
944969667 945425601
692430254 692500244
413915365 415513016
441154319 441817251
397426964 397797495
573976568 574310166
333482080 333658815
692670858 693494033
781215754 781315542
297042073 297766151
347972954 348085089
567271813 567539623
43283944 4381...

output:

918 630 31 905 521 787 998 941 979 445 994 753 552 845 836 612 697 598 921 518 122 574 90 588 101 135 567 933 233 485 474 880 888 785 876 558 818 70 50 375 975 951 981 547 527 218 711 104 626 28 162 419 805 151 63 596 342 650 560 486 510 460 563 837 177 514 253 76 523 863 14 923 662 930 343 8 927 42...

result:

ok answers are correct. (1 test case)

Test #5:

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

input:

1
10000
1915 1916
6871 6872
12925 12926
12679 12680
18809 18810
4725 4726
12781 12782
6363 6364
18471 18472
17037 17038
13225 13226
12201 12202
8365 8366
11427 11428
2859 2860
18423 18424
3519 3520
14647 14648
17649 17650
11249 11250
9003 9004
15623 15624
11345 11346
457 458
4805 4806
17905 17906
84...

output:

4879 3503 9799 6882 267 935 7751 8304 9762 7655 615 9112 9469 9882 6637 8212 9218 657 6858 9805 9838 9755 1547 6525 4444 3515 4620 6596 4109 6516 4042 880 8788 1302 7963 2586 8556 998 6962 1297 6224 9059 1479 2940 2787 1710 729 3273 8542 765 8189 5790 4151 184 882 2516 8780 4968 272 9424 6263 6814 3...

result:

ok answers are correct. (1 test case)

Test #6:

score: 5
Accepted
time: 3ms
memory: 3820kb

input:

1
10000
951623572 951627967
944693469 944698949
866936571 866953676
708414261 708441197
918925455 918994693
693014496 693052258
500076831 500117857
346961903 346994890
790230509 790247658
486707346 486907093
703108219 703186545
666115252 666249778
638756819 638771288
605550898 605661894
618156528 61...

output:

8291 6626 8748 1906 3904 820 2596 7813 34 8033 9921 4062 3549 3951 9358 532 3777 7291 7452 9258 4292 4758 1111 5994 5478 4242 8095 9521 7454 7 5030 16 7909 2303 6081 256 2252 5195 9903 6515 5371 5541 7329 6753 7558 5960 4550 6747 6283 8473 5347 7316 5561 2028 6801 5913 7016 6028 1002 5983 4723 3913 ...

result:

ok answers are correct. (1 test case)

Test #7:

score: 5
Accepted
time: 20ms
memory: 5324kb

input:

1
100000
95477550 95482342
57260360 57270968
324158435 324161602
337960344 337966333
843677712 843688311
61482892 61483547
494172231 494182559
843751785 843754290
158705730 158714372
136974660 136976009
424424906 424425379
802041471 802042132
670649961 670659516
155724598 155724784
245837370 2458388...

output:

97588 17649 83155 2536 982 38888 88197 31150 48254 11586 1555 5451 13778 31991 51828 50763 52598 96708 37990 189 38719 72504 16688 90576 8940 32923 45307 28008 75988 95509 7394 54537 94136 8070 82179 90045 46561 64826 9704 98288 2863 26360 1065 81741 28831 97118 70295 23612 47485 86642 24720 45622 7...

result:

ok answers are correct. (1 test case)

Test #8:

score: 5
Accepted
time: 19ms
memory: 5320kb

input:

1
100000
126151 126152
147685 147686
168691 168692
124505 124506
58489 58490
98015 98016
173339 173340
39469 39470
135733 135734
53105 53106
118229 118230
46503 46504
36953 36954
185819 185820
27699 27700
64063 64064
60847 60848
18307 18308
1697 1698
109113 109114
99305 99306
72117 72118
107975 1079...

output:

20349 42433 79666 31091 46536 50509 97284 43758 68279 24744 88950 88892 21893 64600 15770 91529 63672 67863 91337 33200 40146 55813 93169 30543 94503 92820 97523 53085 20759 93869 41357 12906 64954 9852 6735 84202 80855 43224 41434 29410 24079 72645 98221 38045 75666 82890 18364 52504 71733 92536 71...

result:

ok answers are correct. (1 test case)

Subtask #2:

score: 0
Wrong Answer

Test #9:

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

input:

1
10
4 6
15 20
1 12
11 16
3 10
13 19
5 18
7 8
2 17
9 14

output:

10 2 3 4 5 

result:

ok answers are correct. (1 test case)

Test #10:

score: 0
Wrong Answer
time: 0ms
memory: 3804kb

input:

1
10
117956745 973823632
23571766 719701618
38785378 558526309
231187237 674007540
733362426 831144169
89816954 851213129
249341944 612792325
373425880 852493895
483542387 985564497
696597340 810358170

output:

10 1 2 5 6 

result:

wrong answer answer size for input: 2, answer size in participant solution: 2 (test case 1)

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 15
Accepted

Test #39:

score: 15
Accepted
time: 0ms
memory: 3636kb

input:

1
10
8 9
15 18
12 13
5 14
7 10
1 20
2 19
6 11
3 4
16 17

output:

3 10 2 4 6 

result:

ok answers are correct. (1 test case)

Test #40:

score: 15
Accepted
time: 0ms
memory: 3808kb

input:

1
100
152 159
63 64
101 102
105 106
90 175
114 173
181 190
37 44
186 189
126 127
135 138
27 34
136 137
76 77
149 164
129 130
17 18
68 71
66 73
11 12
47 48
67 72
49 54
21 22
118 121
3 4
117 170
83 194
91 112
124 133
139 140
85 88
151 162
86 87
84 89
116 171
30 31
6 9
46 195
92 97
14 15
125 132
39 42
...

output:

34 61 3 4 89 98 10 16 13 31 81 56 73 47 92 55 78 67 1 5 6 7 9 11 15 25 27 28 29 30 32 33 35 36 39 40 42 44 45 46 48 50 52 53 54 58 64 65 68 72 

result:

ok answers are correct. (1 test case)

Test #41:

score: 15
Accepted
time: 0ms
memory: 3652kb

input:

1
100
192 193
83 84
38 39
33 34
120 121
19 20
118 119
175 176
13 14
74 75
154 155
101 102
68 69
146 147
81 82
89 90
53 54
190 191
181 182
48 49
139 140
40 41
72 73
116 117
1 200
124 125
4 145
9 50
150 151
112 113
27 28
122 123
5 126
46 47
152 153
29 30
91 92
25 26
188 189
110 111
104 105
11 12
179 1...

output:

96 64 40 30 79 24 7 5 32 26 63 48 92 76 85 78 21 59 51 14 77 29 35 11 91 94 95 53 56 61 90 100 47 8 74 43 19 65 97 39 18 1 87 71 68 25 27 33 54 83 

result:

ok answers are correct. (1 test case)

Test #42:

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

input:

1
100
189264773 692317517
166821159 730826701
132093661 747760156
244413340 258044743
425913239 571468467
345436794 608324228
414722760 580844232
4880692 979509087
381662564 593964118
15895639 957413704
17946557 939078604
73528693 867087267
18964638 919816261
39059497 884193691
278085494 635574530
2...

output:

95 53 28 96 52 1 2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 29 30 31 32 33 34 35 37 39 41 42 44 45 46 47 48 49 50 54 55 

result:

ok answers are correct. (1 test case)

Test #43:

score: 15
Accepted
time: 0ms
memory: 3640kb

input:

1
100
327645749 329093539
980227412 994005154
579806213 598354521
898396499 898525148
545535670 547099732
57665434 63966759
91822376 112410483
898974428 932154782
174406471 268197958
272306427 273971634
389680998 390221315
3154994 997314160
269858259 282937852
343400516 407809409
620512844 631492929...

output:

5 59 24 3 15 36 58 74 70 29 71 57 67 69 97 83 99 78 95 4 65 76 86 63 47 2 8 12 17 18 22 23 25 32 33 39 40 41 42 46 49 53 61 72 77 80 81 82 88 89 

result:

ok answers are correct. (1 test case)

Test #44:

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

input:

1
100
19022424 295717821
521909470 631285980
497332842 642316879
652870043 654095607
1416391 996731107
325050618 333648846
854687185 897107660
53041861 61991654
182273029 231298999
38904128 236257569
307694478 357691523
579993158 583091697
239954119 244805531
434287435 485536294
225429937 226370246
...

output:

44 12 81 4 89 35 64 86 38 91 50 56 90 79 84 40 94 46 23 83 2 3 5 7 17 21 22 27 28 30 34 43 47 49 54 57 59 63 65 67 72 73 75 78 85 92 95 96 98 100 

result:

ok answers are correct. (1 test case)

Test #45:

score: 15
Accepted
time: 0ms
memory: 3664kb

input:

1
500
689426082 689507542
427389970 430516694
305033996 305649163
125494668 126279290
235974559 238575143
113585036 123617477
809213065 811464735
695392709 697437354
44577991 45927754
356984995 358581387
853780607 858598288
494073918 494101939
531949799 532852851
910230931 912010323
496284517 500744...

output:

186 252 97 430 495 13 245 71 259 207 46 116 197 93 419 251 409 272 231 388 161 458 390 447 368 303 333 374 456 304 295 151 440 313 286 310 81 1 297 8 246 83 44 126 372 240 226 361 216 457 72 61 95 102 86 55 340 262 271 248 238 7 74 37 154 451 159 281 434 23 84 163 182 52 336 323 98 255 342 261 70 10...

result:

ok answers are correct. (1 test case)

Test #46:

score: 15
Accepted
time: 0ms
memory: 3596kb

input:

1
500
298167304 298463628
791031018 794720207
659273641 659882121
104798428 105261813
211419472 211890862
743609251 750342623
785451379 825218182
161739521 165868601
668366592 670883708
17846664 980939732
623757216 629418838
57011271 280805195
702352076 702445129
242115912 248568730
392104305 412710...

output:

477 312 404 217 246 328 434 176 428 365 216 468 121 483 90 437 4 196 288 361 342 263 419 282 24 174 379 278 438 132 25 119 373 142 5 244 417 211 366 376 306 225 14 95 346 340 256 398 445 74 59 57 1 64 377 457 493 126 92 472 130 360 155 442 291 416 492 353 151 43 347 203 496 169 397 497 331 26 40 231...

result:

ok answers are correct. (1 test case)

Test #47:

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

input:

10
60
11164929 994881562
299556408 474028014
66299485 119766199
432871164 460158656
132161383 176718496
271951527 606038754
539359133 553976140
949470174 958412706
661828987 994881562
12788677 49941342
891211584 895712102
724455378 983161900
152648130 160372649
225338436 227986635
949470174 97419152...

output:

7 52 57 21 55 23 39 11 50 29 53 1 6 8 9 12 15 16 20 26 27 30 31 32 33 34 36 43 45 46 
11 13 2 3 5 6 7 10 
1 4 
45 65 9 62 88 100 10 61 70 57 7 59 48 43 82 84 28 63 38 64 4 6 11 13 18 19 21 22 23 24 30 31 32 36 39 40 42 44 51 58 66 67 68 71 72 73 74 78 80 85 
36 59 86 40 71 79 83 116 27 58 105 87 19 ...

result:

ok answers are correct. (10 test cases)

Test #48:

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

input:

1
500
816410380 822544531
933258032 939742925
916278797 958637658
231564956 282306172
702316904 703490950
630478476 632740217
622841133 628258870
559790060 573154940
767361234 767671613
284287915 872329108
294087713 295464162
495885666 857329063
350544956 354873942
83065442 92337813
689858265 846165...

output:

483 343 470 389 155 356 77 449 185 193 246 105 143 203 353 490 314 81 418 308 208 302 327 481 64 282 459 319 119 270 374 362 238 20 121 300 260 360 397 313 160 326 115 372 62 76 5 491 293 458 489 116 134 415 137 446 188 438 164 9 274 236 487 54 168 359 365 271 286 112 18 465 349 256 421 83 463 156 6...

result:

ok answers are correct. (1 test case)

Test #49:

score: 15
Accepted
time: 0ms
memory: 3644kb

input:

10
128
522815246 524621300
923118423 925373805
263423265 265533002
822971542 824137800
862520556 870374525
963957423 987999676
621804380 629749739
353037672 356131731
583538841 596361306
437833985 448432601
583372381 765623200
136738523 153836821
540525609 540914706
211359946 332668957
249110665 318...

output:

102 37 1 13 56 89 76 28 124 103 58 60 75 43 100 45 110 53 36 84 71 5 122 31 32 29 96 2 79 51 115 21 123 4 6 7 9 11 17 20 22 33 34 39 41 42 47 61 62 65 67 68 73 74 77 78 80 86 91 95 98 101 106 107 
12 15 14 9 18 13 24 1 2 3 5 19 
30 63 26 46 23 18 2 25 59 62 4 1 48 32 31 53 61 9 13 14 17 21 27 29 37 ...

result:

ok answers are correct. (10 test cases)

Test #50:

score: 15
Accepted
time: 0ms
memory: 3656kb

input:

1
500
385 386
233 683
460 599
563 565
299 301
336 337
619 620
181 194
642 643
448 600
673 675
449 450
512 513
479 480
653 654
129 145
246 252
22 24
236 238
179 194
523 524
175 214
312 318
338 339
105 107
159 216
538 541
522 525
116 120
499 500
313 315
239 682
402 406
437 439
136 144
520 521
270 271
...

output:

24 363 68 432 402 171 174 354 330 140 232 376 257 245 1 371 180 106 182 191 499 332 178 98 459 46 374 183 343 216 266 445 12 194 364 352 404 97 487 133 382 175 51 14 446 306 279 431 491 246 331 219 193 439 13 81 41 36 21 42 281 313 146 39 77 458 190 239 464 147 392 319 337 272 130 7 276 450 168 60 4...

result:

ok answers are correct. (1 test case)

Test #51:

score: 15
Accepted
time: 0ms
memory: 3596kb

input:

1
500
148231886 843751205
617312422 619924046
398704174 662992586
441434589 621116735
390950133 669928473
92679348 907367206
518370794 521942633
477434538 596304707
412430957 653183253
13886794 989938123
285865332 753481093
419812510 646087325
133532754 865082667
29746787 974186362
59429239 94867990...

output:

323 221 158 263 59 45 357 126 242 35 7 497 305 76 477 475 153 109 245 318 106 162 302 276 321 152 405 384 1 2 3 4 5 6 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 36 37 38 39 40 41 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 71 72 73 7...

result:

ok answers are correct. (1 test case)

Test #52:

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

input:

1
500
469801418 543014146
88133056 907796982
371632401 651284421
215700096 770340130
43908894 949974227
228857314 763662824
96428585 878420222
358846586 659069102
342512323 678918835
418259745 622528727
409697819 630897028
419845825 616929433
422535725 601728016
343890155 676697170
459587703 5503620...

output:

353 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 ...

result:

ok answers are correct. (1 test case)

Test #53:

score: 15
Accepted
time: 0ms
memory: 3612kb

input:

10
50
207059937 753068238
180121652 843395001
89976589 910097214
454561729 475461835
30145643 958325187
468106776 475461835
216500729 732895985
186550878 842144439
216500729 730076513
201705854 784916523
101615777 887736079
146407771 854308076
352972448 569951085
146407771 854308076
186550878 843395...

output:

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

result:

ok answers are correct. (10 test cases)

Test #54:

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

input:

10
50
96925135 119814173
496158611 512728287
175956964 182608264
651426656 775363792
800402590 803601033
277949571 285049833
459040129 519645784
584657755 622874674
48683750 255362883
835966114 846941081
9112059 997463383
328376408 939777438
273594271 983634047
570024836 938650380
648858690 89641384...

output:

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

result:

ok answers are correct. (10 test cases)

Test #55:

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

input:

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

output:

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

result:

ok answers are correct. (20 test cases)

Test #56:

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

input:

5
100
39 40
38 47
94 128
130 133
113 116
83 84
104 123
70 73
27 28
17 18
23 31
102 103
91 92
64 67
129 185
30 31
120 121
43 44
22 77
32 77
25 26
153 154
8 12
139 140
6 187
169 176
138 183
35 74
129 184
62 69
174 175
158 159
94 127
136 137
82 186
150 151
147 182
98 125
51 57
171 172
163 180
89 186
15...

output:

91 63 10 21 9 16 1 18 44 65 83 74 68 85 6 96 13 64 53 12 2 8 11 14 19 20 23 28 30 39 45 46 47 48 49 50 55 56 57 59 60 62 72 73 77 81 86 89 92 94 
1 2 48 28 89 42 23 91 13 10 67 31 94 12 92 70 34 3 4 5 9 16 20 22 24 25 29 35 36 39 41 43 44 45 46 47 55 57 58 62 64 66 69 71 76 77 79 80 83 84 
51 86 52 ...

result:

ok answers are correct. (5 test cases)

Test #57:

score: 15
Accepted
time: 0ms
memory: 3528kb

input:

5
100
134 145
88 91
108 110
5 11
122 149
19 24
49 50
64 73
108 109
25 28
105 115
108 111
35 40
47 48
67 71
36 37
52 82
21 22
51 157
16 45
86 87
13 14
150 154
8 10
70 71
101 102
118 155
83 157
46 158
26 28
15 160
15 159
18 24
125 126
106 115
141 144
13 161
140 144
41 42
100 102
77 78
1 3
63 74
151 15...

output:

21 93 91 99 96 26 52 9 64 85 50 34 51 67 86 87 71 44 48 1 2 3 5 11 12 19 23 27 28 29 31 32 35 36 37 38 40 46 47 49 53 55 56 61 68 69 70 73 75 89 
95 15 55 63 62 2 91 72 100 26 80 49 98 17 89 13 10 82 38 27 97 5 7 8 9 11 19 20 22 23 29 30 31 32 34 36 40 41 42 43 46 47 52 53 58 59 60 64 69 70 
36 41 3...

result:

ok answers are correct. (5 test cases)

Test #58:

score: 15
Accepted
time: 0ms
memory: 3816kb

input:

5
100
57 60
4 89
10 11
16 17
52 60
47 83
34 35
18 84
54 56
73 74
34 35
72 74
57 58
16 17
4 89
28 33
20 24
39 40
1 89
14 15
57 60
52 53
6 89
59 60
2 3
52 60
18 19
38 84
49 83
36 37
43 83
70 71
52 56
79 83
7 9
6 11
25 33
36 37
61 62
87 88
14 84
45 83
8 9
6 89
26 33
70 75
50 51
34 35
1 3
47 83
12 84
76...

output:

69 84 47 22 61 13 24 39 92 93 99 32 10 52 83 58 81 66 1 2 5 6 8 9 12 15 19 21 23 26 28 29 31 33 34 40 41 42 44 46 50 51 56 59 64 65 68 74 75 76 
14 86 25 70 99 22 59 17 1 19 7 53 48 18 41 84 79 6 10 11 16 24 28 29 30 33 35 37 38 43 44 45 47 57 58 62 64 65 66 67 68 69 74 75 77 85 88 89 91 93 
11 77 9...

result:

ok answers are correct. (5 test cases)

Test #59:

score: 15
Accepted
time: 0ms
memory: 3820kb

input:

1
500
539 750
150 935
113 950
503 768
599 720
394 819
179 180
616 713
236 237
176 925
572 731
273 276
321 860
559 560
226 227
160 933
397 818
594 595
25 28
658 683
576 729
350 845
364 837
80 83
242 243
687 690
473 782
70 71
10 995
109 952
351 844
232 905
38 39
441 798
285 874
633 634
162 163
550 551...

output:

320 228 241 385 486 290 418 164 313 56 383 150 119 161 478 374 264 176 341 220 93 165 269 148 296 215 373 197 112 163 178 97 404 191 133 52 188 160 38 14 301 351 58 428 224 289 134 18 305 352 105 218 387 460 280 36 152 98 45 261 307 71 273 282 462 335 371 61 1 2 3 4 5 6 8 10 11 13 16 17 20 21 22 23 ...

result:

ok answers are correct. (1 test case)

Test #60:

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

input:

9
46
501774969 519983378
285778326 834922419
595571527 661772468
213780183 879520399
118553532 137902327
586255014 704681164
9378356 989491790
252874272 874409322
72613198 74499250
476332881 765679883
152839782 174751052
532596744 731487878
388051588 769413593
28164764 31337189
303272352 802188999
2...

output:

27 22 39 37 36 3 40 1 2 4 6 7 8 10 12 13 15 16 18 19 20 21 23 
1 14 15 9 2 4 5 6 11 13 16 
14 29 6 44 41 22 27 35 1 2 3 4 5 9 10 12 15 19 20 21 23 26 28 
23 19 47 17 34 29 50 54 63 27 62 24 1 2 3 4 6 7 8 15 16 20 21 22 25 26 30 31 32 33 35 36 
54 143 84 159 188 70 136 115 110 124 102 18 55 130 117 2...

result:

ok answers are correct. (9 test cases)

Test #61:

score: 15
Accepted
time: 0ms
memory: 3648kb

input:

10
16
361772037 792510445
384635416 719144625
409497618 715739063
316966717 810707053
570778884 601671076
466502262 688774338
60266974 833174946
18212972 965603052
78400004 833174946
560213145 634160086
25518996 956489694
88309429 816988063
18212972 965436162
476224887 666831528
125582877 221723227
...

output:

5 1 2 3 4 6 7 8 
31 20 10 16 30 15 1 2 3 4 6 8 9 11 13 14 17 18 19 21 
5 8 1 3 
84 71 95 81 47 92 66 78 29 63 85 115 48 56 90 61 53 6 2 4 7 8 9 10 12 14 15 16 17 18 19 22 23 25 26 27 28 30 31 32 35 36 37 39 41 42 43 44 49 51 52 55 58 59 65 68 69 70 
4 14 1 2 3 5 6 7 8 
20 6 43 71 54 37 59 45 39 35 6...

result:

ok answers are correct. (10 test cases)

Test #62:

score: 15
Accepted
time: 0ms
memory: 3648kb

input:

9
34
383744235 760713475
365248345 373897053
860942199 920723471
367914001 369135522
99996947 376639838
593508480 731644905
616957929 634111207
146766416 151628870
669535137 670535846
526718328 544745772
483058135 495775639
245489848 339299310
166726937 240162489
117981174 376639838
438746063 445010...

output:

27 10 31 19 9 17 18 1 3 6 7 16 20 23 25 29 30 
16 32 3 40 43 21 24 39 2 4 8 10 12 13 14 17 18 22 23 25 28 29 
3 16 17 7 23 2 4 5 6 8 9 10 11 13 14 
67 57 66 4 2 71 5 124 7 90 13 24 30 130 74 129 1 6 8 9 10 11 12 14 15 17 18 19 20 21 25 26 27 28 29 31 32 33 34 35 36 38 39 40 41 42 44 46 47 48 49 52 5...

result:

ok answers are correct. (9 test cases)

Test #63:

score: 15
Accepted
time: 0ms
memory: 3680kb

input:

50
10
19750370 989074241
228142631 306262413
19750370 180114661
19750370 989074241
19750370 180114661
917769676 935776167
668494492 935776167
808635100 893567230
19750370 935776167
19750370 989074241
10
47236162 803597278
184820471 241507423
184820471 241507423
368250937 394441803
47236162 803597278...

output:

8 6 1 4 7 
4 1 5 6 7 
7 1 2 3 4 
9 6 4 5 7 
2 6 1 5 7 
6 1 2 3 4 
10 5 1 2 3 
7 9 1 2 3 
4 1 2 3 5 
5 1 2 4 6 
7 2 1 3 4 
3 1 2 4 5 
3 9 1 4 7 
9 1 2 3 4 
5 3 1 4 6 
3 1 2 4 5 
8 3 2 5 6 
10 3 2 4 5 
10 4 1 3 6 
6 10 1 3 4 
1 3 2 4 6 
6 5 1 2 9 
8 9 1 3 6 
3 7 1 4 5 
9 1 2 3 4 
1 2 3 4 5 
5 1 2 3 4 ...

result:

ok answers are correct. (50 test cases)

Test #64:

score: 15
Accepted
time: 0ms
memory: 3892kb

input:

50
10
500087700 584897525
500087700 513155047
267124682 584897525
227510224 584897525
267124682 426744798
15213847 642870289
15213847 642870289
15213847 104703342
117204814 176839817
15213847 652178414
10
612216268 651446105
96310236 996267161
155347798 359252282
797392811 855816166
155347798 517287...

output:

5 2 1 3 4 
9 4 2 7 8 
2 1 3 4 5 
2 1 3 4 6 
2 1 3 4 5 
4 1 2 6 7 
9 4 1 2 3 
2 1 3 5 7 
6 1 2 3 4 
9 1 2 4 5 
7 2 3 4 5 
9 7 1 2 5 
8 1 3 4 5 
1 2 3 4 5 
1 2 3 4 5 
6 1 2 3 5 
1 3 4 5 7 
7 1 2 3 4 
3 1 2 5 6 
5 3 1 2 6 
1 3 2 4 5 
4 1 2 3 5 
8 2 1 4 5 
1 7 3 4 8 
3 1 6 2 5 
1 2 3 4 6 
2 1 3 4 5 
10 ...

result:

ok answers are correct. (50 test cases)

Test #65:

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

input:

50
10
95301773 691037456
230580771 691037456
230580771 691037456
230580771 415222843
230580771 691037456
95301773 691037456
609052820 627973741
609052820 691037456
163112864 691037456
230580771 691037456
10
858016773 940707455
296165260 945036980
796282169 945036980
505882941 538944798
806407720 808...

output:

7 1 2 3 5 
5 1 2 3 6 
6 1 3 4 5 
6 7 1 2 3 
5 1 3 7 8 
7 10 2 3 4 
3 1 2 4 6 
3 1 2 4 5 
5 1 2 3 4 
8 1 2 4 5 
10 3 2 5 6 
4 1 2 3 5 
9 5 1 3 4 
9 5 1 2 6 
8 2 1 3 6 
6 9 2 3 4 
3 1 4 5 7 
2 1 3 4 5 
6 1 2 3 4 
8 1 2 5 6 
3 1 4 5 6 
1 2 3 4 6 
4 3 2 5 7 
7 1 2 3 4 
5 1 2 3 4 
3 2 1 4 5 
6 3 1 2 4 
1...

result:

ok answers are correct. (50 test cases)

Test #66:

score: 15
Accepted
time: 1ms
memory: 3652kb

input:

50
10
496521554 782203994
496521554 805258578
496521554 805258578
227741104 805258578
496521554 782203994
227741104 354334445
585390276 720752921
465894026 805258578
465894026 805258578
465894026 805258578
10
719541783 768667017
9789360 480126972
590606155 941040617
520529706 564445444
9789360 95044...

output:

7 1 2 3 4 
1 7 3 5 6 
5 1 3 4 6 
6 4 1 3 5 
1 2 3 4 6 
5 7 1 2 4 
2 1 3 4 5 
5 1 3 4 7 
10 4 1 3 5 
3 10 1 4 7 
7 5 1 3 6 
3 6 1 5 7 
7 1 2 4 5 
5 9 2 3 6 
1 2 3 4 5 
5 1 3 4 6 
5 1 2 3 4 
4 2 5 6 7 
7 1 2 6 8 
5 1 2 3 6 
9 3 1 2 5 
7 9 3 4 5 
10 6 3 4 5 
9 5 2 4 7 
8 2 3 4 5 
8 2 3 5 6 
10 8 3 2 4 ...

result:

ok answers are correct. (50 test cases)

Test #67:

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

input:

50
10
274720328 743097043
260669555 896987513
332620323 680681926
332620323 462825489
274720328 816488967
352841296 462825489
274720328 711782565
274720328 811840873
699558719 711782565
274720328 811840873
10
381591952 620554201
764121008 785041462
381591952 489054965
132461600 992909141
818614537 9...

output:

9 1 2 5 7 
9 7 5 1 2 
3 1 2 4 5 
2 1 3 4 5 
4 2 5 6 8 
10 4 6 1 3 
9 1 2 3 4 
6 1 2 3 4 
3 1 2 4 5 
1 2 3 4 5 
10 6 1 2 3 
8 7 1 3 4 
9 4 1 3 7 
4 3 1 2 6 
6 1 2 3 4 
1 2 3 4 5 
7 3 1 4 6 
7 9 1 3 4 
1 2 3 4 5 
5 1 2 3 4 
1 2 3 4 6 
8 4 1 2 3 
8 1 2 3 4 
4 1 2 3 5 
1 5 2 4 7 
10 5 1 2 3 
4 1 2 5 6 
...

result:

ok answers are correct. (50 test cases)

Test #68:

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

input:

50
10
246101935 330583688
421084866 430900387
163817226 919559164
589300791 747411863
781176762 877487635
781176762 919559164
781176762 919559164
172271752 430900387
484291533 747411863
172271752 430900387
10
926100105 964653175
261196495 487517884
261196495 487517884
289254770 487517884
62387541 99...

output:

4 5 3 6 7 
9 1 5 6 7 
5 10 3 4 6 
6 2 9 3 4 
8 6 1 5 7 
1 4 2 3 5 
9 3 1 4 5 
2 9 1 3 6 
3 2 4 7 8 
5 1 2 3 4 
6 2 3 5 7 
3 10 2 4 5 
6 8 1 3 4 
3 4 1 2 7 
9 1 2 4 5 
6 7 3 4 8 
1 2 3 4 5 
6 9 2 3 5 
2 7 1 3 4 
10 7 1 3 5 
7 4 2 5 8 
2 4 1 6 7 
3 8 2 6 7 
10 5 4 6 8 
8 5 1 3 4 
7 1 2 4 5 
1 3 4 5 6 ...

result:

ok answers are correct. (50 test cases)

Test #69:

score: 15
Accepted
time: 0ms
memory: 3888kb

input:

50
10
98118201 946809205
698601498 946809205
616801293 632577205
616801293 632577205
698601498 946809205
98118201 105239489
98118201 374226278
260272702 374226278
616801293 946809205
98118201 105239489
10
567495749 580987757
416030258 942105701
877206458 908247659
457723701 801183075
226224578 26614...

output:

3 2 1 4 5 
1 3 2 4 6 
7 4 2 5 6 
3 5 9 1 2 
9 10 1 2 6 
5 1 4 6 8 
7 3 1 8 9 
10 4 1 2 3 
1 2 3 6 7 
4 1 2 3 5 
4 7 1 5 8 
8 2 3 4 5 
5 6 7 8 10 
1 7 2 3 4 
1 9 8 2 3 
8 5 1 2 3 
1 4 2 5 6 
9 3 1 4 5 
8 3 1 5 6 
5 1 3 4 6 
8 2 1 3 5 
10 2 3 5 6 
9 5 1 3 6 
6 1 4 7 10 
4 5 3 6 7 
7 9 2 3 4 
3 8 4 5 6...

result:

ok answers are correct. (50 test cases)

Test #70:

score: 15
Accepted
time: 0ms
memory: 3640kb

input:

50
10
95762328 357488445
7881961 661417382
7881961 868882778
123928976 357488445
123928976 357488445
95762328 661417382
261433049 351216204
7881961 30590524
95762328 661417382
201165551 357488445
10
6927352 894008664
6927352 916083033
643525866 754864631
205422979 314133882
182751834 386895978
69273...

output:

7 1 2 3 4 
3 9 1 2 6 
3 10 1 4 5 
6 3 1 2 7 
9 8 2 3 4 
4 3 6 9 10 
8 6 1 3 4 
1 2 3 4 5 
10 3 1 2 4 
4 5 1 3 6 
3 1 2 4 5 
5 2 1 3 7 
1 3 2 4 5 
1 2 3 4 5 
9 2 1 4 5 
8 5 1 3 4 
2 7 1 3 4 
2 1 3 4 5 
2 10 3 4 5 
4 8 2 3 5 
4 1 2 3 5 
5 1 2 3 4 
6 5 1 2 3 
5 2 3 4 7 
5 9 1 8 10 
4 1 2 3 5 
2 6 1 3 4...

result:

ok answers are correct. (50 test cases)

Test #71:

score: 15
Accepted
time: 0ms
memory: 3644kb

input:

50
10
57876729 983880390
8926814 44672754
107471632 934426253
4217634 983880390
107471632 788207016
57876729 983880390
222576133 432931526
222576133 313331857
4217634 983880390
107471632 983880390
10
50222656 892856645
343460693 607833602
619563637 693426564
708283851 735081648
708283851 735081648
3...

output:

8 1 3 4 5 
3 4 1 5 6 
8 5 2 6 7 
7 3 1 5 6 
2 9 1 3 4 
3 2 1 4 6 
5 1 2 4 6 
9 2 1 5 6 
6 1 2 4 5 
10 4 1 3 6 
8 7 2 4 6 
6 8 1 2 3 
9 6 1 2 3 
3 6 7 8 10 
8 4 6 7 9 
2 1 3 4 5 
9 2 1 3 6 
5 10 2 3 4 
8 5 1 2 3 
9 1 2 3 5 
2 10 1 4 5 
2 1 4 5 6 
3 1 4 5 6 
3 2 4 5 8 
6 2 1 3 4 
4 6 5 1 2 
10 2 1 4 5...

result:

ok answers are correct. (50 test cases)

Test #72:

score: 15
Accepted
time: 0ms
memory: 3880kb

input:

50
10
15965927 975018108
68352633 676327492
220756310 676327492
15965927 975018108
15965927 975018108
15965927 676327492
261298454 261496889
15965927 676327492
305077262 484707206
15965927 975018108
10
146385333 798429298
146385333 974393929
426691324 614364015
92566487 974393929
62050530 70054039
1...

output:

9 1 2 3 4 
3 9 1 2 4 
10 5 1 2 6 
10 9 1 4 8 
10 5 1 2 3 
3 1 10 2 4 
8 2 3 4 6 
2 7 9 3 5 
4 7 2 5 6 
9 3 2 4 6 
7 1 2 3 4 
6 2 1 3 4 
8 2 4 3 5 
1 8 2 3 4 
6 8 1 2 4 
3 1 4 5 6 
8 6 1 2 3 
1 2 5 6 7 
2 3 5 6 7 
9 1 3 4 5 
3 5 2 6 8 
2 4 1 5 6 
3 10 1 2 7 
5 7 2 9 10 
2 6 4 7 8 
2 6 7 8 9 
3 7 1 2 ...

result:

ok answers are correct. (50 test cases)

Test #73:

score: 15
Accepted
time: 0ms
memory: 3680kb

input:

50
10
527821219 538882050
153871478 849039744
40456084 849039744
621580633 849039744
177959669 346970826
621580633 792727118
527821219 558640486
153871478 558640486
40456084 113187287
621580633 849039744
10
335913552 410720658
335913552 877706389
72481592 947592325
72481592 225949552
241504175 28533...

output:

1 6 2 3 4 
1 10 2 3 6 
7 4 2 3 6 
4 1 2 6 7 
9 7 1 4 5 
9 4 1 5 7 
2 7 3 4 5 
2 4 1 5 6 
5 3 6 7 8 
3 6 1 2 7 
2 1 4 5 6 
10 1 2 3 6 
2 6 1 7 8 
2 7 1 3 4 
2 10 3 1 4 
4 5 3 6 7 
9 3 1 7 10 
3 4 1 2 5 
8 1 2 3 4 
2 9 3 4 5 
1 3 2 4 8 
7 1 3 4 6 
5 4 1 2 3 
2 5 3 6 7 
6 1 2 5 7 
9 6 1 2 3 
3 5 1 2 4 ...

result:

ok answers are correct. (50 test cases)

Test #74:

score: 15
Accepted
time: 0ms
memory: 3648kb

input:

50
10
15351021 721243480
15351021 762387722
421103784 721243480
332266090 335259514
68311199 304196778
332266090 335259514
332266090 335259514
332266090 335259514
15351021 22859805
15351021 721243480
10
163659830 573521786
726134071 932986613
72585021 960657018
936361788 960657018
144999220 67703923...

output:

4 3 1 2 6 
2 4 3 8 9 
8 2 1 4 6 
1 6 3 4 5 
1 2 3 5 8 
7 6 1 2 3 
2 5 4 6 9 
3 9 1 5 7 
7 1 2 3 5 
3 1 2 4 5 
2 1 3 4 5 
7 9 8 3 10 
9 4 1 2 5 
2 1 3 6 9 
2 7 1 4 5 
10 2 1 3 4 
9 3 1 4 5 
4 6 2 3 5 
4 10 1 2 3 
5 2 4 6 7 
9 7 1 2 4 
3 8 4 5 6 
1 2 3 5 6 
1 10 2 3 5 
3 10 6 7 8 
1 8 4 5 6 
7 8 2 3 4...

result:

ok answers are correct. (50 test cases)

Subtask #5:

score: 15
Accepted

Dependency #1:

100%
Accepted

Dependency #4:

100%
Accepted

Test #75:

score: 15
Accepted
time: 0ms
memory: 3648kb

input:

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

output:

14 17 1 6 3 4 5 9 15 16 

result:

ok answers are correct. (1 test case)

Test #76:

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

input:

1
100
99580718 788681355
168494404 633900033
398354349 437458680
382840897 475263751
395179163 441595008
33286473 836597844
86012072 802380044
98615384 793148898
7614395 879717295
96177742 794526527
28142611 838119278
349484760 494968224
85805093 808023168
937801780 975672624
891788522 997640506
268...

output:

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

result:

ok answers are correct. (1 test case)

Test #77:

score: 15
Accepted
time: 1ms
memory: 3636kb

input:

1
1000
156 899
468 587
1582 1867
334 721
1122 1149
265 790
349 706
1189 1298
488 567
1601 1848
1468 1981
1466 1983
1062 1087
1352 1407
376 679
1222 1265
313 742
300 755
254 801
322 733
325 730
1693 1756
26 1029
353 702
347 708
1633 1816
428 627
344 711
1618 1831
1226 1261
252 803
1124 1147
1129 1142...

output:

186 730 327 1 2 4 5 6 7 9 13 15 17 18 19 20 21 23 24 25 27 28 31 32 33 34 35 36 37 38 40 41 42 43 44 46 49 50 52 53 57 58 62 64 65 67 68 69 71 72 73 77 80 81 82 83 84 86 87 89 92 94 95 98 99 100 101 102 104 105 107 108 109 113 116 120 121 124 125 126 128 129 132 137 139 140 142 146 147 148 149 150 1...

result:

ok answers are correct. (1 test case)

Test #78:

score: 15
Accepted
time: 1ms
memory: 3604kb

input:

1
1000
272631341 908695294
4501146 998267881
315583118 879542960
99204646 969688908
715232965 731832360
683069783 743050963
200607937 201535838
383066788 854760325
187017464 946309885
288069094 897691453
563090274 798970172
428564254 839689860
621989271 765233882
202401576 943574606
104983262 967482...

output:

68 928 570 991 721 282 405 988 977 247 427 911 279 385 306 114 328 743 493 942 124 341 16 870 559 39 554 351 463 682 671 914 191 550 428 46 785 140 522 406 157 575 137 41 106 491 53 707 754 532 173 688 965 453 149 261 641 806 767 726 910 827 297 982 213 127 95 545 690 638 336 203 909 640 580 805 843...

result:

ok answers are correct. (1 test case)

Test #79:

score: 15
Accepted
time: 2ms
memory: 3680kb

input:

1
10000
17731 17732
6322 6324
11255 11256
4059 4060
1099 1100
6856 6857
354 355
7266 7267
3271 3272
8030 8031
9650 9651
9624 9625
16421 16422
17835 17836
10735 10736
10346 10347
5428 5429
6408 6409
14448 14449
16542 16543
11397 11398
15449 15450
17269 17270
14565 14566
557 558
11938 11939
13052 1305...

output:

6474 201 2997 3963 5313 7053 9452 1581 1705 4988 3648 1829 4816 1239 4199 5637 7553 742 6852 278 3440 9968 9418 2453 5272 9185 7939 5888 8213 4733 8498 542 3222 9239 4038 3578 9652 5604 2947 148 2278 8832 5896 3208 2817 4909 3975 4027 7702 7587 3075 5751 8155 1733 4235 71 7759 4410 3387 1720 2606 15...

result:

ok answers are correct. (1 test case)

Test #80:

score: 15
Accepted
time: 3ms
memory: 4116kb

input:

1
10000
24132232 982872059
122051511 906831836
79963811 942084364
89099617 934724367
417039986 684570746
155462903 155516707
138733150 893946151
224108710 829120713
162809760 876055632
484592778 484681364
168746144 872100797
274643046 792546354
78421043 942885492
261316179 802341586
302285856 770897...

output:

5597 6867 3999 4552 2538 7376 890 7133 191 7142 7487 6796 5925 387 5008 5859 2822 817 9323 5353 4493 9140 8901 6467 1826 569 6845 8872 4299 9006 178 590 6313 9390 4994 7328 8615 4742 1274 9928 2901 3695 3380 5512 4624 7380 3245 3921 9691 5577 560 2963 9543 9059 2506 2656 361 4836 3485 4402 3630 6221...

result:

ok answers are correct. (1 test case)

Test #81:

score: 15
Accepted
time: 0ms
memory: 3800kb

input:

1
10000
15798 15828
9940 9953
10957 10962
11253 12450
9876 10023
16786 16866
13043 13123
16814 16837
13731 14065
6272 6677
15476 15598
8482 8498
6760 6901
4596 4638
8783 8887
17229 17492
7443 7448
10668 10691
6377 6571
4497 4505
11339 12366
2711 2830
11711 12025
10572 10785
1364 1428
701 1113
1637 2...

output:

1635 638 1275 3988 8183 2264 7618 453 8391 4824 2298 5442 6581 954 3800 1528 6492 5841 5232 5963 8915 1075 558 4200 7697 5696 2769 2095 4782 4367 1312 3540 4613 791 9937 7125 3612 9330 765 5957 2457 6168 3708 3176 527 8308 8891 3892 5493 9103 2965 2618 8910 9100 8491 907 420 7544 3499 6438 195 4694 ...

result:

ok answers are correct. (1 test case)

Test #82:

score: 15
Accepted
time: 2ms
memory: 3764kb

input:

10
354
570568009 572339753
213936555 214003250
379812391 380070394
15852102 16075419
846737868 894964026
853724442 855608041
231442910 291105661
995887973 996634431
925575683 925869806
892771121 892777309
652031698 673716895
77038800 114950342
796289712 805933667
384515157 399306202
922154397 926790...

output:

324 114 19 23 243 222 258 261 313 290 133 108 41 281 151 217 74 297 25 148 274 161 221 254 95 347 249 175 339 51 52 64 176 58 111 165 346 90 44 138 237 149 227 270 93 245 97 6 157 246 174 10 139 136 188 242 9 121 70 215 152 304 287 79 303 184 340 218 88 338 38 8 1 5 11 13 15 17 18 20 21 27 29 30 37 ...

result:

ok answers are correct. (10 test cases)

Test #83:

score: 15
Accepted
time: 0ms
memory: 3820kb

input:

1
10000
528349916 528753308
384979109 385007812
747588619 751204057
784529615 784543266
20744102 20786832
610123094 615158257
178435450 178458428
675218966 675427093
143112096 143232253
352922284 352995003
66722977 67268405
930406831 930539190
340144676 340908731
58931024 58950886
538252939 53829058...

output:

3942 3167 2342 4888 7011 5391 5590 7695 2765 9757 7036 9738 4747 2056 6992 9609 2157 8881 9275 5855 3717 5150 2196 8538 5653 9147 4392 1959 7332 7698 7062 908 8971 2211 5072 5453 3669 1690 4986 3313 6176 9759 5146 7192 5761 9180 8343 6051 4274 3982 1752 4408 6847 6070 1805 6822 7549 3722 2670 6493 4...

result:

ok answers are correct. (1 test case)

Test #84:

score: 15
Accepted
time: 0ms
memory: 3752kb

input:

1
10000
300190943 300268738
980446713 980576718
849367251 849372853
59042670 59135050
276892485 276972497
537546886 537584393
348549089 348610407
120979409 121024513
766950477 767063323
14532258 14586715
974408692 974435475
823407680 823417964
121946762 121958713
718760379 718795883
947860390 947860...

output:

3081 4419 7258 4300 2521 7172 987 8851 1285 2094 6319 8750 1773 8087 3647 5849 9019 3862 534 8222 8463 6981 8674 1509 6470 7278 8899 3511 3833 9521 4969 20 7245 5853 8895 5465 8765 5202 3555 8530 1414 4734 7308 6997 243 7158 5552 6850 6261 88 1772 1159 5362 4639 9103 5717 799 8386 9757 4827 3851 422...

result:

ok answers are correct. (1 test case)

Test #85:

score: 15
Accepted
time: 3ms
memory: 3868kb

input:

1
10000
828408688 853978299
698153877 698408232
883239772 883397822
596621350 596669869
583953726 583962391
152798081 152814304
927561776 927596639
976036685 977005816
467912627 467970676
526356492 532297680
521319682 521761068
309518853 309635413
560447456 560639447
241342225 241353247
342264818 34...

output:

8532 8050 8143 3235 5393 3994 2272 3077 956 2346 9336 45 9363 6034 7852 4312 8795 1477 6129 4526 579 6079 6104 9097 7992 5863 1958 1821 3803 3100 5361 3205 7093 7374 3759 4593 1083 1818 8887 9262 7686 8759 1236 8718 1854 4618 8111 2732 4631 5510 2857 6665 5945 1247 7020 9476 720 6844 1635 1198 4114 ...

result:

ok answers are correct. (1 test case)

Test #86:

score: 15
Accepted
time: 11ms
memory: 4504kb

input:

1
50000
8457 8458
6705 6706
10522 10523
40316 40317
81252 81253
43100 43101
84488 84489
2384 2385
57449 57450
76649 76650
71754 71755
17497 17498
43833 43834
79228 79229
90645 90646
2594 2595
87537 87538
33874 33875
67696 67697
40056 40057
74369 74370
43264 43265
76425 76426
47250 47251
30130 30131
...

output:

34719 20885 39730 37828 25588 38302 678 17103 22490 31391 8854 8262 2318 40271 1875 24746 5912 28966 31456 28916 15954 24252 26750 30059 5541 9392 41213 25416 13851 43811 23069 6488 29069 45745 4624 46352 37832 33422 47191 19465 47782 11939 23481 1733 7718 39171 31126 38847 31110 7162 45184 31680 38...

result:

ok answers are correct. (1 test case)

Test #87:

score: 15
Accepted
time: 12ms
memory: 4372kb

input:

1
50000
81840699 935082610
505749831 601783736
395294723 685993063
241428470 809501904
162953914 870864169
217156955 829067564
488612517 615297596
504278837 602980815
460793579 636170854
211143528 833617058
32832316 974716528
235739092 814340333
380222374 698076843
473011511 627666048
292294351 7685...

output:

27234 2069 41364 33207 31329 9076 22943 23521 20644 36162 31660 12427 34615 14046 7282 22346 22310 8665 47181 37575 41835 12673 4578 9494 24247 36142 43622 26987 26365 4645 18170 47139 17703 13881 19438 2562 41985 20003 5601 29320 9274 12704 25337 34979 3159 31932 6839 34879 14947 22173 40844 48334 ...

result:

ok answers are correct. (1 test case)

Test #88:

score: 15
Accepted
time: 13ms
memory: 4688kb

input:

1
50000
898736152 916568783
128432329 129362728
951151158 957406414
17835688 17858916
786836391 819513604
893634885 921354119
79466799 107966804
368400475 373459839
507136704 511082557
3175288 34283806
133584841 138103942
369519378 371977470
768782336 775002665
79952723 107503688
28105716 28116619
8...

output:

11396 20383 6382 23140 556 27316 18315 25482 32913 3750 29709 32697 14404 39761 9059 28555 37181 13913 18926 49907 28538 31725 26352 30156 18199 39003 22150 13129 34154 33218 7689 43559 16090 41658 33821 8337 4492 2185 11607 36056 31136 37268 23683 13821 3718 26434 7587 7100 6108 3076 42758 21087 83...

result:

ok answers are correct. (1 test case)

Test #89:

score: 15
Accepted
time: 11ms
memory: 4412kb

input:

1
50000
87062 87166
15987 16015
68304 68745
82154 82721
77879 81673
36620 38468
61299 63362
46129 46241
82327 82534
62127 62551
30365 32012
88016 88225
5870 6884
324 1010
4221 4229
12353 14225
14709 15474
83130 84054
47224 47675
51044 52750
64306 64826
84840 86245
48271 48496
54534 55407
70548 71491...

output:

33233 11324 34703 34503 4994 26876 15430 29470 14655 20218 31894 21587 15212 5889 20052 39470 28026 5352 23753 33617 32626 42134 32511 17824 2084 13721 39015 9101 25031 44759 4148 47890 17848 5092 48877 29150 8847 9480 27592 2302 41592 7199 8073 15665 35887 37739 48728 36551 109 18379 4441 31047 351...

result:

ok answers are correct. (1 test case)

Test #90:

score: 15
Accepted
time: 21ms
memory: 5216kb

input:

1
100000
956559098 956588185
943896409 943896710
688473932 688485488
925192308 925249937
389035222 389052420
304355535 304377366
997252188 997254317
127262220 127273912
172170446 172225119
329065745 329315801
265753121 266086543
669643006 671206033
630358446 631856811
641585225 641599353
836356758 8...

output:

70193 78962 53740 22559 82594 31274 67719 55643 31049 87696 25713 92690 32164 39318 29766 16039 33384 44352 85589 8478 82461 95192 94475 93310 72336 44343 69622 4105 11113 14696 75429 21211 20025 28285 89173 85026 13087 81086 53784 14749 46581 16210 82358 74492 76957 55446 19781 18628 85599 49444 20...

result:

ok answers are correct. (1 test case)

Test #91:

score: 15
Accepted
time: 21ms
memory: 5212kb

input:

1
100000
338664641 338680429
537202201 537205828
661611095 661613969
883120041 883136735
71502968 71511527
794835013 794852390
216641650 216646554
533095858 533161916
331577645 331600732
903769107 903789147
388738477 388794797
895216824 895257811
607321529 607342140
332873512 332896866
182984553 182...

output:

35361 73824 21499 2200 48500 89977 30679 51441 96184 4554 97694 50680 9263 23859 31506 75276 27002 81964 81352 93680 53973 75755 4359 87669 38802 29593 70914 53719 1976 89340 56336 20550 43868 1673 41179 14928 38027 5067 64136 82669 18298 9022 17683 83000 18699 57821 37405 2232 1670 45056 61110 3421...

result:

ok answers are correct. (1 test case)

Test #92:

score: 15
Accepted
time: 20ms
memory: 5308kb

input:

1
100000
366357082 366361211
570761122 570761223
1877887 1884698
102066966 102071178
866806254 866807323
598762630 598782587
139253518 139257424
212655770 212668150
272872538 272877904
167643787 167644337
276754767 276757285
580789555 580793145
362483417 362485855
429000790 429002867
370943814 37094...

output:

20403 16446 54327 71227 79197 44436 49982 96569 14316 27790 50856 34371 30166 18695 41469 37960 61377 25503 82172 37928 82306 45058 27195 85692 34098 88872 76624 39895 60790 67236 19435 32858 93982 96165 59011 36763 8153 85173 65507 94163 56941 37149 14609 5131 50143 37177 86271 65106 61453 84237 58...

result:

ok answers are correct. (1 test case)

Test #93:

score: 15
Accepted
time: 26ms
memory: 5464kb

input:

1
100000
487208023 487332344
500084525 500121163
400043720 400223441
913040395 913160592
2548383 2549329
64021500 64028085
39697775 39778139
489279674 489296631
841842418 841846777
877348463 877386812
837157448 837365070
37420409 37422668
624138768 624147601
656145962 661162394
479729001 479739415
8...

output:

43033 78110 70595 10686 7952 41391 2433 75675 50934 32247 52087 72410 99269 35028 9234 76997 33634 55107 87229 98416 60624 30072 1155 62451 80973 98408 99503 71020 2356 53899 82032 78983 10115 80232 56329 26762 18826 55350 18164 36976 61072 36038 65088 39335 21710 88599 92090 97071 48591 82496 29202...

result:

ok answers are correct. (1 test case)

Test #94:

score: 15
Accepted
time: 22ms
memory: 3956kb

input:

20
6594
157502849 157542901
470732818 475369595
355044611 355168801
811540509 811623177
234826780 236005708
134985664 134996294
873942179 874436336
139233604 184120931
736582351 736641245
948286334 948316463
433137422 433170974
247703603 248061579
233674312 233722891
267081069 267187430
206889877 20...

output:

3870 3445 6183 3695 1917 5199 3733 2260 3306 3073 2932 2031 6409 4003 3528 4708 5058 2307 4169 4382 1586 6576 1858 4578 160 5450 5771 2809 3668 6398 320 1224 810 2092 4826 335 1478 1589 1653 6205 2769 2853 4300 1688 6326 1111 3197 1468 5044 760 1971 3095 3222 6199 2443 4675 3311 4584 2744 3131 6271 ...

result:

ok answers are correct. (20 test cases)

Test #95:

score: 15
Accepted
time: 24ms
memory: 5264kb

input:

1
100000
414261818 414276478
739749106 739758190
246833915 246840857
609722086 609727106
642722467 642724552
433078527 433090728
150160526 150187032
384089113 384089844
356563195 356565385
42377882 42386743
107244973 107250286
159707098 159712486
639820017 639824158
833536332 833538985
192786496 192...

output:

18314 65617 10077 20863 2403 93921 44808 87816 36012 79706 7713 60251 66468 28345 71246 30487 34976 10721 5482 17989 63120 41953 55231 55888 21459 66736 23878 55239 3584 37972 51965 42400 64541 87288 54703 12158 98407 97741 58209 52911 82756 40725 48219 21337 44130 21218 83032 87771 96421 7134 35751...

result:

ok answers are correct. (1 test case)

Test #96:

score: 15
Accepted
time: 26ms
memory: 5248kb

input:

1
100000
273992303 274135071
28854644 28879715
128295582 128319612
635633482 635693224
683182948 683183537
696031431 696034430
779233017 779234719
487043344 487277532
224307366 224329574
497130557 497148043
445005859 445069016
61829587 61983210
642909630 642918309
364885744 364906476
338885009 33891...

output:

48444 88712 81436 19957 94724 43287 33577 18230 68276 21025 50247 65248 6740 86860 43242 75068 48345 31484 44704 2782 30602 38304 35435 5885 9934 16402 58896 69868 72183 93664 49534 75138 1778 74569 66601 51281 77503 29253 67367 69005 21620 39875 28837 31187 46410 16681 35968 11646 13231 32193 21700...

result:

ok answers are correct. (1 test case)

Test #97:

score: 15
Accepted
time: 15ms
memory: 4144kb

input:

10
5114
584843159 585975547
335481261 335535801
438625276 440697468
655412378 655499124
358873915 359110122
194331096 195255478
186027719 186246505
969011091 969012433
698968142 698983154
720976320 722961912
854914798 859273551
971517669 971565015
634284530 634285580
394273337 394281923
706937686 71...

output:

362 2450 3250 2977 2266 1023 2969 3946 2056 4293 1177 1407 3461 1084 1638 3412 2288 1268 342 2433 2879 589 3569 213 1853 3044 2661 131 3310 3055 2529 2480 1877 2887 3963 2168 2133 4903 566 1199 3191 2624 5005 2398 291 4819 4842 455 2497 3584 2752 4994 893 4690 941 4548 39 1466 936 3870 4422 3192 230...

result:

ok answers are correct. (10 test cases)

Test #98:

score: 15
Accepted
time: 20ms
memory: 3980kb

input:

100
768
316622134 980462990
858055554 858445621
48935393 60541836
530470061 539118899
343155689 399359572
887492325 899661828
760787631 911944808
787290819 789319443
291599707 297150114
820606009 824622324
706985467 707117057
509766773 511272368
13410290 26717653
108528 999539446
257603457 267928589...

output:

12 133 421 761 184 219 675 158 443 544 322 183 501 461 513 497 223 464 439 720 601 611 429 120 504 441 54 590 743 649 358 587 480 216 676 539 88 665 136 440 307 481 763 186 417 724 288 580 30 524 509 508 562 11 627 566 301 336 377 90 306 575 626 350 579 454 708 618 410 265 31 258 240 262 225 20 534 ...

result:

ok answers are correct. (100 test cases)

Test #99:

score: 15
Accepted
time: 16ms
memory: 3904kb

input:

100
1000
611301939 611563394
251056161 893976942
377984628 835193661
629344458 732224103
326362095 326683345
646312155 724264694
486839864 785070645
40100382 989092606
300098740 881734833
59283258 62165879
504485764 504506416
439090307 805930281
245532357 894698407
691362104 706817818
573106213 7586...

output:

528 647 916 81 531 946 320 875 942 58 665 493 384 153 925 93 783 28 420 507 297 273 124 362 146 337 425 542 296 480 820 924 983 439 636 576 857 881 732 477 810 944 498 892 456 38 261 774 801 864 364 619 106 536 504 479 234 408 503 770 979 671 300 140 988 224 269 11 534 256 541 834 729 773 260 272 86...

result:

ok answers are correct. (100 test cases)

Test #100:

score: 15
Accepted
time: 26ms
memory: 3884kb

input:

10
10000
59287337 976581315
63625897 975493318
447407654 814958048
381180127 381184130
606566574 606682249
507037188 507066579
382482051 846575078
470154554 470235865
202730956 202751361
556828745 556872660
406045681 834766619
688339341 688396454
388931647 844269559
169125373 934011769
648594523 738...

output:

5451 4094 7798 1766 9091 112 6048 763 5577 3692 4290 3508 1722 4912 5493 5586 8192 5771 626 2865 528 3632 4039 3857 9807 4379 9404 2958 5816 4597 7426 5739 7572 6002 4674 807 2878 2448 1160 6731 4603 6710 3793 9549 9747 2676 993 814 7250 4485 8964 5554 6441 1502 1637 3446 8901 5244 684 166 664 438 7...

result:

ok answers are correct. (10 test cases)

Test #101:

score: 15
Accepted
time: 17ms
memory: 3676kb

input:

100
918
675 1566
381 382
1068 1403
1134 1373
330 1705
1009 1432
606 1601
898 899
905 1464
386 387
1178 1361
736 1539
815 820
1170 1171
792 795
448 1671
825 1510
1077 1078
294 1727
227 230
1109 1384
442 445
532 1647
677 1564
808 809
1223 1224
269 272
358 1699
443 444
41 1816
1127 1128
1083 1398
311 3...

output:

369 149 75 526 270 203 918 637 785 883 502 338 593 123 133 612 264 661 124 707 820 287 698 389 911 858 25 299 571 626 556 351 588 199 752 71 297 443 93 665 207 38 364 277 357 8 910 411 512 727 313 879 562 528 529 660 99 663 240 45 83 477 758 336 789 563 514 533 167 657 840 328 435 602 639 659 43 247...

result:

ok answers are correct. (100 test cases)

Test #102:

score: 15
Accepted
time: 17ms
memory: 3924kb

input:

100
780
277 448
241 448
375 376
9 448
163 164
247 248
277 448
301 304
89 90
87 88
181 182
291 292
401 448
251 448
441 448
341 448
383 448
349 448
235 448
9 10
389 390
209 448
433 448
345 346
267 448
381 382
75 76
249 448
19 20
315 448
25 26
341 448
183 448
153 448
369 448
183 448
107 448
133 134
149...

output:

690 478 494 639 469 395 210 93 682 284 125 6 422 66 235 413 678 532 695 221 741 750 294 134 84 251 410 482 273 767 564 149 565 12 55 291 354 385 313 683 44 656 172 81 322 229 302 461 241 135 710 746 621 420 421 195 715 747 101 214 24 268 374 485 631 377 415 512 620 511 206 301 481 475 758 3 330 358 ...

result:

ok answers are correct. (100 test cases)

Test #103:

score: 15
Accepted
time: 13ms
memory: 3728kb

input:

100
4860
1564 5806
4569 4570
1088 5964
3025 3026
2917 2921
2519 5490
1289 5896
2730 5435
319 6170
3719 3720
92 93
4512 4957
3203 5287
4135 4136
3315 5252
619 6104
864 6036
3243 5272
1477 1478
3501 5198
1917 5688
3113 5321
3940 3941
4031 5071
3482 5209
2275 5577
295 296
3636 5160
1382 1383
2025 2026
...

output:

85 2064 755 2365 1349 1027 4560 1755 3772 3829 3087 237 2650 3547 4072 1275 374 3729 2559 2420 2505 3249 3307 1418 1847 4408 2226 2260 3577 1240 3939 3464 3857 3912 3402 934 2481 4572 1642 4699 1835 2448 510 4042 2799 2603 1124 2835 4162 3750 1477 4471 2898 4778 2231 4605 2323 2808 4780 1165 1300 66...

result:

ok answers are correct. (100 test cases)

Test #104:

score: 15
Accepted
time: 17ms
memory: 3772kb

input:

100
1604
440 2172
287 288
473 2161
1354 1873
1003 1004
1241 1912
1679 1718
1211 1212
683 2101
363 2199
892 2028
1466 1842
1349 1875
595 596
614 2119
653 2107
778 781
1707 1708
1665 1768
326 2209
1457 1845
1613 1785
988 989
994 995
38 52
500 501
818 2052
902 2025
1662 1771
1034 1035
342 343
1364 1870...

output:

565 1003 570 1489 1010 779 970 864 296 614 330 981 948 240 1278 1552 1366 443 821 1346 1601 1310 1440 356 209 1530 710 528 119 437 1049 454 862 1233 1298 56 199 1511 24 1169 869 1156 5 1066 1091 1549 1226 1085 735 1510 30 168 258 679 475 1102 347 1316 728 1114 1323 1401 1444 976 68 748 494 1128 521 ...

result:

ok answers are correct. (100 test cases)

Test #105:

score: 15
Accepted
time: 17ms
memory: 3724kb

input:

100
1476
1361 1362
24 25
440 2175
431 432
975 1998
479 2163
776 780
675 2090
1209 1210
1323 1324
967 968
44 45
449 2173
1414 1854
69 2307
1395 1860
930 2014
19 2338
859 2034
312 2225
411 2188
1623 1774
856 857
1475 1476
1278 1893
329 2217
704 2080
156 157
737 2075
1700 1744
1066 1966
407 2191
234 22...

output:

363 848 1083 1091 1157 1147 400 129 596 959 982 407 864 773 974 739 894 1072 306 884 11 507 180 1285 1178 426 1426 206 1130 954 502 1062 360 359 691 1454 552 1182 1035 505 446 160 1348 951 40 281 200 1220 655 1244 696 1292 969 996 437 402 199 965 710 1156 615 1198 937 1070 1428 944 746 826 1459 370 ...

result:

ok answers are correct. (100 test cases)

Test #106:

score: 15
Accepted
time: 14ms
memory: 3964kb

input:

100
2390
2263 3305
2593 2594
2934 2935
1912 1913
1546 3544
40 41
2007 2008
1722 1723
265 266
2887 3054
2141 3360
375 3964
703 713
2159 2160
1879 1882
2167 2168
2454 3239
2797 2798
2530 3218
99 108
1264 3630
548 550
344 362
1638 1639
437 440
790 3786
842 843
691 3821
2990 3011
349 355
1252 3635
2806 ...

output:

828 1990 1782 407 1271 2018 1867 984 1440 559 311 395 794 953 76 154 73 1088 1704 1503 649 443 764 24 1283 1542 1904 602 720 2116 1887 926 778 936 2290 494 1879 1584 1842 1374 2224 1834 149 996 1983 8 2346 2261 359 1778 1066 1349 35 1773 867 2378 118 2048 1142 2357 2125 201 987 1935 159 606 846 38 4...

result:

ok answers are correct. (100 test cases)

Test #107:

score: 15
Accepted
time: 22ms
memory: 4068kb

input:

10
2792
519844295 522055399
554078624 554485650
127843315 128047410
457861250 836146480
86018931 86113048
620077161 767018288
53524050 53895312
433370866 433893612
406532939 854096410
203647894 924877521
402657515 855691463
206344636 207364205
310703105 311044161
629636190 631913967
421658547 422874...

output:

630 1069 2634 1449 1407 1196 207 18 1557 1154 2147 1044 2510 2471 1667 682 1046 367 1950 178 264 2784 85 280 2073 1955 2181 2585 1493 446 2497 856 2512 196 892 2771 1585 644 472 1758 543 1189 21 1590 1410 2479 2052 2177 1148 1327 2239 2369 2359 1369 2466 2648 514 1719 354 1938 755 1990 1209 1928 412...

result:

ok answers are correct. (10 test cases)

Test #108:

score: 15
Accepted
time: 17ms
memory: 3612kb

input:

100
486
637 654
632 633
378 379
81 869
645 646
114 855
338 339
47 884
593 672
64 880
255 256
295 296
146 839
555 690
249 794
587 674
305 306
488 495
634 656
320 773
69 877
534 699
371 372
537 696
418 421
243 797
426 728
125 126
552 553
355 762
119 854
644 647
318 319
223 224
436 721
390 391
304 780
...

output:

82 261 471 7 156 123 341 481 399 176 23 3 69 179 36 365 143 71 217 340 373 52 452 104 134 64 483 53 438 425 282 252 326 436 412 414 70 80 390 219 147 60 97 283 163 462 417 458 235 83 129 29 182 309 45 239 151 236 402 65 333 227 313 297 394 183 88 139 228 277 2 150 5 1 4 6 8 9 10 13 14 15 16 18 19 20...

result:

ok answers are correct. (100 test cases)

Test #109:

score: 15
Accepted
time: 20ms
memory: 3588kb

input:

1000
100
26388451 96975931
798518286 804730308
601817116 830377764
355831557 389031069
875258730 890588056
439781300 496507632
493341471 494058067
649934720 666132246
122842429 400853005
26388451 96975931
601817116 641443663
493341471 494058067
704225316 808741542
670312348 678412687
503814831 51937...

output:

15 95 11 25 14 43 36 39 48 88 2 91 5 44 55 69 38 3 8 13 22 26 27 29 32 33 34 37 40 45 47 49 53 56 57 59 60 61 64 65 68 71 73 75 76 77 84 86 87 92 
74 15 4 33 43 80 77 68 30 20 29 44 1 3 81 63 86 2 5 6 7 8 9 10 11 13 16 17 19 21 25 28 34 35 38 39 40 42 45 48 49 50 54 56 59 62 67 69 72 73 
92 62 88 55...

result:

ok answers are correct. (1000 test cases)

Test #110:

score: 15
Accepted
time: 19ms
memory: 3820kb

input:

1000
100
190797416 979347972
290955680 291650595
913179322 976677534
723354647 762299547
610533760 612177374
578248324 598116451
889388585 901699604
146075565 993648555
879399841 978775032
974155846 976677534
257231970 263753518
913179322 976677534
913179322 950513478
835783591 848353977
88775348 11...

output:

24 76 74 59 16 35 88 93 61 46 19 84 94 69 54 57 53 10 1 3 4 5 7 8 9 12 13 14 17 18 20 21 23 28 34 36 39 41 42 45 47 48 50 56 58 60 62 63 65 66 
34 91 67 23 56 10 46 98 35 13 39 71 8 82 84 14 77 2 21 45 1 3 6 7 15 18 19 25 27 30 36 40 41 43 47 49 52 53 54 55 59 61 63 65 68 69 70 73 79 83 
67 87 85 88...

result:

ok answers are correct. (1000 test cases)

Test #111:

score: 15
Accepted
time: 19ms
memory: 3688kb

input:

1000
100
585226115 588856364
622286810 624590440
458635924 726544438
158945244 184360796
509978567 661292211
302941836 954190130
74476776 83764883
395809759 404241348
395809759 949434592
735281386 737082060
743570813 831116133
250394114 256237037
472931372 677271169
158945244 174473507
537947301 555...

output:

51 28 94 75 1 53 69 43 2 79 10 61 56 20 16 52 57 60 21 3 5 6 9 11 13 15 19 24 31 32 35 36 39 40 41 44 45 48 49 50 54 58 59 62 63 64 68 70 71 73 
40 81 26 98 56 6 91 24 87 13 58 50 71 3 64 15 72 1 2 5 7 9 10 11 12 14 16 18 19 20 21 22 23 27 28 29 30 31 32 33 34 37 42 43 45 51 53 55 57 60 
35 14 74 28...

result:

ok answers are correct. (1000 test cases)

Test #112:

score: 15
Accepted
time: 19ms
memory: 3592kb

input:

1000
100
107892129 152786589
625791342 961890956
311871798 435739412
123129624 125954225
295843908 299092492
5786668 60492557
534606062 535611709
744306235 750866369
69460671 188969080
823665585 824831817
242738238 248961017
68094547 998038412
531422458 581412236
482480247 486042888
351363533 396228...

output:

7 76 87 20 37 42 70 8 47 80 86 41 10 100 90 92 22 59 48 53 2 12 13 16 21 24 26 28 30 31 33 34 35 36 39 40 43 44 51 54 57 58 60 65 67 69 71 72 73 74 
10 61 89 32 45 99 16 9 96 40 6 67 23 31 62 60 70 50 20 4 5 8 22 24 25 30 33 34 35 37 38 39 41 46 52 53 56 58 63 64 65 66 69 72 76 79 80 82 83 86 
25 33...

result:

ok answers are correct. (1000 test cases)

Test #113:

score: 15
Accepted
time: 19ms
memory: 3588kb

input:

1000
100
291911865 497834341
76545754 76651845
625521090 980665902
884121208 890825403
337854510 409507926
757639277 774914373
28257983 29944829
20962118 26655280
28257983 78440399
171430112 254136903
682800195 712850694
914404995 918334271
627502507 645473683
28257983 41306176
205018209 206829841
5...

output:

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

result:

ok answers are correct. (1000 test cases)

Test #114:

score: 15
Accepted
time: 15ms
memory: 3660kb

input:

1000
100
551600472 904465128
63296911 67072140
551600472 555577778
631290916 877316298
670942977 674059050
612690055 878966043
823903537 851745704
594578430 597615640
604361741 605151975
341757395 344426750
735473266 805274084
231820334 247207447
81974580 91034175
100428144 980392208
412096953 95097...

output:

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

result:

ok answers are correct. (1000 test cases)

Test #115:

score: 15
Accepted
time: 18ms
memory: 3644kb

input:

1000
100
252858402 273750127
114831321 998252121
556063906 970181816
106393544 998252121
886180184 912274479
114831321 998252121
418916124 419349453
226309233 238688575
682679843 946789640
615715082 962966401
460420123 467007123
732509241 935361260
98141290 998252121
42879907 60226624
435108853 9701...

output:

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

result:

ok answers are correct. (1000 test cases)

Test #116:

score: 15
Accepted
time: 19ms
memory: 3588kb

input:

1000
100
122816804 127537891
845888639 868346674
44037793 56261249
765449114 868346674
299243527 931688869
183308403 188310155
142463294 976533829
644694599 927842566
723962360 895850412
639710645 639732467
765449114 868346674
686164319 896943583
668281839 912005306
691964487 895850412
513263867 516...

output:

54 52 96 43 15 94 36 92 24 58 79 44 62 99 32 2 4 5 7 8 9 10 11 12 13 14 16 18 19 20 27 28 29 30 33 34 35 37 38 39 40 41 42 45 49 50 51 53 55 56 
45 33 73 29 7 23 3 41 50 25 70 6 95 35 1 2 4 5 8 9 11 12 13 14 15 17 18 19 20 22 24 26 27 28 30 32 36 38 39 40 43 44 46 47 49 51 52 53 54 56 
87 9 65 91 72...

result:

ok answers are correct. (1000 test cases)

Test #117:

score: 15
Accepted
time: 15ms
memory: 3596kb

input:

1000
100
605609926 836267365
494747889 498524062
581965767 849196491
544178909 912185291
188776633 196666820
780320763 818659327
494747889 912383648
714626746 768400131
510854114 521743208
274421067 973906059
200415810 987106440
188776633 994659858
599457519 603040890
706229359 829248566
205528225 2...

output:

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

result:

ok answers are correct. (1000 test cases)

Test #118:

score: 15
Accepted
time: 19ms
memory: 3592kb

input:

1000
100
417653707 842208184
659951314 710775722
80077919 938953152
258759296 851521394
337276854 851521394
570441850 616697123
214916677 894896401
715774058 788676199
86714680 899894122
223751485 853867847
719950440 788676199
516807233 526701467
370834544 842208184
607275560 616697123
592502122 598...

output:

27 99 48 63 34 80 87 24 15 14 35 83 68 1 2 3 4 5 6 7 8 9 10 11 12 13 16 17 19 20 21 22 23 25 26 28 29 30 32 36 39 42 43 44 45 46 47 49 50 51 
30 42 57 45 34 80 37 58 92 83 90 39 1 2 3 4 5 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31 32 33 35 36 38 40 43 44 46 47 48 
92 84 70 26 11...

result:

ok answers are correct. (1000 test cases)

Subtask #6:

score: 0
Skipped

Dependency #2:

0%

Subtask #7:

score: 0
Skipped

Dependency #2:

0%

Subtask #8:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%