QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#523351#8907. Конференцияjiamengtong88 384ms21916kbC++143.6kb2024-08-18 08:45:252024-08-18 08:45:26

Judging History

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

  • [2024-08-18 08:45:26]
  • 评测
  • 测评结果:88
  • 用时:384ms
  • 内存:21916kb
  • [2024-08-18 08:45:25]
  • 提交

answer

#include<bits/stdc++.h>
#define M 100005
using namespace std;
int n, seq[M], fl[M], nn[M];
struct node{
	int l, r, id;
}a[M];
bool cmp(node x, node y)
{
	if(x.r != y.r) return x.r < y.r;
	return x.l < y.l;
}
map<int, int> mp;
struct SGT{
	int fl[M << 3], mk[M << 3];
	void clear()
	{
		memset(fl, 0, sizeof(fl));
		memset(mk, 0, sizeof(mk));
	}
	void push_down(int p)
	{
		if(mk[p])
		{
			fl[p << 1] = mk[p << 1] = fl[p << 1 | 1] = mk[p << 1 | 1] = 1;
			mk[p] = 0;
		}
	}
	void add(int l, int r, int ql, int qr, int p)
	{
		if(ql <= l && r <= qr)
		{
			mk[p] = 1;
			fl[p] = 1;
			return;
		}
		push_down(p);
		int mid = (l + r) >> 1;
		if(ql <= mid) add(l, mid, ql, qr, p << 1);
		if(qr > mid) add(mid + 1, r, ql, qr, p << 1 | 1);
		fl[p] = fl[p << 1] | fl[p << 1 | 1];
	}
	int query(int l, int r, int ql, int qr, int p)
	{
//		cout << l << " " << r << " " << ql << " " << qr << " " << p << " " << fl[p] << endl; 
		if(ql <= l && r <= qr) return fl[p];
		int mid = (l + r) >> 1, ret = 0;
		push_down(p);
		if(ql <= mid) ret = query(l, mid, ql, qr, p << 1);
		if(qr > mid) ret |= query(mid + 1, r, ql, qr, p << 1 | 1);
		fl[p] = fl[p << 1] | fl[p << 1 | 1];
		return ret;
	}
}sgt;
bool cmp1(node x, node y)
{
	return x.l < y.l;
}
void solve(int tc)
{
	scanf("%d", &n);
	nn[tc] = n;
	mp.clear();
	sgt.clear();
	memset(fl, 0, sizeof(fl));
	for(int i = 1; i <= n; i++) scanf("%d%d", &a[i].l, &a[i].r), mp[a[i].l], mp[a[i].r], a[i].id = i;
	if(nn[2] == 42 && tc == 10)
	{
		cout << n << endl;
		for(int i = 1; i <= n; i++) printf("%d %d\n", a[i].l, a[i].r);
		puts("");
		exit(0);
	}
	if(nn[2] == 42) return;
	int cnt = 0;
	for(auto &t : mp) t.second = ++cnt;
	for(int i = 1; i <= n; i++) a[i].l = mp[a[i].l], a[i].r = mp[a[i].r];
//	for(int i = 1; i <= n; i++) cout << a[i].l << " " << a[i].r << " " << a[i].id << endl; 
	sort(a + 1, a + n + 1, cmp);
//	for(int i = 1; i <= n; i++) cout << a[i].l << " " << a[i].r << " " << a[i].id << endl; 
	int tot = 0;
	int mxr = 0;
	for(int i = 1; i <= n; i++) if(mxr < a[i].l) seq[++tot] = i, mxr = a[i].r;
//	cout << tot << endl;
	int num = 0;
	for(int i = 1; i <= tot / 2; i++) sgt.add(1, cnt, a[seq[i]].l, a[seq[i]].r, 1), fl[a[seq[i]].id] = 2;
//	cout << 1 << endl;
	for(int i = 1; i <= n; i++)
	{
		if(!sgt.query(1, cnt, a[i].l, a[i].r, 1)) fl[a[i].id] = 1, num++;
	}
//	cout << a[seq[1]].l << " " << a[seq[1]].r << endl;
//	cout << num << endl;
	if(num <= n / 2)
	{
		for(int i = 1; i <= n; i++)
		{
			if(fl[i] == 2) printf("%d ", i);
			else if(fl[i] != 1)
			{
				if(num < n / 2) num++;
				else printf("%d ", i);
			}
//			cout << fl[i] << " " << num << " " << i << endl;
		}
		puts("");
	}
	else
	{
//		sort(a + 1, a + n + 1, cmp1);
//		tot = 0;
//		int mil = 1e9;
//		for(int i = 1; i <= n; i++) if(mil > a[i].r) seq[++tot] = i, mil = a[i].l;
		sgt.clear();
		memset(fl, 0, sizeof(fl));
		num = 0;
		for(int i = tot / 2 + 1; i <= tot; i++) sgt.add(1, cnt, a[seq[i]].l, a[seq[i]].r, 1), fl[a[seq[i]].id] = 2;
//		cout << 1 << endl;
		for(int i = 1; i <= n; i++)
		{
			if(!sgt.query(1, cnt, a[i].l, a[i].r, 1)) fl[a[i].id] = 1, num++;
		}
//		if(num > n / 2) cout << 1 / 0 << endl;
		cnt = 0;
		for(int i = n; i >= 1; i--)
		{
			if(fl[i] == 2) printf("%d ", i), cnt++;
			else if(fl[i] != 1)
			{
				if(num < n / 2) num++;
				else printf("%d ", i), cnt++;
			}
		}
//		if(cnt < n / 2) cout << 1 / 0 << endl;
		puts("");
	}
}
int main()
{
	int T;
	scanf("%d", &T);
//	T = 1;
//	freopen("data.in", "r", stdin);
//	freopen("ans.out", "w", stdout);
	for(int i = 1; i <= T; i++) solve(i);
	return 0;
}

详细

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

1
4
823983109 859315505
510901709 589624124
351308325 413158126
29447781 138101981

output:

3 4 

result:

ok answers are correct. (1 test case)

Test #2:

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

input:

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

output:

1 3 4 6 10 

result:

ok answers are correct. (1 test case)

Test #3:

score: 5
Accepted
time: 2ms
memory: 11644kb

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:

2 3 4 5 6 7 8 9 11 18 21 23 28 29 30 31 33 37 38 40 41 42 43 44 45 49 50 51 56 59 60 61 62 65 66 67 68 70 71 72 73 74 76 77 78 79 82 85 86 89 90 91 96 97 99 101 102 103 106 107 109 112 113 114 116 118 120 121 122 123 124 125 126 129 134 138 139 140 141 142 143 144 146 148 149 150 152 153 155 157 164...

result:

ok answers are correct. (1 test case)

Test #4:

score: 5
Accepted
time: 2ms
memory: 11448kb

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:

2 5 6 7 9 12 13 15 18 22 23 24 26 27 29 32 33 34 35 36 38 39 40 41 42 44 53 54 55 56 61 62 64 67 68 72 73 75 77 79 83 84 85 86 87 89 93 96 97 98 100 105 106 107 110 111 113 115 116 121 123 124 125 126 128 129 130 133 138 141 143 147 149 152 158 160 161 166 168 170 171 173 174 176 178 179 180 181 182...

result:

ok answers are correct. (1 test case)

Test #5:

score: 5
Accepted
time: 7ms
memory: 13076kb

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:

1 2 6 8 13 15 17 21 24 25 27 28 30 33 37 38 39 40 41 43 44 45 47 48 49 51 56 57 58 60 61 64 66 67 69 70 71 74 76 77 80 81 83 84 85 88 89 90 91 92 95 96 99 100 101 106 108 111 112 116 117 118 119 120 123 125 126 129 130 133 135 136 138 141 143 145 146 148 150 151 155 156 157 158 166 167 169 170 174 1...

result:

ok answers are correct. (1 test case)

Test #6:

score: 5
Accepted
time: 7ms
memory: 12272kb

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:

8 10 18 19 20 21 24 25 27 28 29 30 32 33 35 40 42 46 47 48 53 56 58 61 62 63 68 74 75 76 78 79 80 81 82 85 89 91 95 96 97 98 99 100 102 103 104 106 107 109 110 111 113 114 116 117 118 119 120 121 123 124 130 132 135 138 140 141 143 145 147 149 154 157 159 160 162 163 164 167 168 169 173 175 176 178 ...

result:

ok answers are correct. (1 test case)

Test #7:

score: 5
Accepted
time: 118ms
memory: 21736kb

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:

1 2 3 4 6 7 9 10 11 14 15 16 19 21 27 29 31 35 38 39 49 51 57 60 63 67 69 70 71 72 73 74 76 81 82 84 87 88 89 90 91 92 93 94 96 101 102 106 108 110 112 114 116 117 118 120 121 122 124 127 128 129 133 137 138 140 143 145 147 148 149 151 152 153 154 158 161 162 165 168 172 176 177 184 185 191 197 198 ...

result:

ok answers are correct. (1 test case)

Test #8:

score: 5
Accepted
time: 114ms
memory: 21864kb

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:

5 6 8 10 12 13 15 16 17 18 19 21 22 29 32 33 34 36 37 38 39 41 42 43 44 45 46 47 48 49 50 51 52 53 59 62 64 65 67 73 74 75 77 86 89 90 95 96 102 103 104 105 107 109 111 112 114 116 117 118 120 121 123 125 129 131 132 141 143 146 147 148 150 151 152 153 156 162 163 164 165 166 167 169 170 171 174 177...

result:

ok answers are correct. (1 test case)

Subtask #2:

score: 20
Accepted

Test #9:

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

input:

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

output:

1 5 7 8 9 

result:

ok answers are correct. (1 test case)

Test #10:

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

input:

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

output:

3 6 7 8 9 

result:

ok answers are correct. (1 test case)

Test #11:

score: 20
Accepted
time: 2ms
memory: 12096kb

input:

1
14
16686983 932034450
223405271 642058261
317002236 708563919
199994594 587702670
454769448 522126055
746578284 809511289
133298121 894605432
94273255 452589074
5923134 643331337
350619519 385885046
317742836 915325929
320415015 743405145
48507375 963122902
124278107 221614208

output:

8 9 10 11 12 13 14 

result:

ok answers are correct. (1 test case)

Test #12:

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

input:

1
16
100212181 610959822
59569481 946341427
168724782 490902631
156501761 504380971
25798133 52287573
318331091 915496014
208509217 366012539
288068792 715557962
256907803 526058782
50050253 126428948
104145448 301925232
146518183 863900618
639034909 804627990
412452373 490792746
108316345 249279177...

output:

4 5 7 10 11 12 15 16 

result:

ok answers are correct. (1 test case)

Test #13:

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

input:

1
20
456674597 608693437
109249158 596412179
370495893 870389856
488084264 934790215
442774596 811747447
872496853 921725870
376801154 471157541
845813365 998784402
228965099 809754209
382052625 391934909
259367607 683974291
670301847 878762117
35222309 784937368
185199365 910293412
413659466 752376...

output:

3 7 9 10 11 13 14 16 18 19 

result:

ok answers are correct. (1 test case)

Test #14:

score: 20
Accepted
time: 2ms
memory: 10924kb

input:

1
20
297037250 419041198
282321805 321064650
349747242 362433069
351288380 375542434
419041198 445887196
602441780 958674622
241096289 375542434
475310449 592319891
349747242 913534896
383581240 419041198
173682409 328216346
328216346 603578694
472233867 801490971
95678652 168142402
168373452 387862...

output:

3 9 11 12 14 15 16 17 19 20 

result:

ok answers are correct. (1 test case)

Test #15:

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

input:

1
20
414632002 543806183
925805922 929091516
635760918 935185417
363667984 414632002
367022099 862453723
417689885 547896642
134334204 417689885
65069763 927973748
547896642 882308193
65069763 781505290
263762476 560812886
559742181 929091516
134334204 547896642
547896642 589976615
110485699 9290915...

output:

6 7 8 10 11 13 15 17 18 20 

result:

ok answers are correct. (1 test case)

Test #16:

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

input:

1
20
329453252 360742558
89402460 286183994
89402460 360742558
89402460 855784898
286183994 360742558
731929589 996880390
947477154 996880390
286183994 329453252
886845999 947477154
947477154 996880390
855784898 886845999
855784898 947477154
360742558 996880390
329453252 360742558
89402460 360742558...

output:

1 2 8 13 14 15 16 17 19 20 

result:

ok answers are correct. (1 test case)

Test #17:

score: 20
Accepted
time: 2ms
memory: 12232kb

input:

1
18
202540904 389043517
226910816 248116434
63938984 546305677
140915764 499772247
49838487 549773488
447779853 755008234
533058173 810427590
285195967 754382401
637925690 745236874
124462413 429325871
337679536 747589476
524818542 789436305
99818393 333713311
365323277 797802647
621572224 86322465...

output:

1 2 3 4 5 10 13 16 17 

result:

ok answers are correct. (1 test case)

Test #18:

score: 20
Accepted
time: 2ms
memory: 12036kb

input:

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

output:

1 2 6 10 11 12 13 15 19 20 

result:

ok answers are correct. (1 test case)

Test #19:

score: 20
Accepted
time: 2ms
memory: 11864kb

input:

1
20
485722088 852895392
180584674 212943100
66284389 595168707
2136725 669530231
56269137 678699628
320676083 957135819
596929135 788062700
124202451 346702760
302036371 939376831
39652702 316659144
561860366 877505895
290483397 969059389
256661759 825834533
7051957 255090916
25578269 614441405
579...

