QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#253580#7791. 通道建设 Passage ConstructionCrysfly11.98415 7ms16968kbC++171.6kb2023-11-17 09:17:212023-11-17 09:17:22

Judging History

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

  • [2023-11-17 09:17:22]
  • 评测
  • 测评结果:11.98415
  • 用时:7ms
  • 内存:16968kb
  • [2023-11-17 09:17:21]
  • 提交

answer

// what is matter? never mind. 
#include "passageconstruction.h"
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2") 
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define ull unsigned long long
//#define int long long
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
 
#define maxn 300005
#define inf 0x3f3f3f3f

int n;
vi e[maxn];
vector<pii>out;

int dfn[maxn],idx,que[maxn];
int dfs(int u,int pa){
	int now=0;
	for(int v:e[u]){
		if(v==pa)continue;
		int x=dfs(v,u);
		if(x){
			if(!now)now=x;
			else out.pb(mkp(now,x)),now=0;
		}
	}
	{
		if(!now)now=u;
		else out.pb(mkp(now,u)),now=0;
	}
	return now;
}

int d[maxn];
int p[maxn];
std::vector<std::pair<int,int>> ConstructPassages(int nn, const std::vector<std::pair<int,int>> &E)
{
	n=nn*2;
	int O=getSubtaskID();
	if(O==3){
		int s=1,t=1;
		For(i,2,n){
			d[i]=GetDistance(1,i);
			if(d[i]>d[t])t=i;
		}
		For(i,1,n){
			if(i==t)d[i]=0;
			else d[i]=GetDistance(i,t);
		}
		For(i,1,n)p[d[i]+1]=i;
		for(int i=1;i<n;i+=2)out.pb(mkp(p[i],p[i+1]));
		return out;
	}
	For(i,1,n)
		For(j,i+1,n)
			if(GetDistance(i,j)==1){
				e[i].pb(j),e[j].pb(i);
			}
	dfs(1,0);
	return out;
}


/*
*/

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 3
Accepted

Test #1:

score: 3
Accepted
time: 3ms
memory: 14276kb

input:

1
1872884041
100 100 10000 10000
1
2294931821 2294931820

output:

Succeeded
0 1 0 0
2 1

result:

ok Accepted with 0+1 operations,sum of size(s)=0+0

Test #2:

score: 3
Accepted
time: 0ms
memory: 14540kb

input:

1
1977600624
100 100 10000 10000
5
621522394 621522399
2231003352 2231003338
464307841 464307837
1851407771 1851407768
2780336863 2780336849
314073909 314073902
1173467454 1173467430
4215033871 4215033843
2620057116 2620057098

output:

Succeeded
0 45 0 0
4 7
2 6
8 3
9 5
10 1

result:

ok Accepted with 0+45 operations,sum of size(s)=0+0

Test #3:

score: 3
Accepted
time: 3ms
memory: 14140kb

input:

1
1314992723
100 100 10000 10000
2
1174248192 1174248188
4206147071 4206147069
2894997654 2894997645

output:

Succeeded
0 6 0 0
4 2
3 1

result:

ok Accepted with 0+6 operations,sum of size(s)=0+0

Test #4:

score: 3
Accepted
time: 0ms
memory: 11184kb

input:

1
1466488642
100 100 10000 10000
3
1959342134 1959342129
3976386946 3976386946
1293201451 1293201449
4016912388 4016912383
46728190 46728181

output:

Succeeded
0 15 0 0
3 2
4 6
5 1

result:

ok Accepted with 0+15 operations,sum of size(s)=0+0

Test #5:

score: 3
Accepted
time: 3ms
memory: 11620kb

input:

1
1733551538
100 100 10000 10000
4
4255320958 4255320951
1233889267 1233889267
2022156010 2022156014
1746602236 1746602223
1796304111 1796304099
154520793 154520786
799267407 799267389

output:

Succeeded
0 28 0 0
5 2
7 3
8 4
6 1

result:

ok Accepted with 0+28 operations,sum of size(s)=0+0

Test #6:

score: 3
Accepted
time: 2ms
memory: 12900kb

input:

1
1103590331
100 100 10000 10000
4
3735090189 3735090176
179620503 179620501
1550955883 1550955882
3533004575 3533004552
2159969243 2159969227
2549716219 2549716202
1755562372 1755562356

output:

Succeeded
0 28 0 0
6 5
7 8
2 4
3 1

result:

ok Accepted with 0+28 operations,sum of size(s)=0+0

Test #7:

score: 3
Accepted
time: 2ms
memory: 13016kb

input:

1
1007922703
100 100 10000 10000
5
3347355425 3347355424
924935451 924935434
3554593528 3554593525
2830078883 2830078872
3185621515 3185621508
32902500 32902483
1057526055 1057526035
3737430162 3737430144
106424402 106424399

output:

Succeeded
0 45 0 0
2 3
8 5
9 6
4 7
10 1

result:

ok Accepted with 0+45 operations,sum of size(s)=0+0

Test #8:

score: 3
Accepted
time: 0ms
memory: 14520kb

input:

1
1401446296
100 100 10000 10000
5
4125806477 4125806476
1224445301 1224445291
1474144594 1474144597
2898586557 2898586536
879608888 879608877
3110900945 3110900930
2490037068 2490037051
422424582 422424570
1017432306 1017432295

output:

Succeeded
0 45 0 0
7 10
3 5
8 9
2 4
6 1

result:

ok Accepted with 0+45 operations,sum of size(s)=0+0

Test #9:

score: 3
Accepted
time: 0ms
memory: 11744kb

input:

1
1756894897
100 100 10000 10000
5
2081532117 2081532115
4275738287 4275738273
632146529 632146534
2424607270 2424607263
2157363450 2157363443
2463928559 2463928550
3381117807 3381117785
4186361975 4186361960
3382018566 3382018532

output:

Succeeded
0 45 0 0
7 9
8 5
10 6
3 2
4 1

result:

ok Accepted with 0+45 operations,sum of size(s)=0+0

Test #10:

score: 3
Accepted
time: 0ms
memory: 11260kb

input:

1
1465320926
100 100 10000 10000
5
2695813796 2695813789
3049323317 3049323309
231883125 231883119
3073242409 3073242392
1388430756 1388430755
183732731 183732729
1423324287 1423324267
3470698806 3470698795
354321542 354321525

output:

Succeeded
0 45 0 0
6 2
9 3
7 10
4 8
5 1

result:

ok Accepted with 0+45 operations,sum of size(s)=0+0

Subtask #2:

score: 0.98415
Acceptable Answer

Test #11:

score: 0.98415
Acceptable Answer
time: 2ms
memory: 11296kb

input:

2
755640766
20000 10000 200000 200000
100
4287951944 4287951892
218593589 218593610
2907028702 2907028595
100123056 100122959
3149201405 3149201229
3454414687 3454414608
1901257489 1901257490
1532337798 1532337686
836222214 836222227
187381584 187381446
1847826999 1847827071
2868544732 2868544653
41...

output:

Succeeded
0 19900 0 0
71 13
76 20
57 163
170 18
16 2
127 174
9 60
28 45
88 58
133 17
29 82
27 59
64 122
41 47
37 54
62 131
93 90
44 114
85 134
124 150
158 166
116 22
14 119
142 87
69 46
56 99
15 42
193 8
195 19
61 78
164 95
32 77
98 182
50 49
180 91
181 115
25 189
5 194
51 84
172 143
185 160
159 186...

result:

points 0.1640250 Accepted with 0+19900 operations,sum of size(s)=0+0

Test #12:

score: 1.18548
Acceptable Answer
time: 3ms
memory: 13632kb

input:

2
587237803
20000 10000 200000 200000
98
217447661 217447616
2463641363 2463641406
3373538248 3373538212
3950835015 3950834997
2221322822 2221322872
146298284 146298141
531452967 531453049
3941453926 3941454046
3084946195 3084946149
1270490559 1270490368
1019372524 1019372347
2754251578 2754251434
5...

output:

Succeeded
0 19110 0 0
90 192
112 108
44 64
29 117
31 116
80 147
26 194
163 32
4 171
18 62
30 73
40 187
81 121
2 98
111 169
145 176
10 56
57 48
71 47
22 51
131 127
93 182
161 104
85 19
102 190
83 189
59 100
76 109
20 188
7 79
35 54
77 125
9 75
158 152
135 58
132 183
142 67
21 118
24 134
155 164
15 14...

result:

points 0.197580250 Accepted with 0+19110 operations,sum of size(s)=0+0

Test #13:

score: 1.08299
Acceptable Answer
time: 2ms
memory: 11296kb

input:

2
184226984
20000 10000 200000 200000
99
547000384 547000355
872110096 872110116
1289538184 1289538247
3616724666 3616724569
636341527 636341600
2563522202 2563522274
2177548205 2177548137
3089489449 3089489506
3156380759 3156380856
944465184 944465231
823584265 823584499
333051247 333051023
1754238...

output:

Succeeded
0 19503 0 0
73 121
74 17
180 48
35 49
195 116
148 161
51 168
16 92
26 98
56 136
190 21
43 94
6 54
153 152
112 107
111 162
101 125
193 196
123 173
104 149
81 71
103 144
170 169
65 91
176 177
75 108
110 52
102 174
194 70
120 124
166 160
155 159
105 109
106 142
146 189
158 57
178 150
46 167
1...

result:

points 0.18049752250 Accepted with 0+19503 operations,sum of size(s)=0+0

Test #14:

score: 1.08299
Acceptable Answer
time: 4ms
memory: 13856kb

input:

2
1727138930
20000 10000 200000 200000
99
3247483138 3247483162
4084597375 4084597429
2636905019 2636904971
946660642 946660700
902149328 902149350
2382255766 2382255865
839303047 839303137
1923325547 1923325538
653690681 653690724
4175318562 4175318731
3824454449 3824454478
2650316775 2650316587
58...

output:

Succeeded
0 19503 0 0
56 103
101 102
161 120
111 182
133 134
117 112
105 118
132 140
109 119
125 145
178 30
194 22
92 108
153 77
6 36
17 177
27 196
59 72
32 80
184 5
137 139
51 149
126 162
3 195
73 78
35 15
26 113
129 160
39 60
53 57
151 189
146 82
148 180
47 21
29 71
8 90
198 88
79 116
34 98
114 17...

result:

points 0.18049752250 Accepted with 0+19503 operations,sum of size(s)=0+0

Test #15:

score: 0.98415
Acceptable Answer
time: 0ms
memory: 14364kb

input:

2
1220143324
20000 10000 200000 200000
100
693596313 693596332
62576744 62576808
1955936424 1955936264
3872655610 3872655531
1013531683 1013531829
2985331208 2985331369
2406362516 2406362582
1657349556 1657349602
1003910904 1003910721
1096398841 1096398795
1778724026 1778723842
713692268 713692342
2...

output:

Succeeded
0 19900 0 0
19 59
102 186
193 63
9 51
124 184
58 39
37 69
142 79
42 54
40 49
11 76
34 66
113 118
153 168
181 119
116 129
190 147
173 130
106 121
160 200
144 138
101 120
175 136
140 164
189 91
185 137
22 155
126 158
183 187
115 146
125 166
103 198
105 143
191 18
57 117
35 12
55 156
27 46
14...

result:

points 0.1640250 Accepted with 0+19900 operations,sum of size(s)=0+0

Test #16:

score: 0.98415
Acceptable Answer
time: 0ms
memory: 13696kb

input:

2
442130601
20000 10000 200000 200000
100
3144169521 3144169542
3602466736 3602466791
26223369 26223537
866636824 866636802
1192888944 1192888905
2768179340 2768179316
992350648 992350588
1606144049 1606144118
2825460299 2825460268
2783910130 2783910118
403964521 403964517
445570315 445570360
126026...

output:

Succeeded
0 19900 0 0
8 38
94 105
134 160
76 152
147 52
132 149
156 17
45 82
200 11
36 131
140 91
117 130
183 115
41 100
18 54
133 194
56 158
168 26
198 107
199 159
145 127
114 167
150 182
195 10
179 110
174 120
124 184
42 88
58 68
137 95
74 22
3 29
196 87
27 104
39 62
176 57
19 31
192 154
64 49
190...

result:

points 0.1640250 Accepted with 0+19900 operations,sum of size(s)=0+0

Test #17:

score: 1.2915
Acceptable Answer
time: 2ms
memory: 11108kb

input:

2
949343282
20000 10000 200000 200000
97
1170242583 1170242801
4247921283 4247921322
1529679099 1529679065
1051858814 1051858774
3893889966 3893889994
3958531511 3958531352
2502650796 2502650862
813064156 813064047
1048780624 1048780414
3993902928 3993902731
803344004 803343802
3547336751 3547336794...

output:

Succeeded
0 18721 0 0
62 49
44 91
58 123
159 82
48 125
25 153
184 57
122 31
10 176
30 39
98 54
40 135
72 43
182 28
63 75
29 117
97 115
183 142
85 179
16 144
101 73
148 76
112 138
79 189
77 87
17 127
21 18
99 32
94 145
109 36
9 96
132 136
141 46
100 155
118 165
160 193
174 45
88 164
102 163
111 172
1...

result:

points 0.21524960250 Accepted with 0+18721 operations,sum of size(s)=0+0

Test #18:

score: 1.18548
Acceptable Answer
time: 0ms
memory: 11176kb

input:

2
734508634
20000 10000 200000 200000
98
213911368 213911499
2488548419 2488548499
516780967 516780705
3349442602 3349442765
857297035 857297029
1348690665 1348690579
1548954171 1548954133
3605026599 3605026727
182470368 182470292
1455323224 1455323364
2179991017 2179991001
3209649930 3209649949
145...

output:

Succeeded
0 19110 0 0
130 44
24 49
20 136
146 10
102 135
60 117
30 147
76 111
141 142
7 148
97 17
103 129
19 11
25 28
121 84
18 50
87 176
78 55
159 4
2 31
23 83
112 64
5 33
158 144
9 77
16 93
184 152
194 12
63 171
172 26
101 186
92 95
110 119
175 75
157 100
21 36
185 190
14 67
81 89
8 39
6 51
56 65
...

result:

points 0.197580250 Accepted with 0+19110 operations,sum of size(s)=0+0

Subtask #3:

score: 8
Accepted

Test #19:

score: 8
Accepted
time: 0ms
memory: 16968kb

input:

3
397960972
100000 4000 200000 200000
1000
3136131587 3136131078
3887641427 3887642253
280951546 280951198
124187343 124186744
3948118891 3948118785
2174920490 2174920140
3041102338 3041103477
489656932 489656480
3093689453 3093690199
3027233105 3027233261
967551350 967551424
215138938 215138436
251...

output:

Succeeded
0 3998 0 0
1740 1003
1560 1938
1246 1780
1573 1476
1826 1535
1031 1618
1661 1100
1527 1892
1660 1591
1354 1792
1594 1117
1097 1519
1919 1341
1846 1160
1853 1548
1863 1016
1445 1241
1481 1207
1371 1103
1646 1779
1329 1435
1162 1515
1342 1464
1756 1040
1383 1416
1724 1301
1061 1382
1196 1085...

result:

ok Accepted with 0+3998 operations,sum of size(s)=0+0

Test #20:

score: 8
Accepted
time: 4ms
memory: 13800kb

input:

3
755523510
100000 4000 200000 200000
999
837610461 837610217
209552123 209552158
2202987134 2202987346
3933843218 3933843131
2783546817 2783547323
415275024 415276142
13876082 13876176
448702939 448703028
1294393612 1294394136
3910397405 3910397094
3416630484 3416630700
3215888394 3215888948
124509...

output:

Succeeded
0 3994 0 0
728 346
13 1690
49 468
103 745
485 897
149 86
913 82
826 735
750 408
41 83
365 202
414 124
1200 301
843 283
77 694
266 156
840 789
1764 767
938 878
618 959
1564 90
20 249
51 275
994 396
1144 585
429 732
85 692
665 234
380 739
969 1630
626 449
132 884
583 558
660 1634
505 344
172...

result:

ok Accepted with 0+3994 operations,sum of size(s)=0+0

Test #21:

score: 8
Accepted
time: 3ms
memory: 15480kb

input:

3
2042812129
100000 4000 200000 200000
998
3075748308 3075748844
1569673104 1569672823
3968525693 3968524672
2108387096 2108386924
3356390455 3356391094
3372812724 3372813320
3904961007 3904958854
4029621824 4029621345
4114486509 4114486281
1387138301 1387138067
124292409 124292880
3935517019 393551...

output:

Succeeded
0 3990 0 0
1947 1484
1581 1267
1561 1375
1992 1379
1868 1655
1545 1678
1945 1279
1478 1065
1965 1553
1953 1368
1682 1835
1823 1176
1376 1063
1411 1073
1284 1816
1912 1362
1165 1483
1815 1640
1177 1703
1534 1230
1185 1338
1742 1322
1957 1936
1528 1594
1693 1210
1764 1852
1071 1979
1099 1012...

result:

ok Accepted with 0+3990 operations,sum of size(s)=0+0

Test #22:

score: 8
Accepted
time: 4ms
memory: 13436kb

input:

3
1597029305
100000 4000 200000 200000
998
2980500284 2980500361
2247716226 2247714887
988714926 988714253
1734063960 1734064121
2359409219 2359409008
411968449 411968499
155449826 155451318
555582797 555582911
45071917 45071590
1460631113 1460629818
3059213925 3059213709
2094519932 2094519250
38721...

output:

Succeeded
0 3990 0 0
711 909
793 797
1161 593
13 766
1278 460
1932 1034
415 1056
1115 386
609 1292
1479 863
1480 1171
630 1256
1155 825
1862 1979
484 855
1330 1553
1618 79
1456 1298
1601 723
1455 1438
374 1101
1348 832
1912 1490
1057 1035
619 358
1388 993
1726 1162
969 1124
603 1235
307 764
112 1135...

result:

ok Accepted with 0+3990 operations,sum of size(s)=0+0

Test #23:

score: 8
Accepted
time: 0ms
memory: 14484kb

input:

3
1564467111
100000 4000 200000 200000
1000
1236547222 1236547523
2135786902 2135787064
2523622442 2523622714
1532839693 1532838477
818219113 818220033
676117995 676118414
570037547 570036834
514220702 514220842
3399494183 3399495268
2654728241 2654729498
1495037081 1495037412
2062047312 2062048382
...

output:

Succeeded
0 3998 0 0
257 1077
429 825
365 1158
1910 1574
178 1855
1371 1318
1452 960
141 558
1666 607
37 1482
281 1130
1775 1710
1008 1257
415 1773
1409 1804
1557 519
57 1335
1163 839
389 444
431 1554
1981 757
326 1585
36 1885
1882 19
1093 1307
180 866
1774 1324
1572 1355
1058 1280
413 1397
481 526
...

result:

ok Accepted with 0+3998 operations,sum of size(s)=0+0

Test #24:

score: 8
Accepted
time: 0ms
memory: 14052kb

input:

3
213138336
100000 4000 200000 200000
999
1130123143 1130122958
687694550 687694095
929485247 929484829
3680984473 3680983776
3074105335 3074104892
1342732123 1342731927
1364720805 1364720672
2077428724 2077428538
28510235 28511166
937776441 937776505
3414480885 3414480666
3148182306 3148181509
3485...

output:

Succeeded
0 3994 0 0
522 214
776 308
400 165
34 182
1509 433
107 292
599 474
257 675
568 53
306 20
216 901
415 238
589 740
583 337
664 12
317 132
1493 391
136 880
1095 156
484 1762
372 488
272 981
943 689
2 476
686 1117
651 1821
935 859
854 624
364 460
823 302
889 1189
407 980
1662 1080
1776 1578
19...

result:

ok Accepted with 0+3994 operations,sum of size(s)=0+0

Test #25:

score: 8
Accepted
time: 0ms
memory: 14884kb

input:

3
924980045
100000 4000 200000 200000
998
1666991999 1666991279
148686690 148685590
324531768 324531788
2043725358 2043725640
1133184972 1133184631
853139746 853139683
1770837584 1770837761
1481554510 1481554714
1372084869 1372084950
1756084441 1756085236
2107756067 2107756010
3377586774 3377586312
...

output:

Succeeded
0 3990 0 0
949 582
825 1464
890 664
670 407
358 674
445 423
534 808
327 1963
549 360
878 219
851 860
623 665
419 533
1161 141
356 59
244 575
986 232
726 384
127 1373
915 364
806 353
654 463
785 333
75 1408
361 780
24 486
155 458
137 547
994 453
916 965
559 609
112 892
958 887
477 1733
61 4...

result:

ok Accepted with 0+3990 operations,sum of size(s)=0+0

Test #26:

score: 8
Accepted
time: 0ms
memory: 16756kb

input:

3
774146483
100000 4000 200000 200000
999
3478842381 3478843345
606332045 606332562
2701123033 2701123563
3216754910 3216755036
1217043418 1217043429
1501603802 1501603474
1778234551 1778234769
1444790432 1444791022
2502984240 2502984288
856947428 856947122
1363006586 1363006323
1995567044 199556642...

output:

Succeeded
0 3994 0 0
233 436
55 112
711 125
874 394
419 462
171 1792
184 552
271 927
608 160
470 764
397 611
165 705
819 172
978 174
153 633
937 57
128 482
971 508
940 894
1740 34
835 314
720 261
868 801
322 751
816 628
1659 717
325 961
590 51
203 760
623 339
1905 9
120 447
181 375
880 575
869 209
3...

result:

ok Accepted with 0+3994 operations,sum of size(s)=0+0

Test #27:

score: 8
Accepted
time: 4ms
memory: 16744kb

input:

3
82266506
100000 4000 200000 200000
999
3056998601 3056998876
1887811910 1887812134
1616045105 1616045172
1784967209 1784967615
650919784 650918837
4290024152 4290024396
154133667 154133653
754913686 754913998
3014551042 3014550770
3332698384 3332698431
304657473 304657856
1466514044 1466515029
313...

output:

Succeeded
0 3994 0 0
96 486
1192 715
312 589
107 967
316 566
1406 1741
758 276
1743 283
449 762
466 189
72 30
428 376
596 26
868 235
430 208
152 638
612 341
1629 1289
1249 893
698 198
77 574
919 981
147 711
739 491
1910 773
229 1475
1960 584
274 1345
658 369
382 587
313 945
937 957
130 468
645 679
8...

result:

ok Accepted with 0+3994 operations,sum of size(s)=0+0

Test #28:

score: 8
Accepted
time: 2ms
memory: 13684kb

input:

3
1746021239
100000 4000 200000 200000
1000
3649747382 3649747015
3895797253 3895797184
4001365723 4001365122
564220364 564220085
362710516 362710456
2800243662 2800243024
2073687310 2073687797
145701776 145700951
492159209 492159366
3076148714 3076148148
1548738755 1548739322
3580263095 3580262700
...