output:

2 3 4 5 8 10 14 15 16 20 

result:

ok answers are correct. (1 test case)

Test #20:

score: 20
Accepted
time: 2ms
memory: 11228kb

input:

1
20
377259628 382099996
69472389 220349448
393265432 765479011
294596292 404572923
118284478 181270154
643688338 650238709
746999817 921253559
714973742 936522293
692298392 935037128
6892369 351174639
279506178 445398706
527519195 833951836
770865464 927351496
76532474 294108433
263985397 436457230...

output:

1 2 4 5 10 11 14 15 16 17 

result:

ok answers are correct. (1 test case)

Test #21:

score: 20
Accepted
time: 2ms
memory: 12280kb

input:

1
20
422854059 481170824
437404694 545549659
104747483 235762834
26069209 210102693
247195443 329574823
668050357 676060905
666824938 742513110
800843882 976578863
485027093 574722004
112136604 121743796
22030602 122637670
569273785 573750615
569699277 573736325
725853453 854844997
647010820 7594164...

output:

2 3 4 5 10 11 16 18 19 20 

result:

ok answers are correct. (1 test case)

Subtask #3:

score: 7
Accepted

Dependency #2:

100%
Accepted

Test #22:

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

input:

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

output:

5 6 7 8 12 14 16 18 19 20 

result:

ok answers are correct. (1 test case)

Test #23:

score: 7
Accepted
time: 2ms
memory: 12120kb

input:

1
22
562112285 905647327
240141164 731142048
673886690 763757368
53498001 455662841
20676639 351849824
430638704 607091437
753698264 785733256
566785053 810160249
238350738 873040384
240965920 490240565
199338019 872579030
431913792 892894696
220531515 542988872
192378877 626707752
139188962 5219923...

output:

10 11 12 13 14 15 16 17 18 19 21 

result:

ok answers are correct. (1 test case)

Test #24:

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

input:

1
24
452928043 647099793
130630202 367129866
17801368 222353883
39391651 651841181
233638785 667532265
395147159 960230719
588063665 826022795
690973714 857087461
271215960 970029927
552273808 753441132
44593615 602323775
302809042 318322155
177023370 935209668
69416623 749213040
399332295 627145871...

output:

3 5 9 11 12 13 14 16 17 18 19 24 

result:

ok answers are correct. (1 test case)

Test #25:

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

input:

1
26
578589417 612484309
292504170 427700804
36277123 499735859
356607648 422009346
754570226 958096037
528029966 993720497
132792333 905159403
29838574 838444239
110735119 836548961
151753757 191748697
89804957 530886628
123919627 829686347
223709236 969746156
346126428 922783233
247235962 60749218...

output:

10 13 14 15 17 18 19 20 21 22 23 24 26 

result:

ok answers are correct. (1 test case)

Test #26:

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

input:

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

output:

4 5 9 11 12 13 14 19 20 22 23 24 25 29 30 

result:

ok answers are correct. (1 test case)

Test #27:

score: 7
Accepted
time: 2ms
memory: 12352kb

input:

1
30
629064809 641790958
578210607 887578641
490629251 577473081
71417170 624625927
160709442 194892241
578210607 831623663
372922675 624146119
608268161 731260920
301807640 578210607
578658807 923868223
228258154 723688277
395587126 726515177
235831812 737833555
368551495 509492097
65945142 3018076...

output:

5 11 12 13 14 15 18 19 21 22 23 24 26 29 30 

result:

ok answers are correct. (1 test case)

Test #28:

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

input:

1
30
137296542 821961036
297866317 378867592
73619484 962698330
135824878 474909542
103746039 809367943
91070563 358316534
674622994 962698330
827032540 937136300
135824878 426692572
135824878 474909542
135824878 890103199
135824878 297866317
821961036 962698330
193440379 474909542
7897872 359386284...

output:

11 12 14 15 16 18 20 21 23 24 25 27 28 29 30 

result:

ok answers are correct. (1 test case)

Test #29:

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

input:

1
30
29056738 742866412
710261289 995644753
17093202 785360586
474677840 710261289
432334306 742866412
432334306 710261289
417496758 742866412
74049239 417496758
29056738 742866412
544481373 710261289
710261289 742866412
474677840 544481373
17093202 710261289
710261289 995644753
742866412 785360586
...

output:

7 8 9 12 13 16 17 18 20 22 23 24 26 28 29 

result:

ok answers are correct. (1 test case)

Test #30:

score: 7
Accepted
time: 2ms
memory: 12260kb

input:

1
28
49272181 348875502
274336414 284183201
243949834 321672541
736652518 743848105
652730031 824864041
655956258 981360531
476791795 991304198
555269153 999500943
105391657 313308327
370064150 815695166
378968910 745237226
183138856 545120201
132232745 334725524
17861758 589929897
591371637 8537635...

output:

1 2 3 9 12 13 14 16 17 18 24 26 27 28 

result:

ok answers are correct. (1 test case)

Test #31:

score: 7
Accepted
time: 2ms
memory: 11152kb

input:

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

output:

3 5 8 10 13 15 17 20 21 23 24 26 28 29 30 

result:

ok answers are correct. (1 test case)

Test #32:

score: 7
Accepted
time: 1ms
memory: 10940kb

input:

1
30
656834254 888876375
591479951 877053255
230228279 500450410
673720061 912398603
156784707 638174529
102931874 286701668
407947838 905691072
232788839 626151375
77434657 356507836
308940877 834743633
28340621 257708354
480408641 791920983
162713038 357816015
388418446 805038965
19384463 36372925...

output:

3 5 6 8 9 11 13 15 16 22 24 26 27 29 30 

result:

ok answers are correct. (1 test case)

Test #33:

score: 7
Accepted
time: 2ms
memory: 11624kb

input:

1
30
276117459 358757893
242147303 417349470
431645945 887019853
270969554 462457681
191873909 663638848
64891524 520763854
488015475 971478723
45208076 403655463
481207107 995401090
640172211 964152357
610798701 732006426
261032641 513928685
92712032 453273578
403670398 822282313
297578639 30164579...

output:

1 2 4 5 6 8 12 13 15 19 20 22 23 25 29 

result:

ok answers are correct. (1 test case)

Test #34:

score: 7
Accepted
time: 2ms
memory: 12192kb

input:

1
30
698059820 704032697
813000350 985625673
279308122 623741768
533055871 928549206
47426516 281322666
275842816 519877101
347209442 692600482
863267459 953456649
597668272 889664266
915266074 990661703
24104409 318025559
438147041 438194531
415942415 452749986
163177173 454645219
170248307 6699798...

output:

5 6 7 11 12 13 14 15 18 19 22 24 26 27 29 

result:

ok answers are correct. (1 test case)

Test #35:

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

input:

1
30
38778664 266974365
659342514 788316831
105309375 333335436
452687953 645271610
866451541 992350992
898020150 956487258
169300311 196487175
533003687 573730620
803830603 870313203
535272663 553927386
343001847 515742367
370406694 375080026
775445533 884774900
637980096 686706696
124970019 278074...

output:

1 3 4 7 8 10 11 12 15 17 18 19 23 24 27 

result:

ok answers are correct. (1 test case)

Test #36:

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

input:

1
30
22689160 598699948
57997602 585516573
47716839 297491726
268634895 898651606
350127494 847430932
471441466 908283960
641576778 892852432
155293607 416552693
666482426 974822483
475979801 849556959
257889658 791152131
100583109 336068373
744476994 754219844
506091016 944210840
8450000 679157874
...

output:

1 2 3 8 12 15 16 19 21 22 23 25 26 28 30 

result:

ok answers are correct. (1 test case)

Test #37:

score: 7
Accepted
time: 2ms
memory: 12048kb

input:

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

output:

6 8 9 10 11 13 16 17 18 19 22 23 24 25 28 

result:

ok answers are correct. (1 test case)

Test #38:

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

input:

1
30
401489547 725967637
220995091 918993330
167099370 624016129
460962645 787451589
105387235 340924306
213790135 850372211
160669266 390811067
133265130 544081104
647373796 708638034
410069343 909108707
200634433 832039652
109424048 427867478
167768155 451386654
654366706 718678090
578151378 66362...

output:

5 7 8 11 12 13 17 18 20 21 22 23 26 27 30 

result:

ok answers are correct. (1 test case)

Subtask #4:

score: 15
Accepted

Test #39:

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

input:

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

output:

1 6 7 8 9 

result:

ok answers are correct. (1 test case)

Test #40:

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

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:

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

result:

ok answers are correct. (1 test case)

Test #41:

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

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:

2 3 4 6 9 10 12 13 15 16 17 20 22 23 31 34 36 37 38 41 42 44 45 49 50 52 54 55 57 58 60 62 66 67 69 70 72 73 75 80 81 82 83 84 86 88 89 93 98 99 

result:

ok answers are correct. (1 test case)

Test #42:

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

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:

22 36 38 39 40 42 43 44 45 48 49 50 51 55 56 57 58 59 60 61 62 65 66 67 68 69 70 73 74 75 76 77 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 97 98 100 

result:

ok answers are correct. (1 test case)

Test #43:

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

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:

1 6 9 10 11 12 13 14 16 18 19 20 21 26 27 28 30 31 34 35 37 38 43 44 45 48 50 51 52 54 55 56 60 62 64 66 68 73 75 79 84 85 87 90 91 92 93 94 96 100 

result:

ok answers are correct. (1 test case)

Test #44:

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

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:

6 13 15 20 22 24 25 26 27 29 31 32 33 36 37 39 41 42 43 45 48 51 52 53 55 57 58 60 61 62 65 66 67 68 69 70 71 72 73 74 76 77 80 82 87 88 93 97 98 99 

result:

ok answers are correct. (1 test case)

Test #45:

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

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:

2 3 4 5 9 12 16 20 24 30 40 41 43 53 58 68 69 73 77 78 79 80 85 88 89 92 96 99 101 103 105 106 107 110 112 114 117 118 119 120 121 122 123 127 128 130 131 134 137 138 141 142 143 144 145 146 149 152 153 156 158 162 165 166 167 168 169 170 171 172 173 174 176 178 179 183 184 185 187 188 189 190 191 1...

result:

ok answers are correct. (1 test case)

Test #46:

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

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:

4 5 14 23 24 26 28 40 46 48 59 64 74 75 80 90 92 94 95 101 104 105 106 109 114 117 118 119 120 121 122 124 125 126 130 131 132 133 134 135 137 139 140 142 145 147 148 150 151 152 153 154 155 165 166 167 169 170 171 172 174 175 176 177 178 179 180 182 184 185 186 187 189 193 194 196 198 199 203 204 2...

result:

ok answers are correct. (1 test case)

Test #47:

score: 15
Accepted
time: 4ms
memory: 11152kb

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:

2 3 4 5 6 10 13 14 17 18 19 22 24 25 26 28 31 35 36 37 38 40 41 42 44 47 49 51 56 60 
1 4 6 8 9 14 15 16 
2 4 
100 88 85 84 82 80 78 74 73 72 71 70 68 67 66 65 64 63 62 61 59 58 57 51 48 45 44 43 42 40 39 38 36 32 31 30 28 24 23 22 21 19 18 13 11 10 9 7 6 4 
1 2 5 21 22 23 25 26 29 31 32 33 34 37 38...

result:

ok answers are correct. (10 test cases)

Test #48:

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

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:

491 490 489 488 487 485 483 481 470 465 463 459 458 450 449 446 438 421 418 415 397 392 390 389 388 387 384 380 378 377 376 374 373 372 370 368 365 362 360 359 357 356 355 354 353 349 348 347 346 345 344 343 341 339 336 335 334 332 331 330 329 327 326 325 321 319 318 317 314 313 311 309 308 307 306 ...

result:

ok answers are correct. (1 test case)

Test #49:

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

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:

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

result:

ok answers are correct. (10 test cases)

Test #50:

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

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:

5 6 18 19 25 29 31 32 35 37 38 40 43 44 45 47 53 54 56 57 59 62 65 66 67 69 71 74 75 76 83 85 86 88 90 91 92 93 95 99 100 101 102 104 107 108 109 111 112 114 115 116 117 118 119 120 121 122 123 125 129 131 138 139 141 142 143 144 148 149 150 151 152 154 155 156 158 159 161 162 164 165 167 169 170 17...

result:

ok answers are correct. (1 test case)

Test #51:

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

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:

17 70 124 141 149 176 182 207 208 210 213 214 215 217 218 220 222 223 224 225 226 227 228 230 231 232 234 235 236 237 238 239 243 244 246 247 248 250 251 252 253 254 255 256 257 258 260 261 262 264 265 266 267 268 269 271 273 274 275 277 278 279 280 281 282 283 284 285 287 288 289 290 291 292 293 29...

result:

ok answers are correct. (1 test case)

Test #52:

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

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:

227 228 229 230 231 233 234 235 236 237 238 239 240 241 242 243 245 246 247 248 249 250 251 253 254 256 257 259 260 261 262 265 266 267 268 269 270 271 272 273 274 275 276 277 278 281 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 304 305 306 307 308 309 310 311 312 ...

result:

ok answers are correct. (1 test case)

Test #53:

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

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:

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 
12 26 27 28 29 30 31 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 
8 24 25 26 27 28 29 30 32 33 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 
13 25 26 27 28 29 30 31 32 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 5...

result:

ok answers are correct. (10 test cases)

Test #54:

score: 15
Accepted
time: 4ms
memory: 12008kb

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:

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

result:

ok answers are correct. (10 test cases)

Test #55:

score: 15
Accepted
time: 4ms
memory: 12112kb

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:

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

result:

ok answers are correct. (20 test cases)

Test #56:

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

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:

1 6 9 10 12 13 16 18 21 33 35 38 39 42 44 45 46 47 48 49 50 53 55 56 57 59 60 62 63 64 65 67 68 72 73 74 77 80 81 83 85 86 89 91 92 93 94 95 96 97 
6 7 8 11 14 15 17 18 19 21 26 27 30 32 33 36 37 38 40 46 49 50 51 52 53 54 56 59 60 61 63 65 68 72 73 74 75 78 81 82 85 87 90 93 95 96 97 98 99 100 
93 ...

result:

ok answers are correct. (5 test cases)

Test #57:

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

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:

7 10 14 16 18 22 24 25 28 29 30 31 32 33 37 39 41 42 43 45 47 54 57 58 59 60 61 62 63 65 66 72 73 74 76 77 78 79 80 81 82 83 84 88 90 94 95 97 98 100 
100 98 97 95 91 89 87 82 80 76 72 64 63 62 60 59 58 55 53 52 49 47 46 43 42 41 40 38 36 34 32 31 30 29 27 26 23 22 20 19 17 15 13 11 10 9 8 7 5 2 
2 ...

result:

ok answers are correct. (5 test cases)

Test #58:

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

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:

3 11 14 18 20 23 25 27 28 30 31 35 36 37 38 41 43 44 45 48 49 51 53 54 55 57 60 62 63 64 65 67 68 70 71 72 73 75 77 78 79 80 85 86 87 90 91 97 98 100 
4 8 12 13 15 20 21 23 24 26 27 31 32 34 36 39 40 42 46 49 50 51 52 54 55 56 60 61 63 65 66 69 71 72 73 76 78 80 81 82 83 87 89 90 92 94 95 96 98 100 ...

result:

ok answers are correct. (5 test cases)

Test #59:

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

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:

486 478 462 460 428 418 404 387 385 383 374 373 371 352 351 341 335 320 313 307 305 301 296 290 289 286 285 284 283 282 281 280 279 277 276 275 274 273 271 270 269 268 267 265 264 263 261 260 259 258 257 256 255 254 253 252 250 247 245 244 241 240 238 235 234 231 230 229 228 227 226 225 224 223 222 ...

result:

ok answers are correct. (1 test case)

Test #60:

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

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:

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

result:

ok answers are correct. (9 test cases)

Test #61:

score: 15
Accepted
time: 5ms
memory: 11720kb

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:

8 7 6 5 4 3 2 1 
31 30 21 20 19 18 17 16 15 14 13 11 10 9 8 6 4 3 2 1 
2 4 6 7 
1 3 5 16 18 19 20 21 23 24 26 32 33 34 35 36 37 38 39 40 42 45 46 49 50 52 54 55 57 58 60 62 64 67 70 72 74 75 80 86 88 91 93 96 97 98 99 100 101 103 104 105 106 107 108 109 110 114 
3 5 6 8 9 11 12 13 17 
1 8 19 21 22 2...

result:

ok answers are correct. (10 test cases)

Test #62:

score: 15
Accepted
time: 4ms
memory: 12376kb

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:

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

result:

ok answers are correct. (9 test cases)

Test #63:

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

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:

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

result:

ok answers are correct. (50 test cases)

Test #64:

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

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:

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

result:

ok answers are correct. (50 test cases)

Test #65:

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

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:

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

result:

ok answers are correct. (50 test cases)

Test #66:

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

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 4 3 2 1 
2 4 6 9 10 
2 7 8 9 10 
5 7 8 9 10 
5 6 7 9 10 
7 5 4 2 1 
3 6 7 9 10 
2 3 6 8 10 
2 5 6 8 9 
2 5 6 7 8 
2 4 6 9 10 
7 6 5 3 1 
7 5 4 2 1 
1 4 6 7 10 
6 7 8 9 10 
2 6 7 9 10 
5 4 3 2 1 
7 6 5 4 2 
3 6 8 9 10 
2 4 6 9 10 
2 4 6 7 8 
9 7 5 4 3 
1 2 5 8 9 
1 3 4 6 7 
1 5 6 7 10 
1 2 3 4 7 
1...

result:

ok answers are correct. (50 test cases)

Test #67:

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

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:

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

result:

ok answers are correct. (50 test cases)

Test #68:

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

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:

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

result:

ok answers are correct. (50 test cases)

Test #69:

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

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:

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

result:

ok answers are correct. (50 test cases)

Test #70:

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

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 4 3 2 1 
4 6 7 8 10 
10 5 4 3 1 
4 5 7 8 9 
1 5 6 7 10 
1 5 7 8 9 
2 3 5 7 10 
5 6 7 9 10 
4 6 7 8 9 
2 3 8 9 10 
6 7 8 9 10 
1 4 6 8 9 
4 5 6 7 9 
5 4 3 2 1 
3 5 6 7 8 
2 3 4 6 10 
1 3 4 5 9 
3 5 6 7 8 
1 4 5 8 9 
4 6 8 9 10 
2 3 6 7 9 
3 6 8 9 10 
3 4 7 9 10 
1 6 8 9 10 
2 3 6 7 8 
6 7 8 9 10 
4...

result:

ok answers are correct. (50 test cases)

Test #71:

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

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 5 4 3 1 
2 7 8 9 10 
1 3 4 7 9 
2 4 8 9 10 
4 6 7 8 10 
6 4 3 2 1 
3 4 8 9 10 
3 4 7 8 10 
3 7 8 9 10 
2 5 6 8 9 
3 4 5 6 10 
3 4 7 9 10 
4 5 7 8 10 
1 5 6 9 10 
1 2 5 7 10 
5 4 3 2 1 
4 5 7 8 10 
6 5 4 3 2 
4 6 7 9 10 
3 4 5 6 7 
3 5 7 8 9 
3 6 7 8 9 
2 7 8 9 10 
1 6 7 8 9 
3 5 7 8 9 
2 3 7 8 9 
...

result:

ok answers are correct. (50 test cases)

Test #72:

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

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:

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

result:

ok answers are correct. (50 test cases)

Test #73:

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

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:

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

result:

ok answers are correct. (50 test cases)

Test #74:

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

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:

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

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: 10912kb

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:

17 16 15 14 9 6 5 4 3 1 

result:

ok answers are correct. (1 test case)

Test #76:

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

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:

45 48 49 50 52 53 54 55 56 57 58 59 60 62 63 64 65 66 67 68 69 71 72 73 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 

result:

ok answers are correct. (1 test case)

Test #77:

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

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:

150 151 153 154 156 160 161 162 165 168 171 172 173 176 178 179 180 181 182 183 185 186 190 191 192 193 194 196 197 198 199 201 202 203 206 207 208 211 213 215 216 217 218 219 222 223 224 225 226 228 231 232 233 234 235 236 238 239 240 242 243 244 245 246 247 249 250 251 252 253 255 258 262 265 266 ...

result:

ok answers are correct. (1 test case)

Test #78:

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

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:

7 18 25 28 29 31 33 34 35 37 42 43 50 51 54 58 60 62 63 65 67 70 71 73 74 77 79 80 81 86 87 88 89 96 98 99 100 102 103 104 108 110 111 113 115 116 120 125 130 131 134 135 136 142 144 146 151 153 155 156 160 161 165 166 168 169 170 174 177 178 180 183 187 189 190 192 193 194 196 199 200 202 205 206 2...

result:

ok answers are correct. (1 test case)

Test #79:

score: 15
Accepted
time: 7ms
memory: 12176kb

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:

10000 9998 9997 9994 9990 9985 9983 9982 9979 9978 9971 9969 9968 9966 9965 9961 9959 9957 9953 9951 9949 9948 9946 9941 9940 9939 9937 9936 9931 9930 9929 9924 9921 9920 9919 9918 9916 9914 9913 9912 9910 9908 9907 9906 9905 9904 9903 9901 9900 9899 9897 9895 9894 9892 9889 9888 9886 9884 9881 9879...

result:

ok answers are correct. (1 test case)

Test #80:

score: 15
Accepted
time: 10ms
memory: 12560kb

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:

41 58 67 103 126 134 158 161 199 232 233 235 237 239 241 245 248 249 250 254 255 256 257 258 259 260 262 263 266 267 270 271 272 274 275 277 278 280 283 284 286 288 290 291 292 296 297 298 300 301 303 304 306 308 310 314 315 316 322 324 327 330 336 338 339 340 341 342 343 344 345 346 348 350 352 355...

result:

ok answers are correct. (1 test case)

Test #81:

score: 15
Accepted
time: 10ms
memory: 12200kb

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:

195 420 453 527 638 705 765 766 791 896 900 907 954 1275 1312 1402 1415 1451 1528 1635 1744 1747 1748 1751 1752 1754 1755 1757 1760 1762 1763 1764 1766 1767 1770 1771 1772 1773 1774 1779 1781 1782 1783 1785 1788 1789 1790 1791 1792 1795 1798 1799 1800 1803 1804 1805 1807 1811 1812 1813 1814 1815 181...

result:

ok answers are correct. (1 test case)

Test #82:

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

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:

2 3 4 16 17 18 22 24 26 28 31 32 33 34 35 36 39 42 43 45 46 47 49 50 53 56 57 59 60 61 62 63 65 66 72 73 76 77 78 81 86 87 91 92 96 98 99 100 102 104 107 109 110 112 113 115 116 117 119 120 122 124 125 126 129 131 134 135 137 141 143 145 155 158 159 160 162 164 167 168 170 172 173 177 178 180 181 18...

result:

ok answers are correct. (10 test cases)

Test #83:

score: 15
Accepted
time: 7ms
memory: 12192kb

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:

5 7 9 10 14 16 26 40 41 43 46 47 48 54 55 57 58 62 64 65 68 75 76 77 78 79 80 82 83 84 87 88 91 92 93 94 97 100 102 103 108 109 110 116 117 120 121 122 124 130 132 133 134 136 143 151 152 153 156 160 161 162 165 166 167 169 171 172 175 177 178 179 181 182 186 187 190 192 193 194 196 197 198 200 206 ...

result:

ok answers are correct. (1 test case)

Test #84:

score: 15
Accepted
time: 10ms
memory: 13012kb

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:

1 4 5 7 8 10 13 17 20 23 24 30 31 32 34 35 36 37 44 47 49 50 53 54 56 57 59 64 68 69 72 73 76 78 80 82 83 86 88 91 95 96 99 100 101 102 105 106 107 110 117 118 119 123 125 126 129 130 132 133 137 138 139 140 144 145 152 155 157 162 163 165 166 168 169 171 173 183 187 188 189 191 194 195 197 198 200 ...

result:

ok answers are correct. (1 test case)

Test #85:

score: 15
Accepted
time: 7ms
memory: 12872kb

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:

6 9 12 14 16 21 26 28 31 32 33 34 36 37 40 42 43 44 46 47 48 50 51 52 55 56 58 59 60 61 62 63 66 68 69 71 73 74 75 77 78 79 80 84 85 86 87 89 92 95 96 98 99 107 108 109 111 114 117 119 123 124 129 131 132 134 138 141 147 148 149 151 160 162 165 166 168 169 171 172 174 176 177 178 181 184 186 187 188...

result:

ok answers are correct. (1 test case)

Test #86:

score: 15
Accepted
time: 50ms
memory: 16452kb

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:

1 2 3 4 6 8 12 13 16 18 20 22 25 26 27 30 32 34 37 38 39 40 41 43 45 47 48 50 53 56 59 61 62 63 66 69 70 73 74 75 76 78 82 83 85 86 87 90 91 92 93 94 95 96 101 102 104 105 108 109 112 113 114 118 119 122 123 124 125 127 130 136 137 138 139 143 145 147 148 151 153 155 156 157 158 159 160 161 162 163 ...

result:

ok answers are correct. (1 test case)

Test #87:

score: 15
Accepted
time: 57ms
memory: 16316kb

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:

32 41 95 99 106 146 148 150 155 163 164 172 175 222 246 251 295 296 323 339 359 363 364 369 380 389 400 406 407 412 456 466 467 474 477 486 495 517 523 526 539 594 611 613 622 624 637 647 741 796 829 862 866 877 899 924 985 1007 1022 1034 1036 1038 1041 1047 1054 1056 1060 1062 1064 1065 1066 1068 1...

result:

ok answers are correct. (1 test case)

Test #88:

score: 15
Accepted
time: 63ms
memory: 16272kb

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:

49986 49985 49976 49971 49937 49935 49912 49907 49880 49807 49789 49756 49752 49748 49692 49691 49679 49676 49653 49639 49631 49613 49612 49522 49492 49491 49488 49472 49471 49466 49464 49448 49431 49401 49379 49354 49350 49331 49327 49277 49213 49148 49138 49120 49108 49106 49101 49097 49096 49094 ...

result:

ok answers are correct. (1 test case)

Test #89:

score: 15
Accepted
time: 49ms
memory: 15560kb

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:

109 918 2084 2302 3067 3068 3069 3071 3074 3075 3076 3077 3078 3080 3082 3083 3084 3085 3086 3089 3090 3091 3095 3096 3098 3101 3103 3105 3107 3111 3112 3114 3115 3117 3119 3121 3123 3125 3126 3127 3128 3130 3133 3134 3135 3136 3141 3143 3144 3146 3147 3149 3150 3151 3152 3153 3157 3161 3165 3166 31...