output:

Succeeded
0 3998 0 0
1505 461
278 68
172 488
203 562
808 724
766 209
527 423
907 998
336 1849
408 410
1639 333
396 588
704 389
96 837
505 156
206 963
212 149
124 355
745 524
232 427
996 640
251 552
912 262
197 249
44 595
469 141
296 91
358 681
274 850
526 1096
1266 1649
1137 1015
1653 1029
1838 1755...

result:

ok Accepted with 0+3998 operations,sum of size(s)=0+0

Subtask #4:

score: 0
Wrong Answer

Test #29:

score: 0
Wrong Answer
time: 3ms
memory: 11312kb

input:

4
1084797752
100000 4000 200000 200000
1000
3456536122 3456534568
249115651 249115791
3576312078 3576312237
1880897416 1880895547
1944688480 1944688327
248846397 248847256
3567405828 3567405196
1084965392 1084965206
1435956247 1435955729
3887033767 3887032464
307260230 307260472
1476733874 147673312...

output:

Failed
Limit of C2 exceeded

result:

wrong answer Limit of C2 exceeded

Subtask #5:

score: 0
Wrong Answer

Test #39:

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

input:

5
1720909858
50000 4000 200000 100000
998
195378529 195378218
2138942224 2138942028
2421726252 2421725316
2614111628 2614111784
3778296551 3778295886
3346314089 3346313971
701234060 701233448
279201944 279202119
69826850 69826766
2173156660 2173157126
2982274003 2982273048
2306106121 2306107345
2808...

output:

Failed
Limit of C2 exceeded

result:

wrong answer Limit of C2 exceeded

Subtask #6:

score: 0
Wrong Answer

Test #50:

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

input:

6
889180297
25000 4000 200000 100000
998
3680334935 3680334330
2957217208 2957215867
3096097757 3096097331
2843029536 2843030717
2270437916 2270437982
1841161075 1841160444
3671823118 3671823208
2166904224 2166903071
2760262295 2760263328
880472976 880472564
3147819342 3147820514
3366602035 33666019...

output:

Failed
Limit of C2 exceeded

result:

wrong answer Limit of C2 exceeded

Subtask #7:

score: 0
Wrong Answer

Test #59:

score: 0
Wrong Answer
time: 3ms
memory: 13960kb

input:

7
1561772597
25000 4000 200000 100000
1000
834919143 834919090
162625904 162627303
1067517190 1067517712
3410644901 3410644677
2728503196 2728502622
4133685425 4133685598
976760503 976760426
2101358026 2101358499
3583017242 3583017016
1743218912 1743220527
2609984627 2609985177
3915259025 3915259188...

output:

Failed
Limit of C2 exceeded

result:

wrong answer Limit of C2 exceeded

Subtask #8:

score: 0
Wrong Answer

Test #70:

score: 0
Wrong Answer
time: 4ms
memory: 15144kb

input:

8
1311447458
50000 100000 500000 200000
4999
173190562 173182163
1078196947 1078197142
1215565665 1215571165
1186082670 1186081354
2422459084 2422459806
2626070241 2626074599
207492448 207494582
2266700305 2266695214
1679673055 1679672568
3879988278 3879982030
254940475 254941572
3919251618 39192495...

output:

Failed
Limit of C2 exceeded

result:

wrong answer Limit of C2 exceeded

Subtask #9:

score: 0
Wrong Answer

Test #81:

score: 0
Wrong Answer
time: 7ms
memory: 14220kb

input:

9
574951428
15000 10000 200000 50000
5000
1781472251 1781466624
803445324 803444785
3544280892 3544283003
3151400420 3151403948
3250864128 3250871501
4189507543 4189510374
3483519516 3483520446
1003612935 1003617460
1101934749 1101931586
1948046579 1948042301
4151407804 4151401951
424123439 42412196...

output:

Failed
Limit of C2 exceeded

result:

wrong answer Limit of C2 exceeded