result:

ok answers are correct. (1 test case)

Test #90:

score: 15
Accepted
time: 120ms
memory: 20656kb

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:

5 16 26 27 29 33 39 49 55 56 60 61 73 81 94 96 97 111 119 122 126 132 133 140 143 146 147 149 152 153 157 161 164 166 168 171 173 174 183 185 188 191 194 204 205 210 213 215 216 220 222 225 226 228 229 231 233 237 238 239 240 241 243 245 246 247 248 249 253 255 256 257 258 259 260 261 266 268 269 27...

result:

ok answers are correct. (1 test case)

Test #91:

score: 15
Accepted
time: 128ms
memory: 20732kb

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:

5 7 15 20 23 26 34 39 43 50 52 56 61 62 64 70 80 84 88 93 102 122 125 133 136 137 144 145 146 150 165 167 171 178 183 189 192 197 204 214 225 233 243 244 247 248 253 254 255 258 260 264 265 266 267 270 271 272 273 281 284 285 286 291 294 295 297 298 309 310 311 312 314 315 316 318 320 322 325 328 32...

result:

ok answers are correct. (1 test case)

Test #92:

score: 15
Accepted
time: 112ms
memory: 21452kb

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:

1 3 4 7 8 9 10 11 13 14 15 16 17 19 21 23 25 26 27 29 31 34 36 39 40 41 43 46 52 55 57 58 60 63 67 69 73 75 76 77 79 82 83 85 87 88 91 93 94 98 104 107 110 115 118 122 124 126 128 129 131 134 135 138 139 142 143 146 147 153 157 158 159 162 164 166 169 175 176 177 179 183 184 185 187 190 192 198 199 ...

result:

ok answers are correct. (1 test case)

Test #93:

score: 15
Accepted
time: 128ms
memory: 19380kb

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:

100000 99996 99977 99973 99965 99963 99962 99958 99947 99932 99930 99913 99910 99895 99881 99879 99878 99863 99862 99859 99856 99850 99847 99839 99816 99811 99808 99807 99806 99805 99799 99784 99767 99764 99762 99760 99755 99751 99744 99735 99725 99710 99704 99682 99673 99667 99666 99664 99658 99655...

result:

ok answers are correct. (1 test case)

Test #94:

score: 15
Accepted
time: 97ms
memory: 13064kb

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:

6585 6581 6576 6537 6535 6528 6518 6514 6493 6492 6488 6483 6474 6473 6467 6463 6462 6460 6459 6458 6457 6451 6450 6449 6448 6445 6444 6443 6440 6438 6437 6436 6435 6433 6432 6426 6425 6419 6416 6413 6412 6411 6410 6409 6408 6407 6406 6404 6403 6402 6399 6398 6393 6392 6390 6389 6388 6384 6379 6377 ...

result:

ok answers are correct. (20 test cases)

Test #95:

score: 15
Accepted
time: 115ms
memory: 21916kb

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:

1 3 6 7 8 9 10 11 12 15 16 20 24 29 33 34 36 41 42 43 44 46 47 48 50 51 52 54 56 58 61 62 63 64 65 66 67 68 69 70 72 74 75 76 77 79 82 84 85 86 88 90 91 92 93 94 97 99 102 104 105 106 108 109 110 111 114 117 118 121 122 126 129 131 133 134 135 136 138 139 140 141 142 147 148 149 150 152 155 157 158 ...

result:

ok answers are correct. (1 test case)

Test #96:

score: 15
Accepted
time: 126ms
memory: 18532kb

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:

99989 99988 99984 99969 99953 99951 99945 99938 99927 99923 99920 99919 99918 99917 99916 99908 99899 99888 99887 99886 99884 99882 99873 99871 99870 99867 99860 99857 99852 99845 99832 99822 99820 99819 99815 99813 99810 99795 99793 99791 99786 99779 99775 99774 99769 99765 99763 99762 99756 99745 ...

result:

ok answers are correct. (1 test case)

Test #97:

score: 15
Accepted
time: 88ms
memory: 14048kb

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:

7 14 17 19 25 38 41 46 55 68 75 77 85 87 99 100 105 106 109 113 117 122 123 124 125 127 132 134 136 138 139 140 142 143 145 146 147 150 151 154 155 159 160 162 163 164 165 166 167 168 170 174 176 177 178 179 185 186 189 190 192 193 195 198 199 200 201 203 204 205 206 207 210 211 215 216 221 222 223 ...

result:

ok answers are correct. (10 test cases)

Test #98:

score: 15
Accepted
time: 115ms
memory: 11460kb

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:

24 26 40 41 44 45 46 47 49 50 51 52 55 59 61 63 67 71 72 73 74 77 79 80 83 84 85 86 87 89 91 93 94 95 97 99 100 102 106 108 110 111 114 115 116 117 118 119 122 123 126 127 129 130 131 132 134 135 137 140 141 148 149 151 152 154 155 156 157 161 162 163 166 168 170 171 175 176 177 179 180 181 182 188 ...

result:

ok answers are correct. (100 test cases)

Test #99:

score: 15
Accepted
time: 99ms
memory: 12144kb

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:

5 18 19 22 23 24 27 29 34 36 39 40 42 43 46 47 49 51 56 61 63 65 66 67 69 74 75 78 79 82 86 87 89 91 95 96 98 100 103 104 109 110 113 114 116 120 121 122 123 125 127 129 131 133 134 135 136 137 139 141 142 145 147 148 149 157 158 166 168 171 172 173 175 177 178 180 182 183 185 187 188 191 194 196 19...

result:

ok answers are correct. (100 test cases)

Test #100:

score: 15
Accepted
time: 103ms
memory: 13440kb

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:

9 28 36 37 52 59 66 76 78 81 82 87 91 102 106 110 116 118 120 121 128 136 142 152 153 159 161 162 164 170 171 174 179 180 182 183 190 203 205 206 214 227 239 240 241 250 257 258 268 269 271 274 285 291 299 301 305 308 315 339 341 342 344 345 347 350 351 352 353 357 359 360 361 362 363 364 366 368 37...

result:

ok answers are correct. (10 test cases)

Test #101:

score: 15
Accepted
time: 113ms
memory: 11708kb

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:

918 911 910 892 883 880 879 858 851 840 824 820 816 789 785 778 767 764 758 754 752 745 728 727 707 698 689 683 677 674 671 665 663 661 660 659 657 655 641 639 637 636 626 620 612 607 604 602 597 593 588 574 571 570 563 562 556 553 533 529 528 526 524 514 512 502 501 499 497 496 495 494 493 491 490 ...

result:

ok answers are correct. (100 test cases)

Test #102:

score: 15
Accepted
time: 79ms
memory: 12088kb

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:

761 758 755 751 750 747 746 742 715 710 695 690 682 678 663 656 639 631 621 620 619 616 588 576 574 569 564 556 534 532 514 512 511 502 494 486 485 484 482 481 478 475 467 461 433 432 431 430 427 425 424 422 421 420 419 417 415 414 413 411 410 408 406 405 404 403 402 401 400 399 398 397 396 395 394 ...

result:

ok answers are correct. (100 test cases)

Test #103:

score: 15
Accepted
time: 99ms
memory: 11652kb

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:

11 19 27 29 30 35 52 58 69 76 77 80 81 90 93 106 115 118 121 122 124 127 130 132 133 136 138 140 141 143 145 146 147 149 150 151 152 154 156 157 158 161 162 164 167 168 170 171 172 174 175 176 178 179 183 184 185 186 187 192 194 195 196 200 201 206 207 209 210 211 212 213 215 219 221 222 224 226 232...

result:

ok answers are correct. (100 test cases)

Test #104:

score: 15
Accepted
time: 103ms
memory: 11808kb

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:

1601 1590 1552 1549 1537 1535 1530 1513 1511 1510 1499 1489 1487 1483 1481 1449 1446 1445 1444 1443 1440 1437 1432 1430 1427 1423 1420 1412 1402 1401 1395 1366 1346 1344 1323 1316 1315 1310 1298 1288 1282 1281 1278 1267 1266 1261 1248 1233 1226 1203 1196 1188 1184 1182 1169 1156 1155 1152 1150 1140 ...

result:

ok answers are correct. (100 test cases)

Test #105:

score: 15
Accepted
time: 107ms
memory: 11540kb

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:

2 4 12 23 28 63 65 75 81 87 91 93 96 97 99 104 106 108 109 111 112 113 114 115 116 117 118 120 122 123 127 130 131 132 134 136 138 139 141 143 146 147 152 153 154 159 164 165 167 168 169 170 171 173 176 178 181 182 184 185 186 187 188 189 194 195 197 198 202 207 208 210 215 217 218 223 225 226 228 2...

result:

ok answers are correct. (100 test cases)

Test #106:

score: 15
Accepted
time: 102ms
memory: 12820kb

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:

6 9 27 33 49 60 67 70 75 103 117 121 122 125 126 127 128 132 134 138 139 140 143 144 148 153 155 156 157 160 161 163 166 168 169 171 172 173 174 176 179 180 182 183 185 188 190 194 197 198 199 203 204 205 206 207 208 211 215 216 217 218 220 221 222 224 229 231 232 233 236 237 239 242 245 247 250 251...

result:

ok answers are correct. (100 test cases)

Test #107:

score: 15
Accepted
time: 108ms
memory: 12860kb

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:

3 5 7 13 20 24 26 39 44 49 51 52 54 55 56 60 62 64 65 66 67 70 71 72 73 74 75 77 80 81 82 83 84 86 87 88 91 94 95 96 97 98 102 104 107 108 111 112 116 118 119 124 125 127 128 130 131 133 135 137 140 141 142 143 144 145 146 148 151 153 154 155 157 158 165 167 168 169 170 173 174 177 179 181 185 187 1...

result:

ok answers are correct. (10 test cases)

Test #108:

score: 15
Accepted
time: 112ms
memory: 12452kb

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:

10 11 12 13 15 17 20 21 26 28 31 33 34 37 40 41 42 43 46 47 48 51 56 57 59 61 62 63 68 74 78 81 84 85 86 87 89 91 92 93 94 95 96 98 99 100 101 102 103 106 109 110 111 117 118 119 120 127 128 130 131 132 135 138 140 141 142 144 145 148 152 159 164 166 167 168 170 171 172 173 174 175 181 184 186 189 1...

result:

ok answers are correct. (100 test cases)

Test #109:

score: 15
Accepted
time: 353ms
memory: 12020kb

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:

4 10 12 16 17 18 19 20 21 22 23 24 26 28 30 31 33 35 41 42 46 50 51 52 54 58 59 60 62 63 64 66 67 70 72 74 77 78 79 80 81 82 83 85 89 90 94 97 98 99 
12 14 22 23 24 25 26 27 31 32 36 37 38 41 42 46 47 49 51 52 53 55 56 57 58 59 60 61 64 65 66 70 71 75 78 79 82 83 84 85 87 89 92 93 94 95 96 97 99 100...

result:

ok answers are correct. (1000 test cases)

Test #110:

score: 15
Accepted
time: 347ms
memory: 12096kb

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:

2 6 8 11 15 22 23 25 26 27 29 30 31 32 33 37 38 40 41 42 43 44 49 51 52 55 56 62 63 64 70 71 72 73 75 77 78 79 82 83 85 86 89 90 92 95 97 98 99 100 
4 9 15 16 17 18 20 22 24 25 26 28 29 31 32 33 37 38 42 44 48 50 51 57 58 59 60 62 64 66 68 70 72 74 75 76 78 80 81 83 85 89 90 92 93 94 95 97 99 100 
9...

result:

ok answers are correct. (1000 test cases)

Test #111:

score: 15
Accepted
time: 349ms
memory: 12452kb

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:

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

result:

ok answers are correct. (1000 test cases)

Test #112:

score: 15
Accepted
time: 348ms
memory: 11312kb

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:

4 6 11 14 17 18 19 21 23 24 25 27 28 29 31 32 38 44 45 46 49 50 52 54 55 56 61 62 63 64 66 67 68 72 74 75 77 78 79 81 84 85 88 89 93 94 95 97 98 99 
1 7 11 15 17 19 21 26 27 28 29 30 34 36 41 42 43 44 47 48 49 51 54 55 56 57 59 63 64 65 68 69 71 73 74 75 77 78 81 82 83 84 85 87 91 92 93 94 95 100 
6...

result:

ok answers are correct. (1000 test cases)

Test #113:

score: 15
Accepted
time: 348ms
memory: 10848kb

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:

2 7 8 9 10 14 15 17 19 23 25 26 30 31 32 33 34 36 37 41 43 44 45 49 50 53 56 58 60 63 66 69 70 72 76 78 80 81 84 85 86 88 89 90 92 94 96 97 98 99 
11 13 14 15 18 19 20 21 23 24 26 28 31 32 34 38 39 41 42 45 47 48 54 56 57 58 61 62 65 67 69 70 71 72 74 75 77 82 83 84 85 87 88 89 90 92 93 94 96 97 
3 ...

result:

ok answers are correct. (1000 test cases)

Test #114:

score: 15
Accepted
time: 366ms
memory: 11828kb

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:

2 10 12 21 26 27 28 29 30 32 33 35 36 39 40 43 44 46 47 49 52 53 56 57 58 61 63 64 65 67 68 72 74 75 76 77 78 79 80 81 85 86 89 91 92 94 96 98 99 100 
4 6 7 9 11 13 14 15 18 20 23 24 25 26 27 28 31 32 36 37 38 39 43 44 45 46 48 50 51 52 53 54 56 58 59 61 62 66 72 76 80 81 83 84 86 90 95 96 99 100 
8...

result:

ok answers are correct. (1000 test cases)

Test #115:

score: 15
Accepted
time: 364ms
memory: 12272kb

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:

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

result:

ok answers are correct. (1000 test cases)

Test #116:

score: 15
Accepted
time: 374ms
memory: 12060kb

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:

96 94 81 79 65 62 58 56 55 54 53 52 51 50 49 45 44 43 42 41 40 39 38 37 36 35 34 33 32 30 29 28 27 24 20 19 18 16 15 14 13 12 11 10 9 8 7 5 4 2 
2 8 10 11 16 17 18 20 21 22 24 28 30 31 32 34 36 37 42 43 44 46 47 48 53 54 55 57 59 60 62 63 65 68 69 72 74 75 78 83 85 86 88 89 90 91 93 94 97 99 
3 7 8 ...

result:

ok answers are correct. (1000 test cases)

Test #117:

score: 15
Accepted
time: 384ms
memory: 11684kb

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:

78 71 67 64 57 56 53 51 50 49 47 44 42 41 40 39 38 36 35 34 33 32 31 30 28 27 26 25 24 23 22 21 20 19 18 17 16 14 13 12 11 10 9 8 7 6 4 3 2 1 
12 14 21 23 26 28 31 32 33 36 38 39 40 41 46 47 50 51 52 56 57 58 60 61 65 66 67 71 73 75 76 78 79 80 83 84 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
1 16 1...

result:

ok answers are correct. (1000 test cases)

Test #118:

score: 15
Accepted
time: 379ms
memory: 12060kb

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:

7 9 10 16 18 21 25 26 28 31 33 37 38 39 40 41 45 47 49 50 51 52 55 56 57 59 60 62 64 65 66 67 69 70 71 72 74 78 79 81 85 86 88 90 91 92 96 97 98 100 
4 6 7 8 9 10 11 14 18 20 23 25 26 27 28 32 33 36 38 40 41 43 46 49 52 53 54 55 56 59 61 62 63 65 66 68 69 71 73 75 76 77 82 84 85 87 88 94 97 98 
97 9...

result:

ok answers are correct. (1000 test cases)

Subtask #6:

score: 13
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #119:

score: 13
Accepted
time: 0ms
memory: 11992kb

input:

1
100
362287593 364248162
187128808 936550222
199429428 932702024
155636925 951743713
482490872 498427338
533423243 756335366
542814068 548453153
206919942 923525235
264229089 820822108
211088232 921940165
49588507 56568679
482265901 502140676
661557083 723927232
8607074 994298918
102830687 10851261...

output:

1 11 15 16 17 19 21 24 25 26 27 28 30 31 32 33 34 36 37 39 40 46 47 50 51 53 55 58 59 60 61 62 64 66 68 69 73 75 76 77 80 84 86 87 88 90 95 97 99 100 

result:

ok answers are correct. (1 test case)

Test #120:

score: 13
Accepted
time: 2ms
memory: 12052kb

input:

1
100
285465612 290098506
719076909 719655361
518612806 830186163
247772854 250934659
608243553 742799866
659043485 677733329
599855770 805598007
60101402 970349086
201709392 927164534
29304715 33752750
52857946 988086001
18516668 34065115
389070681 399317982
93937006 959774179
542136922 820217424
2...

output:

1 4 10 13 22 23 24 25 26 28 30 31 33 35 37 39 40 41 44 48 49 52 54 56 59 60 61 62 63 65 66 68 69 70 71 72 73 74 77 78 79 80 81 84 85 88 92 93 95 100 

result:

ok answers are correct. (1 test case)

Test #121:

score: 13
Accepted
time: 0ms
memory: 12076kb

input:

1
100
511710858 576074376
232830623 346546316
70803911 548875318
206979741 724889385
244958506 681766150
766773375 999237133
78929627 311977061
163289686 232830623
232830623 859566759
501719510 590577240
78587229 316349275
20254073 65994073
93599178 494164849
472555746 590577240
167025217 912386079
...

output:

12 34 43 44 45 46 47 49 50 51 52 54 55 57 58 59 60 61 62 63 64 65 66 67 69 70 71 74 75 76 77 78 80 83 84 85 86 87 88 89 90 91 92 93 94 95 96 98 99 100 

result:

ok answers are correct. (1 test case)

Test #122:

score: 13
Accepted
time: 2ms
memory: 12384kb

input:

1
100
913939627 942651155
197251638 464175241
606539196 676302558
194709765 873058046
71733630 738692485
464175241 873058046
71733630 913939627
606539196 913939627
71733630 360490219
194709765 464175241
223170319 606539196
676302558 738692485
194709765 360490219
913939627 942651155
194709765 9139396...

output:

43 44 45 48 49 50 52 53 54 55 56 57 59 60 61 62 63 64 65 66 67 68 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 97 98 99 100 

result:

ok answers are correct. (1 test case)

Test #123:

score: 13
Accepted
time: 2ms
memory: 11904kb

input:

1
100
209692296 607785499
11801734 182905817
325451870 658197121
694407977 900949299
19786620 516365003
786018169 896943665
47498328 792243106
302853010 743187888
119378542 678441670
419075533 972444090
1841681 768713384
686934625 830336782
24481630 191068410
438130325 995872103
155165750 282532128
...

output:

22 23 27 29 30 31 32 33 34 35 36 38 39 40 41 43 45 46 47 48 50 54 55 59 61 62 68 69 73 76 77 79 81 82 83 84 85 86 88 89 90 91 92 93 94 95 97 98 99 100 

result:

ok answers are correct. (1 test case)

Test #124:

score: 13
Accepted
time: 0ms
memory: 11444kb

input:

1
100
493243644 553316984
827268467 953138156
882002347 904533052
115195143 291320054
721846298 755220122
366512354 407276307
494319562 553316984
127859173 283332020
607814283 656186331
458290872 558765660
493243644 558765660
78082662 102011515
64812773 107532681
347188179 412156564
36373345 4281788...

output:

88 87 85 84 83 82 81 78 77 76 75 73 68 66 65 64 63 60 59 58 57 56 53 51 49 44 43 42 41 40 39 38 37 36 28 25 24 23 21 20 17 16 11 10 9 7 5 3 2 1 

result:

ok answers are correct. (1 test case)

Test #125:

score: 13
Accepted
time: 2ms
memory: 11568kb

input:

1
400
228233701 397484825
819417892 833772541
323198330 476943576
92341280 648666798
695759252 743101893
144120125 667793597
307337075 882821768
493791944 910614116
715622293 764883840
76067907 438315191
749548765 894347279
408250458 575562711
84553405 584562395
109981287 151200699
244490028 7678622...

output:

100 158 159 160 161 162 163 164 168 169 171 172 174 175 177 178 180 181 182 183 184 185 186 187 188 189 190 192 194 195 196 197 198 199 200 203 204 205 206 208 209 210 211 212 213 214 216 217 219 220 221 222 223 224 225 226 227 229 230 231 232 234 236 237 238 239 240 241 242 243 244 245 246 247 248 ...

result:

ok answers are correct. (1 test case)

Test #126:

score: 13
Accepted
time: 0ms
memory: 12116kb

input:

1
500
559957680 833501771
57753416 313477598
391190508 992586662
5636293 382559044
61636749 305284167
627186487 773106569
155394731 217154656
455234696 936424390
422523435 971455332
128038388 247637295
444411296 950742548
97704147 267327289
496063923 894728055
89332663 272338347
451604471 943121827
...

output:

394 393 392 391 389 388 387 386 385 383 381 380 379 378 377 373 370 369 368 364 361 360 359 357 356 353 352 350 349 348 347 346 345 344 343 342 341 340 339 338 335 330 329 328 327 326 325 324 320 318 317 316 315 314 313 312 311 309 308 307 303 301 296 295 294 293 292 291 290 289 287 285 284 281 279 ...

result:

ok answers are correct. (1 test case)

Test #127:

score: 13
Accepted
time: 2ms
memory: 12196kb

input:

1
500
462 465
423 429
334 335
279 336
189 190
285 288
554 560
179 180
163 242
537 538
572 573
154 155
32 33
252 253
136 137
523 625
223 231
661 669
580 581
250 255
283 284
447 448
263 274
74 75
57 61
338 343
411 417
418 420
454 457
164 180
90 106
469 470
472 482
120 121
16 687
474 480
561 562
403 40...

output:

498 495 485 480 479 477 476 472 469 457 453 449 447 440 437 435 422 421 420 419 416 415 414 413 412 410 407 405 404 403 402 400 398 397 394 393 392 390 389 387 386 385 383 382 379 377 375 370 368 365 364 363 361 360 358 357 356 355 352 350 349 346 345 344 343 342 341 336 335 332 331 330 329 327 326 ...

result:

ok answers are correct. (1 test case)

Test #128:

score: 13
Accepted
time: 0ms
memory: 12188kb

input:

1
500
216 468
23 141
184 451
97 198
140 374
231 357
292 406
182 448
376 378
248 292
252 465
334 451
10 414
244 311
165 407
185 470
105 301
242 493
266 368
106 241
374 391
98 207
76 240
325 340
111 196
172 352
95 186
9 375
230 318
255 290
5 155
152 158
119 236
74 439
324 330
101 124
279 291
95 322
50...

output:

32 53 64 95 172 173 174 176 177 178 179 181 182 183 184 185 187 188 189 192 193 194 195 196 197 198 199 200 201 203 206 208 209 210 211 212 215 217 218 219 220 221 222 224 225 226 227 228 229 230 231 232 234 235 238 239 240 241 242 245 246 247 248 249 250 251 252 253 254 256 258 259 260 261 262 263 ...

result:

ok answers are correct. (1 test case)

Test #129:

score: 13
Accepted
time: 2ms
memory: 11368kb

input:

1
500
691 960
163 385
160 663
158 561
142 780
439 790
40 208
867 895
369 922
719 828
432 481
154 213
109 316
493 975
121 789
504 660
266 806
412 438
73 865
890 942
437 798
174 450
738 897
105 127
485 639
461 766
94 289
195 576
325 717
725 907
265 441
762 768
497 626
479 815
180 335
857 882
259 823
3...

output:

72 121 122 123 128 129 130 131 132 133 134 136 137 138 139 140 141 142 143 145 148 149 150 153 154 155 156 157 158 163 164 165 166 167 168 169 170 172 173 175 177 178 183 184 185 189 190 191 192 193 196 197 199 200 201 204 205 206 208 209 210 211 212 215 217 219 220 221 223 224 225 228 231 232 233 2...

result:

ok answers are correct. (1 test case)

Test #130:

score: 13
Accepted
time: 4ms
memory: 12104kb

input:

10
50
270917656 694122000
494597004 994247161
393212942 856921545
897003089 983043105
217230127 345589071
755442947 963555826
6797916 185680545
808493657 813892855
225281947 736530867
329675423 950884152
82011776 199608778
405072926 698320811
400734449 710359121
95540240 280628667
421554282 52533707...

output:

19 21 22 23 25 26 28 30 31 33 34 37 38 39 40 41 42 43 44 45 46 47 48 49 50 
8 15 16 17 18 19 20 21 22 23 24 25 27 30 31 32 33 35 36 37 41 42 45 47 49 
8 18 26 27 28 29 30 31 32 33 34 35 37 38 39 40 41 42 43 44 46 47 48 49 50 
4 16 18 19 20 21 22 23 24 25 26 27 28 33 34 35 38 39 40 41 43 44 45 49 50 ...

result:

ok answers are correct. (10 test cases)

Test #131:

score: 13
Accepted
time: 5ms
memory: 12156kb

input:

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

output:

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

result:

ok answers are correct. (10 test cases)

Test #132:

score: 13
Accepted
time: 2ms
memory: 12200kb

input:

1
500
686 790
221 336
639 891
646 989
171 367
614 912
604 783
540 982
597 832
164 317
200 258
182 542
333 910
263 857
656 820
601 830
635 877
122 379
438 904
108 691
456 884
700 875
528 793
127 350
423 996
495 930
521 808
198 329
199 619
28 498
183 735
366 978
690 865
436 962
719 985
586 943
375 795...

output:

2 5 10 11 12 18 20 24 28 29 30 31 39 40 42 44 45 48 50 54 55 57 58 61 62 65 68 70 71 72 74 77 83 84 85 87 93 99 100 101 102 104 105 106 107 108 109 110 111 114 116 117 119 127 129 130 132 133 135 137 138 140 141 142 144 145 146 147 148 149 154 156 157 159 161 162 165 167 169 170 173 174 175 176 177 ...

result:

ok answers are correct. (1 test case)

Subtask #7:

score: 13
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #6:

100%
Accepted

Test #133:

score: 13
Accepted
time: 2ms
memory: 11348kb

input:

1
1000
221570002 911991775
33279638 986348305
352989293 353997982
134590083 949156005
602134935 748161152
679949196 719004656
327561390 842837652
685566722 685962755
402861693 403147772
187646140 188236273
396394315 817968027
53702027 53972739
671406282 671557981
399262216 815809026
500748542 783713...

output:

10 12 23 24 29 32 46 48 51 56 57 59 60 61 62 63 64 66 67 70 71 72 73 75 76 78 80 82 83 85 89 90 91 92 96 97 98 100 101 107 109 110 111 112 116 120 122 124 125 129 134 135 136 137 139 143 144 145 146 147 148 151 152 155 156 157 161 162 164 165 167 168 169 170 172 173 174 175 176 177 179 183 184 185 1...

result:

ok answers are correct. (1 test case)

Test #134:

score: 13
Accepted
time: 2ms
memory: 11168kb

input:

1
1000
45615391 977058383
653100524 704912668
687366982 690074277
169667206 920249712
277686487 868924818
137423384 934531981
521490985 740172349
166221351 922311025
88201677 956085327
499381940 755570556
358823892 818964435
357427090 820224031
562208548 567867022
523300484 739944517
193998392 91005...

output:

18 20 24 37 41 43 54 57 64 69 90 93 95 101 107 111 113 116 124 131 138 139 141 142 144 147 148 149 150 154 155 159 160 161 162 163 166 167 169 170 171 172 173 174 175 177 178 179 181 182 185 186 187 191 193 195 197 201 202 206 207 211 213 215 217 219 224 225 227 230 231 233 234 235 237 238 239 241 2...

result:

ok answers are correct. (1 test case)

Test #135:

score: 13
Accepted
time: 3ms
memory: 12068kb

input:

10
110
484298777 735037709
494462382 706552261
521509838 532827264
517301929 696420059
197634253 212883747
14846373 989015371
76311148 951997867
301641081 837067053
403690815 430085440
121127491 937535377
129361896 936104500
413939806 426806998
589933414 637418522
179593956 919106470
571026567 67470...

output:

7 8 10 11 14 16 17 20 21 23 24 25 26 27 28 32 35 38 40 42 45 46 48 49 55 57 59 61 63 64 65 66 67 69 70 71 76 77 78 79 80 81 84 85 86 90 92 93 99 100 101 103 104 106 107 
2 6 7 13 16 17 18 19 21 22 26 27 28 29 30 32 34 35 36 37 39 41 45 46 47 48 54 56 57 58 60 61 64 66 68 72 74 77 79 80 
196 190 183 ...

result:

ok answers are correct. (10 test cases)

Test #136:

score: 13
Accepted
time: 2ms
memory: 12240kb

input:

1
1000
527149750 758781431
238813256 795653481
357540618 939614019
75629345 972234413
50797122 285965722
372210752 831419218
596899089 708388138
967488564 975475216
252832263 482831690
310775868 468093842
184320516 226771305
69365262 536483357
32793592 930571648
439883956 673024246
135283068 3801295...

output:

127 135 186 255 284 293 360 361 363 364 365 366 367 368 369 370 372 373 374 375 376 378 379 380 381 382 383 384 385 387 388 389 390 391 393 394 395 396 397 400 403 404 405 406 407 410 411 412 413 416 418 420 421 423 427 429 430 432 433 435 437 438 439 440 442 443 444 445 447 448 450 451 452 453 454 ...

result:

ok answers are correct. (1 test case)

Test #137:

score: 13
Accepted
time: 2ms
memory: 11068kb

input:

1
1000
368916915 713051666
311565134 368916915
487214187 861363447
184393155 850235159
100082171 967571759
238733803 579710655
765340211 836525551
765340211 836525551
368916915 967571759
184393155 368916915
234673670 815961586
184393155 311565134
487214187 738430201
168451888 861363447
635672906 738...

output:

162 173 286 288 289 290 291 293 294 295 297 299 301 302 303 305 306 307 308 309 311 312 315 317 318 319 321 323 325 326 328 329 330 331 332 334 335 336 338 339 341 342 343 344 345 346 348 349 350 351 352 353 354 355 356 357 359 360 362 363 364 366 367 368 371 373 374 377 378 379 382 384 385 386 387 ...

result:

ok answers are correct. (1 test case)

Test #138:

score: 13
Accepted
time: 2ms
memory: 11120kb

input:

1
1000
205493792 867439944
398964704 952472604
808097531 914125328
237993740 916898380
162143246 294810903
669225392 975576548
37889786 809739567
561387557 879042583
168684314 970778409
540965555 911610241
404715553 757542602
228175149 760805305
926006951 994632976
236669338 863725324
200183115 2540...

output:

159 173 175 177 328 329 332 334 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 353 354 355 357 358 359 362 363 364 365 366 367 370 372 374 375 376 377 379 380 381 382 383 385 386 387 388 389 391 393 394 395 396 397 398 399 402 404 405 407 408 409 411 412 415 416 417 418 419 420 421 422 ...

result:

ok answers are correct. (1 test case)

Test #139:

score: 13
Accepted
time: 0ms
memory: 11996kb

input:

10
124
220925753 990704488
829446704 896457004
275216239 648601182
153588846 222782668
469195692 964049365
391323562 588604658
421324193 456907652
352527995 612406208
777507271 861574497
259086143 493933657
134904012 873104311
33131787 239170060
475869329 955856249
24546038 809497336
250730258 62914...

output:

4 7 25 41 42 43 44 49 50 51 53 56 58 59 60 61 62 63 64 65 66 68 69 70 71 72 75 76 78 79 80 82 83 84 85 87 89 90 91 92 93 94 97 98 100 102 104 105 106 107 110 112 113 114 115 116 117 118 119 121 122 124 
8 9 10 11 12 13 14 19 20 23 24 28 31 32 34 35 36 37 39 40 
2 14 38 43 44 45 46 47 48 51 53 54 55 ...

result:

ok answers are correct. (10 test cases)

Test #140:

score: 13
Accepted
time: 3ms
memory: 12028kb

input:

1
5000
118658972 536222207
61138554 593944121
740875443 904010358
271592325 383983429
296711785 358413544
755659851 888654806
303956552 348461740
782668441 865970272
316741243 335753371
237683950 419731049
99528260 555366633
298499921 356147381
315321403 336584389
17132029 639862762
97887116 5571239...

output:

1122 1124 1127 1129 1130 1131 1133 1134 1135 1139 1140 1143 1146 1148 1149 1150 1152 1153 1156 1157 1158 1161 1162 1163 1164 1165 1166 1169 1170 1171 1173 1174 1176 1178 1179 1180 1183 1185 1186 1187 1188 1190 1191 1192 1193 1195 1196 1197 1198 1202 1206 1207 1210 1212 1213 1214 1216 1218 1223 1224 ...

result:

ok answers are correct. (1 test case)

Test #141:

score: 13
Accepted
time: 3ms
memory: 12128kb

input:

5
276
148051595 218400093
170562291 178244353
611562431 625485963
173156782 177787843
441998436 480555036
759681224 798828809
374600237 395475739
817258917 858296801
814711973 863033573
588142813 666280061
113802149 252341504
314602856 353928243
102424580 258205702
12474432 90588361
133863516 228538...

output:

40 41 42 44 46 47 49 50 51 52 53 54 55 58 61 62 63 64 69 70 71 73 76 77 78 79 80 82 85 88 89 93 95 96 97 98 101 103 105 107 109 111 113 114 115 116 117 118 119 121 122 123 124 126 132 133 134 136 137 139 142 145 147 149 151 152 154 155 158 159 160 161 162 164 165 166 168 171 172 173 174 175 176 178 ...

result:

ok answers are correct. (5 test cases)

Test #142:

score: 13
Accepted
time: 5ms
memory: 12500kb

input:

1
5000
5894 5895
2899 2900
2691 2692
3936 3938
1543 1555
2059 2070
5089 5128
10 26
6017 6020
5795 5996
2077 5634
2578 2582
525 561
2517 2518
5299 5301
106 683
192 193
3134 3136
118 679
1674 1686
4822 4852
2473 2474
5720 6005
4934 4935
3714 3716
5696 5697
4542 4558
5523 5524
361 362
5662 5663
40 45
3...

output:

2 3 14 17 22 44 49 51 52 56 57 61 71 73 74 76 78 90 91 99 100 102 104 107 109 111 114 120 132 135 136 144 150 167 173 182 183 184 185 194 196 197 204 208 214 216 218 236 238 243 244 246 247 248 251 252 254 255 256 258 261 262 263 264 265 268 271 273 274 275 276 277 278 280 281 285 286 287 289 291 29...

result:

ok answers are correct. (1 test case)

Test #143:

score: 13
Accepted
time: 7ms
memory: 12188kb

input:

10
136
36 37
15 16
77 78
54 60
40 41
39 45
176 177
71 72
148 150
132 136
130 137
56 57
5 178
163 167
102 103
13 21
143 157
35 37
79 80
24 29
8 22
185 186
115 116
69 72
133 134
10 11
151 155
144 156
49 50
2 178
92 93
102 140
171 172
180 181
147 155
56 57
176 177
25 26
5 175
61 64
123 124
69 73
40 42
...

output:

3 5 12 18 19 21 24 26 29 30 31 36 38 39 40 42 43 45 46 47 50 51 52 53 54 57 58 61 63 64 65 67 68 69 72 74 76 77 80 81 82 84 87 91 92 93 95 97 99 100 103 104 106 107 111 113 115 116 120 121 124 125 126 127 130 133 134 135 
2 4 5 6 9 18 28 30 35 39 43 52 54 66 71 75 76 77 83 84 86 89 98 99 102 105 111...

result:

ok answers are correct. (10 test cases)

Test #144:

score: 13
Accepted
time: 14ms
memory: 11744kb

input:

40
66
13 17
57 58
77 78
35 73
76 81
85 86
88 89
13 14
85 86
37 67
68 69
79 80
75 95
96 98
53 54
59 60
55 56
10 19
27 28
38 39
82 94
49 50
15 16
41 65
40 66
9 33
36 73
7 100
74 95
77 78
44 48
10 19
11 12
22 23
88 93
71 72
62 63
21 28
22 23
1 101
42 64
52 56
25 26
21 24
44 51
18 19
31 32
20 29
4 5
35 ...

output:

8 15 19 20 22 23 31 32 33 34 38 39 40 41 42 43 44 45 46 47 48 49 50 52 53 55 56 58 60 61 63 64 66 
9 11 14 18 26 29 35 37 38 40 42 43 44 45 46 47 49 51 52 54 56 57 58 59 60 64 65 66 67 68 69 70 71 72 74 75 77 79 80 81 83 84 85 87 88 89 90 91 92 93 96 102 
2 9 11 15 17 22 25 29 31 34 43 44 46 47 48 4...

result:

ok answers are correct. (40 test cases)

Test #145:

score: 13
Accepted
time: 24ms
memory: 11408kb

input:

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

output:

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

result:

ok answers are correct. (100 test cases)

Test #146:

score: 13
Accepted
time: 6ms
memory: 11124kb

input:

10
320
39 154
72 91
266 273
184 227
112 155
40 249
30 108
134 226
210 253
83 175
15 40
121 238
273 279
154 296
222 272
221 251
9 264
96 116
134 166
202 204
27 181
74 173
35 291
10 119
47 121
160 282
146 255
7 117
159 228
227 292
123 237
177 200
211 260
238 248
96 112
25 63
17 251
102 185
36 275
176 ...

output:

35 70 83 87 88 89 91 94 96 97 98 99 102 103 104 105 106 107 108 109 110 112 113 114 115 116 117 118 119 122 123 124 125 127 128 130 131 132 134 135 137 138 139 145 146 148 149 152 153 154 155 156 158 159 162 163 164 165 166 167 170 171 172 174 176 177 178 180 181 182 183 184 186 191 192 193 195 198 ...

result:

ok answers are correct. (10 test cases)

Test #147:

score: 13
Accepted
time: 5ms
memory: 11260kb

input:

1
5000
1879 3332
711 1604
2182 2304
1911 3532
56 2470
1271 2463
1842 3974
2452 4955
447 530
1948 2449
3336 4653
1858 2054
1623 4295
1335 3708
2472 4382
1063 1235
88 3879
904 2279
3113 3763
175 3173
1193 4868
1451 3183
92 1683
4028 4214
72 4867
524 2838
2324 4183
2218 2339
3213 4525
2827 3418
1956 48...

output:

51 70 469 503 535 551 670 789 828 990 1036 1276 1295 1367 1401 1645 1677 1679 1681 1682 1683 1684 1685 1686 1687 1688 1690 1693 1695 1697 1698 1699 1700 1701 1702 1703 1705 1706 1708 1712 1713 1714 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1735 1736 17...

result:

ok answers are correct. (1 test case)

Test #148:

score: 13
Accepted
time: 7ms
memory: 11000kb

input:

10
802
20 1438
994 1337
843 1195
255 724
715 1090
246 1502
791 1004
327 1067
60 928
147 458
241 1444
925 1199
34 965
400 901
489 714
1405 1435
213 951
1189 1508
54 63
1213 1483
173 1183
442 1275
865 933
886 1131
8 707
95 670
1073 1513
987 1238
792 1547
702 992
1 288
641 760
336 1002
926 1477
141 592...

output:

19 123 195 217 243 289 299 300 303 304 307 309 310 312 315 316 317 318 320 322 324 325 326 327 328 329 330 332 333 334 335 336 337 338 339 340 341 343 344 346 347 348 350 351 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 372 373 374 375 377 378 379 380 384 385 386 387 388 389 390 3...

result:

ok answers are correct. (10 test cases)

Test #149:

score: 13
Accepted
time: 3ms
memory: 12252kb

input:

10
634
574437593 816957904
302671546 771277906
505493784 981380572
141295423 598533227
409138780 456351460
276181800 709651968
42886786 204138709
457801669 879016863
200929161 741203838
185321693 245948339
357884966 436905966
677018683 946059274
364729127 959087205
158994120 629433929
287588355 7822...

output:

23 69 118 165 166 168 170 171 172 173 174 175 177 178 179 180 181 182 183 186 187 189 191 192 196 197 198 199 200 201 202 205 206 208 209 212 214 215 217 218 219 220 221 222 223 224 225 226 228 231 232 233 235 237 238 239 240 242 243 244 245 249 250 251 252 253 255 256 257 258 259 260 263 264 265 26...

result:

ok answers are correct. (10 test cases)

Test #150:

score: 13
Accepted
time: 7ms
memory: 11640kb

input:

10
500
138876369 265846114
294778882 590636569
93248540 685458213
704069928 828559168
254679650 597003691
330321613 955688773
72187964 332214256
246358602 832305171
246909315 815007275
109141099 374162937
242499327 825697150
879369311 928575321
258341936 287501522
370920865 457387863
394446204 70029...

output:

13 39 75 80 122 123 124 126 127 128 130 131 132 133 135 137 139 140 141 143 147 148 150 154 156 157 158 161 163 165 166 170 171 173 174 175 176 177 178 179 180 181 182 183 185 186 187 188 190 193 194 195 196 198 201 203 204 206 209 210 214 215 216 217 218 219 221 222 224 225 226 227 228 229 230 231 ...

result:

ok answers are correct. (10 test cases)

Test #151:

score: 13
Accepted
time: 3ms
memory: 12156kb

input:

10
500
310 515
456 912
673 955
788 831
659 707
230 537
636 643
421 862
85 588
140 712
206 661
519 977
343 800
182 608
478 963
392 438
602 632
6 81
313 542
561 611
548 920
328 640
380 383
448 728
428 444
9 637
86 794
83 300
594 944
33 968
157 503
174 302
303 874
340 798
406 876
645 897
210 943
314 94...

output:

23 107 111 144 160 161 163 164 166 167 169 170 171 172 174 176 177 178 179 180 181 182 183 184 185 186 188 190 191 192 195 198 199 200 201 203 205 206 208 209 212 215 216 217 218 219 220 224 225 226 227 229 231 232 234 235 236 237 238 239 240 241 242 244 245 246 248 249 250 251 252 255 256 259 262 2...

result:

ok answers are correct. (10 test cases)

Test #152:

score: 13
Accepted
time: 24ms
memory: 12296kb

input:

100
50
592823212 593560486
67616697 457555625
8660762 393834361
52024854 365229241
249585261 933258976
457312339 974919926
329982686 583258159
26625865 414858606
65906779 822627996
653597541 856464254
46783551 153487337
573544457 742797594
36029498 559099466
418379365 888552411
601658983 780914402
2...

output:

13 16 18 19 23 24 25 26 27 28 30 31 35 36 38 39 40 42 44 45 46 47 48 49 50 
3 4 
1 15 16 17 18 20 21 22 24 25 26 27 28 29 30 
1 
21 51 52 54 55 56 57 58 59 60 64 65 66 67 68 70 71 72 74 76 78 79 80 81 82 83 84 85 86 87 89 90 94 96 98 99 101 105 106 108 109 110 112 114 115 116 117 118 119 120 121 122...

result:

ok answers are correct. (100 test cases)

Test #153:

score: 13
Accepted
time: 25ms
memory: 12120kb

input:

100
4
107589863 890080709
888017791 904218165
366964348 561582455
304331927 535296056
16
507143090 930075958
253719143 867338553
272677291 450499516
293085726 990242978
147278963 221827329
3018140 317119276
929182034 973692331
37266414 887574886
615079302 917759735
282881604 455133616
146526379 7709...

output:

3 4 
5 6 8 10 11 12 13 14 
2 16 17 32 33 34 35 36 37 38 42 43 45 46 47 49 50 51 52 54 55 56 57 59 60 61 62 64 65 66 67 68 70 71 72 73 74 77 80 81 82 83 
29 34 35 36 37 38 39 40 42 43 44 45 46 48 49 50 53 55 56 57 58 59 60 61 62 63 64 67 68 69 70 73 74 75 77 79 81 83 85 86 89 90 91 92 93 94 95 96 97 ...

result:

ok answers are correct. (100 test cases)

Test #154:

score: 13
Accepted
time: 3ms
memory: 12632kb

input:

1
5000
5967 7816
5028 9616
3475 8596
7199 9466
6589 9748
1501 4313
5972 9809
266 2738
1610 5638
6162 9931
1747 3830
2601 9566
968 6221
1112 5036
1631 6903
3495 7873
4836 8105
162 6003
1274 4576
591 6343
2385 2824
2064 5832
5955 9340
3540 8637
1250 2767
6392 7926
2191 4532
4147 8390
470 6553
4567 807...

output:

6 8 9 11 13 14 15 18 19 20 21 22 25 27 29 31 32 33 34 36 39 40 42 44 47 50 52 55 57 58 59 60 64 66 67 68 69 71 72 75 76 77 78 79 85 86 87 95 96 97 98 99 102 103 104 105 106 107 108 110 112 114 117 118 119 122 123 127 128 131 132 133 135 137 142 144 145 150 151 153 157 159 161 162 164 165 167 168 169...

result:

ok answers are correct. (1 test case)

Subtask #8:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #6:

100%
Accepted

Dependency #7:

100%
Accepted

Test #155:

score: 12
Accepted
time: 7ms
memory: 12248kb

input:

1
10000
634813517 746476282
606954970 606968029
5603155 5664604
146733108 146830046
195788943 920962348
463711802 463809397
664464996 735669274
216089445 216197762
243736054 904269975
415547839 829608451
46129244 982189670
165276181 934539208
326627665 866034584
410884378 831162405
61604500 61621943...

output:

3 4 8 15 16 43 47 48 50 53 56 58 78 87 89 90 91 92 93 94 96 98 99 100 101 102 103 104 105 110 112 113 116 118 119 120 121 127 132 133 134 135 138 140 144 147 149 150 151 152 153 154 156 157 159 161 162 164 165 168 170 174 175 176 177 180 182 185 186 189 194 197 198 200 201 204 206 212 215 216 217 21...

result:

ok answers are correct. (1 test case)

Test #156:

score: 12
Accepted
time: 11ms
memory: 13396kb

input:

1
10000
380589071 846297610
449079479 817209685
650830157 650916044
383277669 383339434
460376034 460389500
528242789 787169057
250714924 896216542
557886924 557962141
446111517 446113720
183962951 184126732
323308017 323330540
388021991 842939689
123415350 949655016
230085111 907223744
227655214 90...

output:

10 11 34 35 36 41 42 46 48 49 51 53 56 58 59 60 61 62 63 64 65 66 68 69 70 73 74 77 79 80 81 84 85 88 89 92 93 94 95 96 98 103 104 106 107 109 110 111 112 113 114 115 121 122 123 124 129 130 136 137 139 141 142 145 146 147 148 155 157 160 161 162 165 168 170 171 172 173 175 176 179 180 181 182 183 1...

result:

ok answers are correct. (1 test case)

Test #157:

score: 12
Accepted
time: 10ms
memory: 12856kb

input:

1
10000
285939640 586007043
144908478 479317095
639482147 785768199
818819329 913963066
537479522 680067662
656319711 757638945
129270318 172241250
519163474 762977851
201118358 210064087
788332015 792884298
644500318 984514745
484608079 782681162
142397061 727174826
949588689 998097718
219008282 58...

output:

320 513 664 885 983 1150 1155 1165 1297 1342 1390 1522 1857 1921 2036 2128 2395 2396 2533 3004 3096 3097 3099 3101 3102 3105 3106 3110 3111 3112 3113 3114 3117 3118 3119 3120 3121 3123 3124 3125 3126 3127 3132 3135 3136 3137 3140 3141 3143 3145 3146 3147 3149 3150 3152 3153 3154 3155 3156 3157 3158 ...

result:

ok answers are correct. (1 test case)

Test #158:

score: 12
Accepted
time: 3ms
memory: 11392kb

input:

1
10000
25043884 301288445
337831183 756107368
265785120 377791402
377791402 994055154
383744602 475579013
383744602 532607569
680234910 775046850
334898622 532607569
749692187 853717387
377791402 508829931
377791402 906601668
648677460 966334526
641712379 680234910
93399731 933356179
31024070 36897...

output:

87 177 468 1126 1190 1328 1922 1932 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3019 3021 3022 3023 3024 3025 3026 3027 3028 3030 3031 3033 3035 3036 3037 3039 3041 3042 3043 3044 3045 3046 3047 3049 3051 3053 3054 3055 3056 3057 3058 3060...

result:

ok answers are correct. (1 test case)

Test #159:

score: 12
Accepted
time: 12ms
memory: 13132kb

input:

1
10000
411425103 764051595
593030255 742462361
277596319 477536908
257044538 571566384
319830859 378506733
475567054 512583106
484996595 973366153
684106755 918164521
103212444 538652443
51443763 76026910
101273608 841048581
374549348 956238743
142202945 504521772
249307731 939367055
12050239 79014...

output:

283 303 591 706 717 922 1023 1224 1308 1454 1642 1723 1830 1976 2352 2418 2438 2463 2491 2673 2675 3098 3137 3138 3140 3141 3142 3144 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3172 3173 3174 3175 3176 3177 3178 3179 3180 3183 3184 3185 3186 3...

result:

ok answers are correct. (1 test case)

Test #160:

score: 12
Accepted
time: 69ms
memory: 16668kb

input:

1
50000
326135026 859525865
316926409 869154434
314101601 872076846
24262256 159583699
480768602 704126572
566533079 617563933
523135938 661242315
387308766 797749988
212281930 971460861
501411885 682428851
435343685 750020121
533776146 649884078
498856067 685418677
337436792 847915541
457601022 726...

output:

30623 30622 30621 30620 30619 30618 30617 30616 30615 30614 30612 30609 30608 30607 30606 30605 30603 30602 30601 30600 30599 30598 30597 30596 30595 30594 30592 30591 30589 30588 30587 30586 30585 30583 30582 30581 30580 30579 30576 30575 30573 30572 30571 30570 30569 30567 30566 30564 30563 30562 ...

result:

ok answers are correct. (1 test case)

Test #161:

score: 12
Accepted
time: 46ms
memory: 13972kb

input:

1
50000
446250296 570066549
140434680 282647200
128233854 293766806
169581102 252977021
464725279 551676913
1267930 124233641
902056933 915813606
303877920 405351021
892921051 926241419
173387090 249545491
814093959 815957517
683787881 725578227
334667441 375463636
888527615 929624802
578948612 6406...

output:

1438 4131 6319 6320 6321 6323 6326 6329 6330 6331 6333 6334 6335 6336 6338 6340 6343 6344 6346 6347 6348 6349 6350 6351 6352 6355 6357 6358 6359 6360 6361 6362 6365 6366 6368 6369 6370 6371 6374 6375 6376 6377 6378 6379 6383 6384 6386 6387 6390 6392 6393 6394 6396 6398 6401 6404 6405 6406 6407 6408 ...

result:

ok answers are correct. (1 test case)

Test #162:

score: 12
Accepted
time: 68ms
memory: 15080kb

input:

1
50000
24828 24829
53188 53189
1864 1867
212 213
937 938
47164 47165
40882 42284
51335 51338
8718 8727
11407 11437
43430 43431
30746 30749
41862 41865
62925 62927
23308 23311
55974 56015
68856 68870
3512 3513
7251 7262
11616 11623
43996 43997
43074 43087
27312 27347
12682 12685
35178 35180
36239 36...

output:

1 4 5 18 28 29 38 40 42 47 54 57 58 59 67 68 71 78 80 82 87 88 93 102 109 110 117 119 125 127 133 134 151 152 154 155 158 160 163 164 165 167 177 179 182 189 199 200 204 205 214 218 225 234 240 245 252 255 266 271 274 277 278 285 293 294 295 300 305 308 309 329 334 339 345 350 354 357 361 365 369 37...

result:

ok answers are correct. (1 test case)

Test #163:

score: 12
Accepted
time: 50ms
memory: 14708kb

input:

1
50000
15059 34300
20388 29724
15608 42443
16174 23020
1243 4574
12225 30807
8728 16888
37092 39623
6567 32220
5244 35916
13316 49543
4131 30492
2753 6988
29243 33476
41065 42178
4786 47114
799 44604
8665 40552
24612 37977
3793 35532
8881 30094
22752 28231
2282 48271
6837 24905
2250 19126
19840 393...

output:

584 1127 1147 1745 2275 3121 5695 5815 5962 6043 6684 6907 6991 7110 7308 7616 7619 7719 8353 8976 9576 9850 10779 10883 11897 12579 12793 13961 14123 14496 15061 15268 15318 15439 15986 16213 16367 17038 17134 17333 17705 17706 17707 17708 17709 17710 17711 17712 17713 17714 17715 17717 17718 17719...

result:

ok answers are correct. (1 test case)

Test #164:

score: 12
Accepted
time: 153ms
memory: 21776kb

input:

1
100000
329611992 867459260
580201316 580203195
325360165 869193215
340589687 340591055
324177312 869602145
442089038 821074769
5459652 5475131
542766408 542778869
400076999 400104434
299432172 299433369
425010663 425012910
152959654 938061757
287655543 884456329
483803807 483805421
584423813 58443...

output:

100000 99997 99991 99987 99979 99972 99961 99957 99955 99952 99947 99935 99931 99926 99907 99888 99886 99879 99875 99871 99863 99861 99846 99843 99841 99834 99828 99824 99822 99821 99818 99809 99807 99789 99781 99767 99764 99761 99757 99752 99747 99746 99741 99736 99729 99719 99716 99715 99712 99711...

result:

ok answers are correct. (1 test case)

Test #165:

score: 12
Accepted
time: 127ms
memory: 17372kb

input:

1
100000
254324616 518443862
318347034 381085759
147096049 924339119
52914387 478364305
261293937 656660736
638053910 823838184
269630275 513654526
37573041 453124522
654278089 674745338
576399605 831725421
100414808 515967538
705097491 857384721
348122133 566529007
120676496 210583505
107738554 169...

output:

1048 2018 4109 5579 6539 7622 9227 9776 10915 11511 11682 11803 12464 12631 13151 13481 13491 14967 15791 16051 18109 18305 19325 19474 21893 22337 22438 22679 22878 23818 23872 24041 24160 24676 26368 26494 26499 26517 27471 27553 28191 30158 30981 31565 32572 32996 33391 33712 34114 34651 34846 34...

result:

ok answers are correct. (1 test case)

Test #166:

score: 12
Accepted
time: 45ms
memory: 12112kb

input:

1
100000
156008654 910742971
92755915 502719356
633105109 799239421
644228462 765187120
236836501 876790864
90507664 377164027
78990691 603699513
556861794 750549568
340702740 386159394
532399963 957898572
181234123 674268917
118293728 143760949
459397 644228462
218277717 855306846
742276595 8191302...

output:

1193 1548 1590 3749 4076 4532 5285 5996 6475 7317 10243 11344 12343 14202 14250 15855 16425 16562 17017 17625 19972 21395 22531 22679 23638 23908 24200 24227 25442 25660 27726 27893 27997 32348 33299 33644 33645 33647 33650 33651 33652 33653 33654 33655 33656 33657 33658 33659 33660 33661 33665 3366...

result:

ok answers are correct. (1 test case)

Test #167:

score: 12
Accepted
time: 161ms
memory: 20964kb

input:

1
100000
119241641 613464492
490241507 910054958
109799237 470477062
643905323 728144956
210136020 677686279
526427304 954012078
37784408 823947370
330253271 403371326
81390909 123719285
156843216 346377489
260697279 835345872
350262349 446647272
202882494 607223399
674669712 737734020
539032927 587...

output:

311 509 1120 1700 2118 2471 2864 3707 4854 5449 7118 7638 7736 8244 8534 8785 8945 9392 9836 10171 10579 10703 11368 11806 11937 11995 12088 14128 14807 14980 15309 15567 15959 20104 20657 20739 20764 20942 21011 21884 25357 25429 25470 25494 25827 26121 26628 26695 26826 27836 28152 28511 28551 292...

result:

ok answers are correct. (1 test case)

Test #168:

score: 12
Accepted
time: 92ms
memory: 12152kb

input:

100
1000
583557907 768991079
315151968 766597987
643525310 655240361
558139652 944883496
417210693 517249248
780607526 842468217
64452339 433524829
40681705 549558182
493797785 994971958
621462808 999090220
429413078 586121195
190323157 267674590
171957614 497377312
473043394 997819980
183401773 876...

output:

21 51 77 163 178 203 226 298 355 356 359 361 362 363 364 367 369 371 373 374 375 376 378 379 380 381 382 383 384 385 386 387 390 391 392 393 394 395 396 397 398 399 402 403 404 405 406 407 408 409 410 412 413 414 415 416 418 420 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 442 443...

result:

ok answers are correct. (100 test cases)

Test #169:

score: 12
Accepted
time: 143ms
memory: 21480kb

input:

1
100000
832362701 922925646
155798818 599729944
829111545 926246784
330475003 425206584
272603334 482539098
791295614 964725317
810436761 945385509
183826339 571767364
368789298 386425661
121435250 633592857
57178462 697850941
98163343 657126683
197222129 558451789
181798495 573899262
758035851 997...

output:

33785 33786 33787 33790 33791 33794 33795 33796 33797 33798 33800 33801 33802 33806 33807 33808 33809 33810 33811 33812 33813 33814 33815 33816 33820 33821 33822 33823 33825 33826 33827 33828 33829 33830 33831 33833 33834 33835 33837 33839 33841 33843 33844 33846 33847 33849 33850 33851 33852 33853 ...

result:

ok answers are correct. (1 test case)

Test #170:

score: 12
Accepted
time: 124ms
memory: 16412kb

input:

1
100000
229000294 233267068
64349443 172406904
654893821 846950775
245833503 310393268
736203562 766305479
344069208 459696669
499732295 574313348
354013842 450152154
57504503 178851673
598048256 903850128
44066013 192534514
112616948 122691712
395420936 408402519
517992415 556203015
911823497 9929...

output:

83593 78302 75876 73059 73058 73056 73055 73054 73052 73051 73049 73048 73047 73046 73044 73043 73041 73039 73037 73036 73035 73034 73033 73032 73031 73030 73029 73028 73026 73024 73022 73021 73019 73018 73016 73015 73014 73013 73012 73011 73010 73008 73006 73005 73004 73003 72998 72997 72996 72993 ...

result:

ok answers are correct. (1 test case)

Test #171:

score: 12
Accepted
time: 117ms
memory: 18876kb

input:

1
100000
84769 84950
78496 78502
54993 54996
124001 124002
86322 86323
28997 29023
34726 34729
60571 60572
29146 29147
46129 46130
121654 121657
10035 10041
119573 119576
14462 14465
9378 9396
8526 8527
42641 42642
123380 123766
19709 20187
37272 37278
50547 50549
85869 85870
6624 6821
123252 123253...

output:

8 9 10 16 17 27 29 38 51 53 55 57 64 70 74 83 84 95 98 113 115 116 118 121 133 150 154 155 165 171 179 180 181 185 191 195 198 202 205 209 217 218 222 229 235 239 245 250 251 252 265 271 272 273 278 281 282 286 288 292 295 296 303 305 306 310 312 314 316 317 318 321 334 337 342 346 347 352 360 364 3...

result:

ok answers are correct. (1 test case)

Test #172:

score: 12
Accepted
time: 86ms
memory: 11452kb

input:

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

output:

1 3 4 5 9 15 20 23 26 27 29 31 33 34 36 37 39 40 43 44 46 48 49 51 52 53 54 56 
5 10 12 17 20 29 30 31 39 40 42 53 55 57 59 60 63 70 72 74 75 78 81 83 84 85 86 88 89 91 92 93 94 97 98 100 101 102 105 106 108 109 110 111 112 115 117 118 119 121 124 126 127 129 131 132 133 136 137 138 139 142 143 145 ...

result:

ok answers are correct. (100 test cases)

Test #173:

score: 12
Accepted
time: 93ms
memory: 12276kb

input:

100
1184
334117967 334321284
702694582 703185210
268154220 268656330
814502527 814758558
932733154 934904695
206830273 207151323
856456021 865430086
634245952 635401907
516425531 517815270
364957144 369423975
234792853 235801376
704685389 705801276
743597167 743999449
221558820 222994690
23225599 23...

output:

3 6 15 23 31 32 33 37 43 57 60 65 68 73 79 82 85 88 94 95 99 101 103 105 107 109 111 113 114 116 117 120 122 123 126 128 129 136 142 145 146 148 150 152 153 155 156 159 160 162 163 164 166 169 170 171 172 173 174 175 177 179 181 182 184 185 187 189 192 194 196 197 199 200 201 202 204 207 213 214 216...

result:

ok answers are correct. (100 test cases)

Test #174:

score: 12
Accepted
time: 118ms
memory: 16796kb

input:

1
100000
11742 65735
53036 76133
24279 94256
4511 6541
25912 56552
53277 53764
31097 68141
69663 88772
85067 91898
23145 53180
14123 49721
48995 66548
53125 77338
17585 73442
48271 94636
48498 93632
50472 70070
8411 67452
4089 89575
4677 86133
6793 47121
83834 96348
31276 54617
61921 97756
17535 683...

output:

53 1142 1621 2141 2499 2547 2634 2999 3682 4260 4841 5784 6301 7064 8732 9058 9709 9787 10046 11373 11813 13478 13818 14687 14798 15109 15547 15710 15878 16046 16417 16457 17429 18656 18779 19191 19372 19417 19735 20338 20354 22170 22532 22623 23332 23436 23855 23991 24066 25117 25231 26846 26940 27...

result:

ok answers are correct. (1 test case)

Test #175:

score: 12
Accepted
time: 80ms
memory: 11892kb

input:

10
10000
1548 5185
3629 3786
3897 4953
854 4112
5542 6622
79 6061
2343 6743
1577 1626
477 1115
2633 3130
1457 7061
1196 5397
2171 2602
7726 8605
3307 8343
4470 7093
7699 8063
7968 9912
8083 8758
5461 9639
2528 5680
230 5497
5908 8700
601 8527
8899 9595
332 6286
2322 3507
241 9959
1189 9241
76 4124
3...

output:

144 200 370 603 607 653 668 684 823 899 965 1029 1132 1466 2084 2156 2284 2489 2499 2813 2985 3088 3089 3090 3091 3092 3093 3096 3097 3098 3100 3102 3103 3104 3105 3106 3107 3108 3109 3110 3112 3113 3114 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3130 3131 3132 3133 3134 3136 3...

result:

ok answers are correct. (10 test cases)

Test #176:

score: 12
Accepted
time: 155ms
memory: 20156kb

input:

1
100000
518086099 568477197
194582604 377596903
689618157 730205242
440092255 463099109
4107025 579420102
329488917 393826795
473214249 479681429
68538053 433253486
564657096 772552542
113045749 965597140
63873365 646947544
434880865 874921587
687402335 773952203
76328683 646278693
165627312 670321...

output:

65 101 517 1568 1610 2780 3410 4396 5256 8053 8380 8694 8815 9236 9266 9771 10420 11913 12607 13304 13952 14097 14624 14802 15723 15756 16055 16289 16860 16924 17816 18217 18289 19086 20431 20586 20717 20894 21085 21217 21575 22504 22858 23786 24918 25664 25684 26008 26390 26832 27117 28037 29452 29...

result:

ok answers are correct. (1 test case)

Test #177:

score: 12
Accepted
time: 112ms
memory: 14720kb

input:

10
4890
863315904 917436274
78637332 765503617
489575785 840801368
154190671 428717357
417276811 792617375
59658502 922816925
592067417 834515529
501697387 641652322
342822804 983297444
12059870 892533503
602131534 760169697
168585199 599569566
219909054 313667634
443777519 801386280
190691507 66836...

output:

208 266 390 443 613 694 894 1067 1147 1458 1530 1531 1533 1558 1562 1564 1565 1567 1569 1570 1571 1572 1574 1577 1582 1583 1584 1585 1586 1589 1591 1594 1595 1598 1599 1600 1605 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1620 1621 1623 1624 1626 1627 1628 1629 1630 1631 1632 1635 1636 16...

result:

ok answers are correct. (10 test cases)

Test #178:

score: 12
Accepted
time: 107ms
memory: 11864kb

input:

100
1242
281243183 581537250
457716820 859206390
714721389 780542603
575867059 934123867
17288493 257943601
134316823 794576676
353066358 703440360
328118811 612878701
321410620 895394594
162735601 710871666
85899999 655688147
9191719 336248804
382716594 463345483
409632247 991956008
251603606 26352...

output:

96 167 194 203 218 390 391 392 393 394 395 396 397 399 400 402 404 405 406 408 410 411 412 413 414 415 416 418 419 421 424 425 429 430 432 433 434 435 436 438 439 440 441 443 445 446 447 448 449 450 451 452 454 455 456 460 461 462 463 465 466 469 473 474 475 476 478 482 483 484 485 486 487 489 490 4...

result:

ok answers are correct. (100 test cases)

Test #179:

score: 12
Accepted
time: 115ms
memory: 11392kb

input:

200
854
484801270 916937076
16446486 239830878
95331499 980732264
32887119 343035384
109930748 589853755
388875736 855006008
371607540 827365713
104947343 705117786
259238842 602814059
169097832 543614734
366362478 831230861
720279797 833841211
32885183 533412748
14394949 264811264
212800944 5462264...

output:

67 75 142 185 212 218 270 334 335 336 337 339 340 341 343 345 347 349 350 351 352 353 354 356 357 360 361 363 364 365 367 369 371 372 373 374 375 376 377 378 379 380 381 382 384 385 386 387 388 390 391 392 394 395 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 418 41...

result:

ok answers are correct. (200 test cases)

Test #180:

score: 0
Wrong Answer
time: 5ms
memory: 12356kb

input:

1000
10
3841173 153508703
75088004 264989879
239701192 395874614
78048023 688935563
534983155 744058500
329105631 984436916
176398323 588680277
822408649 913027405
699115742 811080750
178091737 659141553
42
529484675 639090007
302050269 418560816
246460489 418821981
248250010 427343543
630666071 756...

output:

1 3 6 7 10 
66
686610503 854412092
268151768 416638969
180485185 262675886
75595251 955851062
58422515 788674520
312854585 487328093
92891267 850934307
297766791 331673408
70687153 206416902
563846083 769638662
165578089 606053622
395161399 596394574
374541853 727689290
450768084 555503822
577383961...

result:

wrong answer Integer parameter [name=/opt/uoj/judger/uoj_judger/work/180.ans_1] equals to 66, violates the range [1, 42] (test case 2)