QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#217017#6553. Shared Memory Switch275307894aAC ✓172ms34756kbC++142.0kb2023-10-16 11:15:522023-10-16 11:15:52

Judging History

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

  • [2023-10-16 11:15:52]
  • 评测
  • 测评结果:AC
  • 用时:172ms
  • 内存:34756kb
  • [2023-10-16 11:15:52]
  • 提交

answer

#include<bits/stdc++.h>
#define Gc() getchar() 
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;using LL=__uint128_t;
const int N=2e5+5,M=N*8+5,K=600+5,mod=998244353,Mod=mod-1;const db eps=1e-6;const int INF=1e9+7;mt19937 rnd(263082);
int n,m;
priority_queue<pii > q[N];
set<pii> Q;
namespace Tree{
	#define ls v<<1
	#define rs v<<1|1
	int f[M],g[M];
	void Up(int v){f[v]=min(f[ls],f[rs])-g[v];}
	void BD(int l=1,int r=2*n+1,int v=1){
		f[v]=m;if(l==r) return;int m=l+r>>1;
		BD(l,m,ls);BD(m+1,r,rs);
	}
	void Add(int x,int y,int l=1,int r=2*n+1,int v=1){
		if(x<=l&&r<=y) {g[v]++;f[v]--;return;}int m=l+r>>1;
		x<=m&&(Add(x,y,l,m,ls),0);y>m&&(Add(x,y,m+1,r,rs),0);Up(v);
	}
	int qry(int x,int y,int l=1,int r=2*n+1,int v=1){
		if(x<=l&&r<=y) return f[v];int m=l+r>>1;
		return min(x<=m?qry(x,y,l,m,ls):INF,y>m?qry(x,y,m+1,r,rs):INF)-g[v];
	}
	#undef ls
	#undef rs
}
void Del(int x){
	if(!q[x].empty()) Q.erase(make_pair(q[x].top().fi,x));
}
void Ins(int x){
	if(!q[x].empty()) Q.emplace(q[x].top().fi,x);
}
void Solve(){
	int i,j;scanf("%d%d",&n,&m);
	vector<int> ans;
	int Ct=1;
	Tree::BD();
	for(i=1;i<=2*n;i++){
		int x;if(i<=n) scanf("%d",&x);else x=-1;
		if(~x){Del(x);q[x].emplace(Ct,i);Ins(x);continue;}
		vector<int> E;
		while(!Q.empty()){
			auto p=*Q.rbegin();Q.erase(p);
			if(!Tree::qry(p.fi,Ct)) break;
			E.emplace_back(p.se);ans.emplace_back(q[p.se].top().se);q[p.se].pop();
			Tree::Add(p.fi,Ct);
		}
		for(int j:E) Ins(j);
		++Ct;
	}
	printf("%d\n",ans.size());
	for(int i:ans) printf("%d ",i);
}
int main(){
	int t=1;
	// scanf("%d",&t);
	while(t--) Solve();
	cerr<<clock()*1.0/CLOCKS_PER_SEC<<'\n';
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

14 5
1 1 1 2 2 2 -1 1 -1 1 -1 1 -1 1

output:

9
6 3 8 5 10 4 12 14 2 

result:

ok n=14

Test #2:

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

input:

14 4
1 1 1 2 2 2 -1 1 -1 1 -1 1 -1 1

output:

8
6 3 8 5 10 4 12 14 

result:

ok n=14

Test #3:

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

input:

0 0

output:

0

result:

ok n=0

Test #4:

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

input:

0 1

output:

0

result:

ok n=0

Test #5:

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

input:

3 0
1 -1 2

output:

0

result:

ok n=3

Test #6:

score: 0
Accepted
time: 124ms
memory: 28308kb

input:

200000 20
192797 145760 146491 109352 168621 58673 57243 7936 79733 3190 191130 169391 178004 120789 25556 56547 72241 59274 101245 129056 125785 138556 70154 63360 96036 73373 168059 46716 197905 106279 113884 190286 56438 128423 151368 193658 15613 17963 26833 136697 62679 188745 4515 151940 67745...

output:

40
13925 8529 8727 4799 40192 29983 18896 44056 10384 7081 20026 1644 5211 29929 40020 31542 33751 7159 24809 4025 129504 86002 44340 123294 75734 192719 156070 169573 156479 63328 189710 168649 182083 95054 99786 61872 65534 164941 177394 135944 

result:

ok n=200000

Test #7:

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

input:

200000 20
-1 -1 185081 -1 -1 34870 174269 47583 86208 69115 153529 101705 -1 -1 161748 11940 -1 -1 -1 191433 191546 -1 -1 108421 155301 -1 16678 -1 -1 -1 -1 179950 -1 169577 46923 -1 -1 -1 130194 -1 128371 -1 104684 -1 133162 170545 198827 -1 -1 72240 -1 -1 -1 110876 -1 -1 -1 80829 -1 84239 129224 -...

output:

100583
3 7 11 12 9 10 8 6 15 16 21 20 25 24 27 32 34 35 39 41 43 47 46 45 50 54 58 61 60 65 70 69 68 73 72 75 79 78 77 83 88 87 86 91 90 94 95 97 99 102 103 108 107 106 110 116 115 113 118 117 114 120 121 125 124 126 123 128 130 131 133 134 137 140 143 142 141 154 153 149 147 148 150 151 152 146 162...

result:

ok n=200000

Test #8:

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

input:

200000 20
-1 -1 9380 -1 9380 9380 -1 9380 9380 9380 -1 9380 -1 9380 9380 9380 -1 -1 9380 9380 9380 -1 -1 -1 9380 -1 9380 -1 -1 -1 -1 -1 9380 -1 -1 -1 -1 -1 -1 9380 -1 9380 9380 -1 9380 9380 9380 -1 -1 -1 9380 9380 9380 -1 9380 9380 9380 9380 -1 9380 9380 9380 -1 9380 -1 -1 9380 -1 9380 -1 9380 9380 ...

output:

95229
3 6 10 12 16 15 21 20 19 25 27 14 9 8 5 33 40 43 47 46 45 53 58 62 64 61 67 69 74 73 77 79 72 71 83 60 86 88 91 90 95 94 57 100 105 104 103 109 114 113 112 111 120 122 126 125 129 134 136 133 132 131 141 124 144 146 149 148 119 155 157 154 161 160 153 169 172 171 176 175 179 181 168 167 166 18...

result:

ok n=200000

Test #9:

score: 0
Accepted
time: 66ms
memory: 19420kb

input:

200000 20
155567 -1 155567 131057 131057 131057 -1 131057 131057 155567 155567 -1 155567 131057 155567 131057 155567 131057 131057 -1 155567 -1 155567 155567 131057 -1 155567 131057 131057 -1 155567 -1 -1 -1 -1 155567 155567 155567 131057 155567 155567 -1 -1 155567 131057 -1 131057 155567 155567 131...

output:

122786
1 3 6 11 9 17 19 21 18 24 25 27 29 31 28 23 16 15 14 13 8 41 39 40 5 44 45 51 50 59 60 58 47 65 64 69 68 71 67 73 74 77 76 63 57 81 82 84 4 87 86 89 91 94 93 90 80 56 55 99 54 101 104 108 109 107 103 112 113 117 106 119 116 122 115 126 124 128 129 131 133 134 138 139 141 137 136 145 144 125 1...

result:

ok n=200000

Test #10:

score: 0
Accepted
time: 78ms
memory: 19752kb

input:

200000 20
138057 138873 168674 -1 138057 138873 168674 -1 168674 -1 168674 138873 168674 168674 138057 168674 168674 138057 168674 168674 168674 138057 168674 168674 -1 168674 -1 138873 138057 138873 -1 138057 -1 138873 138873 168674 138873 168674 168674 168674 168674 138057 -1 -1 138873 -1 138873 1...

output:

133363
3 2 1 7 6 5 9 24 12 22 26 18 30 29 23 32 28 21 41 37 42 40 35 15 45 39 47 49 38 58 60 61 56 57 59 53 55 48 52 54 70 36 74 69 73 68 78 77 80 84 83 67 89 88 66 92 91 82 97 99 98 95 96 79 102 51 104 94 108 107 111 106 110 87 114 116 86 118 121 34 123 120 72 126 125 119 130 129 20 133 134 19 136 ...

result:

ok n=200000

Test #11:

score: 0
Accepted
time: 119ms
memory: 32316kb

input:

200000 20
188193 86334 146424 150245 78691 79678 44101 77077 170039 43828 7101 166020 176227 41151 82724 45490 84724 79713 5501 37207 66814 185018 193607 179939 84382 163390 98015 102547 179011 165556 96161 139944 139885 161535 175730 163737 91028 94827 92339 103298 143767 30016 106267 46994 45275 1...

output:

20
7967 35092 198229 3385 134772 139390 127310 161124 3651 47384 8576 38898 123345 140532 94959 74015 115440 26154 64996 46170 

result:

ok n=200000

Test #12:

score: 0
Accepted
time: 111ms
memory: 27248kb

input:

200000 20
171920 28552 11519 178013 116657 178824 171886 48055 141797 119693 173665 100702 4535 59719 81762 46520 51245 19480 48560 71217 128319 36157 57182 196435 83371 145679 115504 175398 166539 61340 40108 45709 103958 78783 119395 69220 99917 70471 190867 57876 141729 153517 99788 136120 168256...

output:

20
191168 128933 146579 122927 182445 150475 178275 117436 159973 159318 156456 185503 107584 147443 166529 100635 110410 104195 184644 143362 

result:

ok n=200000

Test #13:

score: 0
Accepted
time: 105ms
memory: 25240kb

input:

200000 20
135276 122914 91880 55943 130295 110918 55421 86111 127485 25319 176493 13524 104729 21568 34610 143936 112811 127180 86366 -1 151119 55304 78348 68344 177442 74828 198628 108795 112224 188504 197456 163673 -1 136654 117930 115864 95087 32333 25501 162158 9468 149563 84257 112037 30323 358...

output:

123130
11 16 1 5 9 18 2 17 6 13 3 19 8 4 7 15 10 14 12 27 31 30 25 32 21 29 28 23 26 24 22 58 50 40 59 48 42 34 49 35 36 44 51 37 52 55 43 53 46 54 38 65 62 66 63 64 61 68 69 82 74 81 77 75 89 79 85 72 84 88 83 73 78 76 71 80 87 86 113 118 141 102 132 100 125 106 114 92 136 99 110 111 142 133 144 12...

result:

ok n=200000

Test #14:

score: 0
Accepted
time: 116ms
memory: 26392kb

input:

200000 20
179200 134876 39752 140338 17274 157441 41175 98316 144283 81278 593 91206 80890 -1 42705 8932 -1 191013 154678 11164 92355 4580 10134 20887 193937 162152 13547 22739 69246 131441 159276 7079 22780 91471 181700 190426 78687 167833 172357 175732 138953 6092 120352 161081 -1 28598 123275 104...

output:

77849
1 6 9 4 2 8 12 10 13 7 3 5 11 15 16 25 18 36 35 40 39 38 26 44 31 19 41 30 43 21 34 37 29 33 28 104 54 62 58 82 77 95 60 67 68 72 55 80 65 57 50 71 107 102 108 127 131 114 128 117 123 143 126 122 142 113 112 140 132 125 139 134 118 116 115 151 147 152 146 145 149 148 150 161 164 159 156 158 16...

result:

ok n=200000

Test #15:

score: 0
Accepted
time: 66ms
memory: 20728kb

input:

200000 20
8128 120929 188493 6288 120929 120929 5242 120929 120929 8370 164386 174157 130332 85589 145417 120929 129155 120929 103225 120929 147932 -1 120929 12772 54973 13439 199857 199555 162362 120929 -1 120929 120929 120929 -1 131466 57156 120929 120929 80279 120929 120929 94733 120929 120929 29...

output:

66158
3 12 11 21 15 13 17 20 19 14 10 1 4 7 27 28 29 30 25 26 24 34 36 55 43 47 40 37 46 71 142 80 134 92 81 77 136 106 63 111 84 62 68 107 118 65 73 138 133 150 179 166 171 159 170 161 177 185 160 163 167 157 156 168 186 155 158 178 181 215 230 235 202 236 193 208 192 191 211 252 243 223 196 199 24...

result:

ok n=200000

Test #16:

score: 0
Accepted
time: 73ms
memory: 21860kb

input:

200000 20
188997 188997 188997 188997 27390 75480 188997 188997 75480 75480 7096 28941 188997 86194 188997 188997 180257 147851 75480 188997 29656 188997 168675 75480 75480 188997 188997 188997 166644 75480 21560 188997 75480 75480 145689 188997 82666 7981 188997 138329 75480 131526 120737 188997 20...

output:

58890
68 51 53 17 23 29 18 35 40 42 55 43 14 37 69 56 21 12 5 31 89 73 75 88 91 83 97 108 105 109 107 101 104 110 96 156 163 165 140 168 164 146 134 137 170 113 122 152 138 128 158 162 174 161 143 199 178 176 189 180 184 197 196 187 182 181 185 200 233 253 243 237 205 240 248 207 239 251 203 250 228...

result:

ok n=200000

Test #17:

score: 0
Accepted
time: 73ms
memory: 20280kb

input:

200000 20
35540 -1 149187 102124 35540 102124 194193 149187 102124 149187 177312 102124 102124 149187 149187 102124 149187 149187 102124 102124 102124 -1 43587 127123 102124 78465 35540 35540 195751 149187 149187 116135 35540 149187 102124 186290 102124 144957 35540 102124 -1 102124 35540 149187 355...

output:

53496
1 7 11 18 21 5 29 36 34 38 24 32 40 26 23 39 47 44 42 49 56 52 58 59 54 48 89 104 103 62 142 102 124 74 134 138 105 61 72 95 82 97 141 136 116 63 144 146 147 163 162 152 165 158 151 153 164 160 149 168 283 192 225 221 197 256 286 288 186 246 237 187 245 289 231 263 236 211 182 291 430 380 321 ...

result:

ok n=200000

Test #18:

score: 0
Accepted
time: 70ms
memory: 20648kb

input:

200000 20
125899 181137 134531 94497 190447 134531 181137 131895 190447 125899 32034 134531 181137 -1 190827 125899 100228 135793 190447 125899 94497 190827 131895 -1 190827 131895 190827 190827 131895 94497 125899 135793 131895 131895 125899 131895 190827 108055 -1 20536 190447 131895 135793 190447...

output:

62612
9 13 12 8 10 4 11 22 19 18 23 20 17 21 7 6 37 32 36 35 38 30 5 2 3 45 48 42 47 40 28 50 44 46 34 31 157 191 194 98 182 64 188 190 186 192 79 174 189 58 181 187 115 251 247 231 229 249 241 252 243 248 209 184 258 254 257 255 259 246 227 219 235 245 269 274 280 277 267 276 278 271 279 263 233 28...

result:

ok n=200000

Test #19:

score: 0
Accepted
time: 73ms
memory: 19504kb

input:

200000 20
111939 46646 138969 21854 46646 154815 197522 197814 138969 197522 152137 154815 177668 111939 6493 88674 196364 160813 160813 184252 49346 46646 197814 88674 138003 197814 20566 154815 160813 20566 138969 20566 160813 197814 164378 152137 107068 140248 177668 177668 68935 197522 -1 161270...

output:

73467
34 42 17 20 40 35 33 28 36 38 31 25 14 37 24 41 21 22 4 32 45 50 46 44 48 52 51 49 47 54 55 56 70 66 80 95 91 74 89 79 67 71 87 78 73 84 65 83 92 82 59 94 132 131 135 119 134 129 123 111 121 127 130 122 117 137 118 128 106 102 125 133 310 303 295 252 160 172 305 313 267 319 324 281 300 326 328...

result:

ok n=200000

Test #20:

score: 0
Accepted
time: 71ms
memory: 18968kb

input:

200000 20
17556 84025 17556 152286 32560 17556 193108 152286 32560 148300 139411 17556 17556 152286 17556 185579 139411 17556 114903 152286 152286 114903 148300 148300 139411 152286 32560 139411 148300 114903 17556 152286 84025 148300 185579 152286 114903 152286 32560 152286 -1 -1 152286 84025 13941...

output:

91914
7 35 40 34 28 37 33 39 31 16 38 29 25 30 2 27 18 76 82 80 77 79 63 81 72 67 46 75 74 70 64 68 47 78 58 9 15 120 115 123 110 114 108 113 124 117 119 102 121 112 104 111 122 106 160 156 143 165 166 162 164 158 159 163 149 151 154 161 157 150 155 142 153 98 199 192 200 208 177 207 201 182 206 204...

result:

ok n=200000

Test #21:

score: 0
Accepted
time: 124ms
memory: 28476kb

input:

200000 200
28615 107609 105586 83577 165345 182946 171272 44527 182095 37535 93331 123706 73060 175323 18729 54420 116626 160651 54561 100599 10398 86803 86741 77401 124187 131671 6237 149186 87858 121048 71981 87882 48711 139012 120248 58737 19820 199313 21283 116017 39511 30974 30786 70920 135213 ...

output:

200
147515 20098 61372 194549 77563 115770 67802 135892 146013 184039 81563 179973 5585 139480 142634 87190 81770 12339 166589 175674 126834 29164 166581 184510 121359 196335 181162 37226 198916 185567 94892 119862 1615 69357 138564 132897 188143 195219 22240 194071 187754 172404 185013 183375 15275...

result:

ok n=200000

Test #22:

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

input:

200000 200
26474 -1 182505 144646 -1 18778 -1 127011 -1 154932 -1 -1 -1 12062 132781 -1 -1 -1 -1 154293 104480 -1 135753 180083 158843 12031 24694 91670 -1 52698 -1 -1 149847 -1 79553 -1 97805 -1 -1 -1 61613 -1 -1 84247 163709 -1 -1 62055 144966 192050 -1 3574 185380 -1 134860 123179 -1 -1 -1 128315...

output:

99921
1 3 4 6 8 10 15 14 20 21 24 25 23 28 27 26 30 33 35 37 41 45 44 50 49 48 53 52 55 56 62 60 61 63 67 82 83 81 88 91 90 94 93 98 97 105 101 103 102 104 107 112 113 115 116 122 121 120 124 130 133 135 134 132 137 140 141 146 149 154 153 160 161 163 165 169 173 175 177 179 182 181 187 186 189 191 ...

result:

ok n=200000

Test #23:

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

input:

200000 200
158580 158580 158580 -1 158580 158580 -1 -1 -1 -1 -1 -1 -1 158580 -1 158580 -1 -1 158580 -1 158580 -1 158580 158580 -1 158580 158580 158580 -1 -1 -1 158580 158580 -1 -1 158580 -1 -1 -1 158580 158580 -1 -1 158580 158580 158580 -1 -1 158580 158580 158580 -1 158580 158580 -1 -1 158580 -1 -1 ...

output:

99336
3 6 5 2 1 14 16 19 21 24 28 27 26 33 32 36 23 41 40 46 45 51 54 53 57 50 64 63 67 70 75 74 80 82 85 84 88 92 91 90 98 101 104 109 108 107 106 103 100 116 97 119 96 79 123 78 73 72 69 62 61 60 132 49 44 136 142 141 145 147 152 155 158 157 154 151 150 149 173 176 175 180 179 183 186 185 191 190 ...

result:

ok n=200000

Test #24:

score: 0
Accepted
time: 70ms
memory: 19736kb

input:

200000 200
168202 168202 168202 168202 168202 -1 -1 -1 -1 -1 168202 168202 -1 193312 193312 168202 168202 168202 193312 193312 193312 193312 193312 168202 -1 193312 -1 193312 -1 -1 -1 -1 193312 168202 -1 168202 -1 193312 168202 -1 -1 -1 168202 168202 168202 168202 168202 193312 -1 193312 -1 168202 -...

output:

132396
5 4 3 2 1 12 23 24 26 18 28 17 22 16 21 11 20 33 34 36 19 38 39 15 14 48 47 50 46 52 54 56 58 55 62 61 64 68 67 60 71 72 66 65 45 44 79 78 84 83 86 82 81 43 89 92 93 99 98 101 97 103 111 112 120 121 124 123 126 119 129 118 139 136 141 138 144 143 147 146 149 135 151 137 133 134 132 116 157 13...

result:

ok n=200000

Test #25:

score: 0
Accepted
time: 80ms
memory: 19476kb

input:

200000 200
172333 169168 117870 -1 -1 117870 172333 172333 172333 172333 117870 169168 172333 117870 -1 -1 117870 169168 169168 -1 172333 169168 -1 117870 169168 117870 172333 172333 172333 169168 172333 -1 117870 172333 117870 169168 169168 169168 -1 169168 172333 172333 169168 169168 -1 -1 -1 1178...

output:

148347
1 2 3 13 12 14 10 11 19 17 9 21 22 6 31 30 26 34 38 35 42 44 33 41 43 24 40 29 52 55 51 57 50 28 65 67 60 69 64 66 63 54 48 62 53 75 77 78 83 82 81 90 88 80 92 89 73 94 95 96 107 106 105 113 118 119 124 121 122 126 116 117 133 132 115 131 128 114 136 110 111 130 109 100 129 103 98 141 142 102...

result:

ok n=200000

Test #26:

score: 0
Accepted
time: 124ms
memory: 33880kb

input:

200000 200
71728 181678 57480 57238 87080 27789 67133 15591 175719 17434 2758 50123 180206 99922 116766 120303 119565 15899 116015 109614 155896 81537 157740 132010 879 28134 152566 36824 96858 73248 127121 163995 101018 123342 68687 76432 110532 190760 42730 54304 149436 132936 18957 95790 198570 1...

output:

200
120775 126629 8265 64993 172598 81228 132343 118168 148701 162156 154856 150744 141410 125717 79929 4073 162920 7756 141375 172775 114610 35216 134552 167595 108333 91507 82058 142286 181519 53704 65307 170561 136521 138768 148354 84064 12545 195080 136159 148019 97598 104008 80383 12219 116059 ...

result:

ok n=200000

Test #27:

score: 0
Accepted
time: 112ms
memory: 27156kb

input:

200000 200
159099 26460 179746 158043 151723 44633 3071 161365 123351 181437 49560 138758 52967 49750 51481 170781 9340 18696 77243 173980 97559 114412 141756 85818 194972 59636 41551 90761 43355 137796 196873 149774 118585 133256 197245 162349 180680 82804 90253 164445 40716 109335 6249 186560 1717...

output:

200
119181 125230 141866 155651 135595 151119 186037 115364 105294 189310 181519 184375 185384 142956 130196 132766 126380 144613 173829 134447 147446 150127 168042 105911 150905 107578 127576 152897 197732 141247 131834 122348 199040 129489 153941 123513 188834 163946 193852 120956 149010 101789 16...

result:

ok n=200000

Test #28:

score: 0
Accepted
time: 112ms
memory: 23220kb

input:

200000 200
110460 108755 7957 61155 22769 56024 195142 76765 10228 178763 6914 25317 67478 10196 100390 16961 80070 169148 12699 159191 31155 39610 194251 87501 189795 33427 40603 80868 95152 82846 128964 105584 15466 131528 101089 21401 122657 51887 163120 147607 19057 13504 74227 4431 174876 10766...

output:

125316
106 86 7 23 100 49 25 112 60 85 72 64 65 104 78 121 10 58 77 45 18 70 39 89 20 55 82 105 108 107 56 109 40 95 115 66 76 97 34 31 110 37 103 81 48 116 87 1 73 2 46 50 32 52 35 15 62 61 91 29 84 24 30 119 28 79 17 8 43 99 120 94 13 75 102 96 90 4 117 47 6 51 38 83 69 92 27 22 26 74 57 21 118 93...

result:

ok n=200000

Test #29:

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

input:

200000 200
134073 106122 134864 12136 89660 85770 1668 47359 173147 101127 47392 65347 74706 159412 119135 25460 128196 28408 143912 138378 175762 156398 124375 379 27822 183151 124515 7318 160230 39974 113604 24651 39197 178171 194366 51855 175639 30754 107986 74319 11359 86518 46886 194021 137248 ...

output:

81697
211 397 403 354 236 97 247 168 113 363 35 108 44 404 208 321 167 306 421 93 453 393 366 414 151 289 142 277 405 59 26 105 227 157 349 283 311 265 131 444 120 114 34 343 353 63 428 137 21 37 101 356 197 293 303 9 326 130 372 297 278 359 469 129 459 225 305 165 324 88 94 391 127 274 82 210 423 9...

result:

ok n=200000

Test #30:

score: 0
Accepted
time: 74ms
memory: 23876kb

input:

200000 200
158220 158220 36982 158220 158220 184935 158220 158220 52082 158220 195489 158220 118106 2411 158220 177652 118266 61796 158220 158220 79182 12491 158220 59907 158220 158220 158220 158220 183325 68983 35264 64868 63646 158220 142799 177202 158220 158220 158220 158220 109907 96573 158220 1...

output:

60119
211 432 303 340 11 438 321 271 499 155 237 435 481 357 454 6 46 29 257 72 368 188 318 16 101 36 302 103 362 243 490 261 322 352 411 330 259 57 380 351 313 45 153 241 496 51 426 354 149 320 311 151 185 133 282 393 197 236 484 118 459 203 115 344 274 35 183 403 281 171 294 220 336 114 254 63 270...

result:

ok n=200000

Test #31:

score: 0
Accepted
time: 65ms
memory: 21556kb

input:

200000 200
95313 67039 25703 178719 47633 95313 192514 67039 137017 194788 95313 95313 56459 67039 67039 67039 67039 14383 95313 112129 100459 67039 67175 86306 12870 67039 67039 67039 84114 67039 67039 153769 95313 95313 95313 149075 118728 95313 67039 67039 67039 95313 95313 67039 95313 95313 6703...

output:

50909
330 431 563 944 374 787 1157 350 320 10 1079 846 783 327 1120 650 7 640 405 648 616 903 424 242 124 809 635 156 494 932 762 414 864 145 311 685 1016 416 644 679 4 995 71 604 554 496 338 1058 624 304 358 368 1028 848 1030 138 686 94 483 313 766 842 1151 403 231 400 862 802 987 270 886 475 273 3...

result:

ok n=200000

Test #32:

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

input:

200000 200
185217 119589 2020 89940 101865 89940 89940 64148 42889 89940 42889 89940 42889 89940 2020 82457 183221 94320 120513 2020 2020 2020 2020 153116 89940 42889 50143 117154 89940 42889 89940 2020 42889 2020 19490 159817 175040 42889 42889 89940 2020 42889 89940 2020 89940 42889 16730 2020 202...

output:

45152
140 97 1 17 37 130 113 36 58 24 50 94 80 103 123 101 99 19 2 28 81 5 18 142 16 110 8 138 68 27 64 144 127 35 98 47 91 141 136 659 687 394 332 365 155 396 181 425 421 621 167 258 399 464 529 780 507 158 312 663 187 442 455 732 544 453 221 344 783 154 343 754 705 500 273 743 556 718 700 347 555 ...

result:

ok n=200000

Test #33:

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

input:

200000 200
42882 18729 79696 18729 87959 119806 83436 42882 83436 18729 92522 18729 42882 125097 125097 83436 92522 42882 92522 83436 79696 18729 98024 79696 42882 92522 42882 18729 86523 47118 18729 79696 86523 18729 95427 98024 92522 125097 125097 18729 98024 98024 18729 42882 92522 98024 76775 12...

output:

23615
100 92 6 59 102 35 103 54 5 93 97 104 88 87 84 30 99 63 86 67 177 140 200 257 238 291 361 309 192 375 299 378 278 243 325 370 113 208 315 246 345 373 376 320 372 374 377 166 360 293 210 366 204 355 259 362 356 201 590 628 399 443 489 401 630 546 561 657 392 600 609 553 549 662 661 607 407 494 ...

result:

ok n=200000

Test #34:

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

input:

200000 200
31522 101768 52394 115214 101516 93712 44381 44379 171945 141445 4047 141852 4047 6722 113712 52394 38712 167533 127437 186911 186911 41491 93712 197879 142892 6722 31522 44381 167533 4047 180237 44381 58616 116926 10241 142892 127437 38712 141445 101768 141445 142892 4047 41491 22299 113...

output:

19919
80 102 87 31 70 73 42 101 48 65 78 89 96 4 68 57 71 69 82 23 99 90 56 98 81 44 97 75 79 100 94 95 67 85 58 201 202 240 219 228 217 220 215 229 224 235 212 179 209 152 192 234 225 191 186 243 242 169 238 230 231 218 239 221 148 117 241 236 181 245 155 138 237 194 216 210 211 172 193 147 226 206...

result:

ok n=200000

Test #35:

score: 0
Accepted
time: 85ms
memory: 20036kb

input:

200000 200
191902 151655 151655 21129 101074 50561 121202 52374 112392 46934 140828 173972 161159 177069 95834 48116 7829 114750 118184 183124 61648 11216 160044 7829 156823 86425 7829 160795 118184 11216 180456 196830 13744 161237 196830 48116 6368 156823 21683 114750 94395 196830 122405 176318 168...

output:

95280
298 400 248 313 355 264 394 203 352 366 390 332 354 363 211 314 285 270 353 342 357 303 364 368 151 348 224 258 111 350 187 309 398 294 339 358 206 96 302 386 282 376 197 181 383 389 7 312 382 375 370 345 356 388 351 269 319 275 379 397 335 334 384 252 373 327 198 378 399 234 322 349 360 365 7...

result:

ok n=200000

Test #36:

score: 0
Accepted
time: 119ms
memory: 28260kb

input:

200000 2000
33274 147619 90849 8412 110521 138204 90288 63801 69353 183732 158125 169516 93725 129397 137175 60563 137136 143921 103459 109717 178047 80642 109584 56311 157748 85787 7027 54171 61950 14758 187651 14297 126561 122035 64096 168079 126517 103935 103419 2602 132969 113340 86806 69787 173...

output:

4000
41884 182612 5049 172012 146376 170754 89947 31215 90034 92813 149274 116350 172227 66517 50318 48590 17396 125751 108345 142005 57636 24143 180508 15037 113274 149957 23360 54793 58018 2185 80958 167988 145442 178775 159977 160224 108614 130034 60817 8614 162817 179739 124666 104260 57015 5239...

result:

ok n=200000

Test #37:

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

input:

200000 2000
39115 -1 -1 177908 162331 96394 -1 1080 -1 -1 -1 -1 -1 73491 -1 -1 -1 -1 -1 -1 118265 153335 198234 56456 -1 -1 -1 41662 9910 -1 -1 -1 169365 66527 16423 -1 -1 174133 135760 -1 16155 132203 56872 170754 -1 -1 135431 100954 172726 -1 186172 119701 177113 -1 -1 50119 109256 149033 -1 -1 -1...

output:

100201
1 4 5 6 8 14 23 22 21 24 28 29 33 34 35 38 39 44 42 43 41 49 47 48 51 53 52 58 57 56 62 64 70 67 68 66 69 76 74 75 79 80 85 87 88 86 91 92 94 93 95 99 100 103 102 104 98 101 107 108 110 113 114 112 115 120 121 119 118 124 125 127 128 134 133 138 136 137 142 141 146 145 148 151 150 152 153 158...

result:

ok n=200000

Test #38:

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

input:

200000 2000
173044 173044 173044 173044 -1 -1 173044 173044 173044 -1 -1 -1 -1 -1 -1 173044 173044 173044 -1 -1 173044 173044 -1 -1 173044 173044 173044 173044 -1 -1 -1 173044 173044 -1 173044 173044 -1 -1 -1 -1 -1 173044 -1 173044 173044 -1 -1 173044 -1 -1 -1 -1 -1 -1 173044 -1 -1 173044 173044 -1 ...

output:

99865
4 3 9 8 7 2 1 18 17 22 21 28 27 26 33 36 35 32 25 16 42 45 44 48 55 59 61 63 58 68 67 66 73 75 79 84 83 88 87 82 93 96 98 100 95 92 105 104 108 110 112 121 123 125 127 120 131 133 135 130 119 118 141 143 140 147 151 150 155 154 149 161 160 164 159 167 170 173 177 176 175 172 169 184 187 186 19...

result:

ok n=200000

Test #39:

score: 0
Accepted
time: 71ms
memory: 21528kb

input:

200000 2000
82776 -1 82776 82776 82776 -1 -1 82776 82776 82776 -1 82776 82776 82776 82776 -1 -1 82776 1311 -1 1311 -1 1311 82776 -1 1311 1311 -1 82776 -1 -1 82776 82776 -1 -1 82776 1311 -1 -1 1311 1311 -1 1311 82776 -1 1311 82776 1311 -1 1311 1311 82776 82776 82776 -1 1311 -1 82776 -1 1311 -1 82776 ...

output:

133342
1 5 4 10 15 14 18 19 21 13 24 23 27 12 29 26 9 33 32 36 37 8 41 3 44 43 47 48 54 51 56 53 58 50 60 52 62 46 66 67 69 70 73 65 77 76 79 40 86 85 88 84 81 83 93 91 92 82 99 101 96 100 98 75 97 72 64 109 110 112 108 117 118 122 121 120 115 126 114 136 137 141 142 140 139 145 135 134 133 131 132 ...

result:

ok n=200000

Test #40:

score: 0
Accepted
time: 79ms
memory: 19736kb

input:

200000 2000
130482 130482 66229 105858 130482 130482 130482 -1 66229 66229 105858 105858 130482 105858 66229 130482 130482 105858 -1 130482 -1 -1 130482 130482 -1 -1 105858 66229 105858 66229 130482 66229 66229 66229 130482 -1 130482 -1 105858 105858 66229 -1 -1 105858 -1 -1 -1 130482 130482 130482 ...

output:

150017
7 4 3 17 18 15 20 14 10 16 12 9 24 11 23 35 29 34 37 27 33 40 41 31 39 32 13 44 30 6 28 5 2 51 65 57 61 69 67 59 77 76 56 79 75 55 86 87 84 85 93 94 92 96 81 83 91 82 73 101 100 74 103 99 72 112 111 113 118 116 109 122 123 120 126 127 117 133 132 125 135 136 137 139 140 131 154 157 158 161 15...

result:

ok n=200000

Test #41:

score: 0
Accepted
time: 122ms
memory: 33236kb

input:

200000 2000
101952 32029 22112 74652 36871 124948 190115 192922 77396 124166 146300 84257 32007 16981 180351 50810 142469 104685 185735 156239 183050 150236 138905 58906 59811 139401 158542 162704 117714 20472 95899 153227 38292 128741 90419 65216 14429 119571 93179 189240 81751 4476 125588 13568 13...

output:

2000
170765 78226 39458 23967 155353 113589 84003 190480 59612 45516 22847 14311 51896 53337 193307 32011 57506 137009 191345 91610 183217 121735 60824 127361 157368 89381 41924 170621 164596 3370 23319 176874 151647 27275 64652 181385 58727 62275 150680 184944 150083 139150 138384 149868 127500 172...

result:

ok n=200000

Test #42:

score: 0
Accepted
time: 109ms
memory: 26180kb

input:

200000 2000
181011 171188 197515 116165 126398 143246 85183 157376 52755 190748 88168 33007 178591 194361 129002 172422 136429 126562 46532 192376 48292 44636 130680 199078 3535 183587 140343 122180 177902 138754 96860 7227 199668 164742 154132 2964 175887 95364 16052 52639 125998 159572 103808 1861...

output:

2000
101627 140493 177763 108287 165155 154546 166945 140511 170017 142528 132265 134831 165987 191953 188824 117313 186261 167463 116232 127284 158888 161590 119849 155002 150225 164016 121632 116837 174366 143409 113657 148390 115228 104797 136192 149687 162594 142927 165817 134990 184557 150422 1...

result:

ok n=200000

Test #43:

score: 0
Accepted
time: 116ms
memory: 25672kb

input:

200000 2000
31758 172153 4658 133505 19209 126203 46082 175958 126507 8075 196751 37637 53056 53143 161782 7274 110181 155633 10201 94349 1752 169966 166138 34389 126498 54988 89941 144105 19378 3066 2373 28331 182501 126353 57466 154628 110336 94773 88937 79120 12649 189709 183441 171014 38163 1960...

output:

130106
1863 2386 2540 525 2609 862 1698 1942 277 1822 2043 1348 784 2250 306 850 168 1217 62 77 1476 406 873 2234 324 2651 2349 808 1424 1049 1383 2588 1107 11 1443 2008 1365 424 1763 1611 935 774 1544 2082 1503 2030 46 375 2209 1966 1882 1093 124 2013 205 492 1021 1661 1109 2055 1554 1060 2148 2261...

result:

ok n=200000

Test #44:

score: 0
Accepted
time: 114ms
memory: 26748kb

input:

200000 2000
39387 164848 53642 144530 168847 59162 108438 195593 -1 98124 98289 171016 156231 84806 131719 187600 95413 30647 25904 87908 155913 180300 98195 79312 79184 114492 149936 154286 79455 108570 189018 198703 61129 106978 467 163899 126322 76794 125717 35285 154829 90901 104986 131884 12984...

output:

82701
8 5 2 4 7 6 3 1 282 220 32 598 601 724 283 115 353 584 68 180 750 505 611 521 409 425 318 399 118 751 693 695 701 186 78 637 654 394 617 198 365 337 646 722 778 295 528 145 548 31 668 256 630 170 772 67 467 16 488 764 757 661 246 663 735 635 482 727 676 489 771 325 499 754 710 157 780 730 86 5...

result:

ok n=200000

Test #45:

score: 0
Accepted
time: 79ms
memory: 23828kb

input:

200000 2000
125931 82363 196259 193453 193453 172520 108211 193453 193453 31201 188316 193453 143960 77182 193453 193453 193453 193453 193453 50375 177523 90467 71453 62701 192608 132511 137527 193453 193453 193453 192124 193453 193453 124307 193453 124234 193453 193453 113186 113177 61792 31230 193...

output:

59847
1839 278 565 1537 216 2350 2326 434 1861 48 893 689 1751 879 2095 1962 990 1736 880 1087 1258 755 2278 1753 1795 3 1381 1711 1577 524 1603 2111 1123 1612 1553 1198 1063 1886 328 1955 1615 428 913 723 1276 2282 2277 525 1073 2483 1401 2467 1767 1499 2388 2212 25 1901 2329 1432 1404 31 309 1105 ...

result:

ok n=200000

Test #46:

score: 0
Accepted
time: 65ms
memory: 23140kb

input:

200000 2000
190414 88567 108607 190414 88567 88567 88567 154778 88567 88567 88567 190414 175560 88567 74907 169531 147803 120930 88567 88567 88567 190414 88567 148510 88567 190414 122165 88567 190414 54044 41962 88567 148898 41563 190414 190414 130143 142633 88567 190414 190414 88567 57302 88567 885...

output:

48447
148 142 120 13 16 88 145 8 131 33 24 17 133 104 38 92 100 149 89 151 37 75 58 97 63 72 27 18 3 78 73 48 154 80 15 115 87 43 30 67 91 31 34 121 96 140 116 83 94 129 74 152 62 105 10935 8821 9771 2480 7985 10218 9429 633 9413 5585 8134 8167 7565 380 6999 3447 14007 2997 1804 998 9639 15475 12169...

result:

ok n=200000

Test #47:

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

input:

200000 2000
121282 30655 121282 30226 85290 30655 121282 85290 30655 121282 78647 85290 85290 85290 30655 85290 17006 30655 30655 44721 16612 85290 50269 121282 121282 121282 30655 30655 94656 85290 121282 85290 19157 85290 121282 30655 121282 102293 30655 121282 121282 121282 199748 180042 85290 12...

output:

44095
895 2040 43 345 355 2549 3691 101 1403 3998 2428 3023 3454 596 2920 2717 2176 2867 861 2398 3941 1984 1956 333 956 672 2748 1834 1356 2189 2334 2254 3232 4002 549 2542 432 1631 2484 3542 659 900 2836 876 217 140 4015 976 2147 2485 1774 1232 3928 1792 805 1850 3850 819 1499 1303 2465 3263 3962 ...

result:

ok n=200000

Test #48:

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

input:

200000 2000
197442 20803 31136 104455 62388 99482 62388 167799 104455 167799 99482 99482 119090 119090 167799 20803 99482 167799 104455 114223 197442 20803 62388 89520 114223 99482 83988 89520 114223 167799 197442 89520 45340 89520 99482 75734 20803 104455 167799 20803 197442 75734 99482 197442 1044...

output:

19797
1200 2004 1303 1142 3505 3827 4065 966 3159 2618 3771 163 350 353 3668 2676 1699 399 2762 2786 1569 863 1489 3222 565 2040 1451 2642 2992 949 2141 668 2319 3756 3964 3503 3501 182 3100 2347 1820 3477 3481 3717 568 2719 1929 177 3868 1650 585 400 227 3045 3657 816 695 2831 1577 3571 1549 748 39...

result:

ok n=200000

Test #49:

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

input:

200000 2000
42217 157531 23328 34530 82919 91926 151461 85398 1708 100230 71228 34530 34530 34530 114583 151461 100958 28407 114583 186533 155767 76089 78777 100230 155767 42217 85398 151461 28874 155767 1708 100897 85398 151461 47647 162492 50695 100897 28407 114583 47312 28407 100897 50695 1708 12...

output:

9933
516 2407 714 283 2390 2379 951 2294 2408 2149 1543 669 835 1527 619 1483 2411 1607 2393 2254 1503 2384 498 400 1398 1877 2402 1822 206 443 545 470 1564 2151 765 1330 289 1250 261 2391 1861 112 46 1651 2008 1899 2409 2373 767 851 1252 758 2412 2317 2367 1058 578 589 2382 407 1703 1940 2051 2357 ...

result:

ok n=200000

Test #50:

score: 0
Accepted
time: 95ms
memory: 19536kb

input:

200000 2000
150074 105205 102345 137461 162905 8130 10810 65669 95107 186341 12600 103015 108299 39303 6552 116472 101281 51602 177207 137545 187156 170440 100812 118294 25802 55582 166032 71864 57700 92795 99279 126977 178370 105287 65506 29064 176174 44252 122815 143019 4598 197391 136713 16208 10...

output:

96000
3816 3722 2833 2414 2524 3778 3889 3415 3859 2923 3993 3931 3551 3943 2942 1863 3798 3176 1856 3822 3755 3735 2147 3173 2842 3108 3495 584 3720 1358 3466 3967 3805 3226 2901 3120 3354 3481 3409 3944 3115 3358 3528 3469 3845 3455 3930 3322 3835 2757 2345 3917 3511 3890 3367 1329 2354 2885 3604 ...

result:

ok n=200000

Test #51:

score: 0
Accepted
time: 136ms
memory: 27812kb

input:

200000 20000
93775 146240 162160 1245 138912 103160 35001 152451 10853 161817 102592 72801 191993 71745 175835 154790 35976 57703 43797 133966 112150 145545 108751 1473 30065 6386 102886 52436 29394 96842 73197 68938 183670 167617 141195 194517 102026 152405 184706 2891 80132 153677 52713 194359 188...

output:

65180
115608 65491 42485 95009 91816 82662 123354 103262 19586 106710 12760 83927 74335 3135 113642 454 36628 96612 119646 110378 91156 6612 80257 60477 86687 109623 55674 12203 119464 62257 105027 57125 75412 98529 48808 8988 25817 95395 60577 55798 91632 103905 73414 69356 102830 26154 68456 49087...

result:

ok n=200000

Test #52:

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

input:

200000 20000
-1 -1 78002 121699 54750 176756 -1 45043 -1 118924 -1 166982 157390 -1 72825 -1 -1 -1 -1 -1 -1 -1 150278 -1 -1 74841 197826 -1 71494 78638 -1 -1 161524 -1 -1 -1 -1 166033 -1 -1 156757 199845 25044 -1 187410 152004 36371 174536 141479 -1 35445 -1 56264 -1 -1 -1 -1 -1 -1 1075 -1 78092 -1 ...

output:

99953
6 4 3 5 8 10 12 13 15 23 27 26 30 29 33 38 42 41 43 45 48 46 49 47 51 53 60 62 65 66 64 74 73 70 71 72 80 81 79 78 85 87 84 86 94 93 92 91 96 97 100 101 106 105 111 115 116 117 114 119 121 123 129 128 125 126 127 132 135 138 139 137 141 142 145 148 151 153 152 155 159 164 166 168 169 176 173 1...

result:

ok n=200000

Test #53:

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

input:

200000 20000
53480 53480 53480 53480 -1 53480 -1 -1 53480 53480 53480 -1 -1 -1 53480 -1 53480 -1 -1 -1 -1 -1 53480 53480 53480 53480 53480 53480 -1 53480 -1 53480 53480 53480 53480 53480 -1 -1 53480 53480 -1 53480 -1 53480 -1 -1 -1 -1 -1 -1 -1 53480 53480 53480 -1 -1 53480 53480 53480 -1 53480 -1 53...

output:

99724
4 6 3 11 10 9 15 17 2 1 28 30 36 35 40 42 44 39 34 33 32 27 26 54 53 59 61 63 65 67 69 58 73 75 81 83 80 86 90 89 88 94 98 100 103 102 106 97 96 79 78 112 115 117 119 122 126 130 132 137 139 142 145 144 141 136 150 135 134 129 128 156 125 124 161 163 167 170 173 175 172 180 179 183 178 169 194...

result:

ok n=200000

Test #54:

score: 0
Accepted
time: 65ms
memory: 19480kb

input:

200000 20000
182871 -1 55178 182871 55178 -1 -1 -1 182871 -1 182871 -1 182871 55178 55178 -1 182871 182871 -1 55178 182871 55178 182871 -1 182871 182871 55178 -1 55178 -1 -1 55178 55178 -1 -1 55178 182871 182871 182871 55178 55178 182871 182871 -1 182871 55178 55178 182871 -1 -1 55178 -1 182871 -1 -...

output:

133510
1 4 5 3 9 11 13 15 18 14 23 22 26 27 29 25 21 20 33 17 32 43 41 48 47 45 46 51 42 53 40 39 36 56 59 60 58 38 66 37 69 72 74 73 77 79 83 81 85 78 91 90 93 88 89 82 96 87 101 103 110 111 108 109 114 106 107 102 117 71 105 68 120 100 123 124 126 122 131 132 134 128 138 99 144 143 146 148 154 153...

result:

ok n=200000

Test #55:

score: 0
Accepted
time: 80ms
memory: 19628kb

input:

200000 20000
120195 182822 120195 120195 73702 120195 73702 182822 -1 -1 120195 73702 120195 -1 -1 -1 182822 120195 182822 182822 182822 182822 -1 120195 -1 -1 182822 120195 182822 -1 73702 -1 73702 182822 -1 120195 73702 73702 -1 120195 73702 73702 182822 -1 -1 -1 120195 73702 73702 -1 73702 73702 ...

output:

150095
8 6 7 2 4 5 13 12 11 3 22 18 24 21 20 1 29 28 31 27 34 33 36 38 19 43 40 42 41 17 37 47 49 52 55 57 54 59 51 48 64 70 73 74 69 72 71 67 68 78 80 79 95 99 100 93 98 97 103 90 94 105 85 96 110 108 111 109 107 89 117 116 84 120 119 115 122 114 92 125 87 91 127 124 86 145 143 138 154 156 153 158 ...

result:

ok n=200000

Test #56:

score: 0
Accepted
time: 134ms
memory: 34172kb

input:

200000 20000
68009 174938 66559 7291 85018 61998 179370 76727 67178 25180 129529 111815 43723 70084 67077 196843 24495 78296 60277 47184 135819 188535 73760 147615 168785 93586 44475 74399 92318 75653 63878 31267 181734 140907 167989 7512 93740 85533 186011 159213 184282 17668 77652 28170 73034 7360...

output:

20000
115141 78119 28113 169804 197316 146827 190169 100346 7243 105849 66331 97322 137741 93323 78808 189710 180554 89729 69746 114404 19952 49244 26066 139553 60645 12356 114843 43835 3993 32105 133573 59252 189100 110781 99233 141090 99717 191348 36219 89941 133423 99461 115114 135608 78259 16430...

result:

ok n=200000

Test #57:

score: 0
Accepted
time: 124ms
memory: 26256kb

input:

200000 20000
128956 148820 84588 56405 96263 56556 164658 126897 105632 165712 129474 4914 170830 145277 145452 66104 49827 42053 33333 10519 10745 144081 19509 167973 153833 116218 12622 64054 123587 159280 21304 155952 7469 18954 133378 20155 10943 111695 158578 82891 198433 27683 14319 82585 1254...

output:

20000
199302 159085 174605 178614 154247 109728 185546 128279 168929 187282 186598 115673 140175 195796 198372 177129 100747 128875 145655 152387 103134 138832 164510 107111 152757 139278 163656 102692 160354 129592 171109 116531 152448 131848 107752 183823 100233 180250 130445 139294 147751 196815 ...

result:

ok n=200000

Test #58:

score: 0
Accepted
time: 126ms
memory: 24532kb

input:

200000 20000
149697 5035 113355 194012 2370 52295 96646 127200 73761 124958 168731 35358 105716 26813 13257 145809 96924 194125 23584 90106 9704 96729 59877 169169 96665 44001 111054 98867 128316 49853 162840 27467 101145 181832 37803 118361 3158 166751 34186 196145 35198 95979 166874 6048 102637 38...

output:

174781
3273 20422 6601 16043 2713 11483 17996 22760 11254 19201 21066 13525 7854 2072 12166 17942 22833 4921 16541 18410 16837 18014 22749 17202 14076 21783 15534 10776 5299 11281 11549 3231 1359 7948 1680 14985 10319 16716 3453 8430 15784 21610 10808 4683 18561 14059 7882 18638 21595 21314 9823 190...

result:

ok n=200000

Test #59:

score: 0
Accepted
time: 141ms
memory: 25636kb

input:

200000 20000
22722 132806 5627 196733 15786 170842 195468 171659 35659 102608 99626 187898 110370 112018 3749 26410 186186 193209 24886 151957 17528 49816 196933 12170 67361 181331 175595 163348 16228 128941 5366 124841 171370 95342 179742 155540 152281 161738 27718 54036 43149 39066 167734 122184 4...

output:

80000
30516 54123 34547 53279 74304 19266 12828 15616 63865 37808 49687 4015 58967 87721 82513 13244 25182 1036 75112 55705 53586 33230 49737 12497 20579 45569 57814 62939 12668 25109 6669 18398 56141 50626 10909 48627 59144 44659 2375 61259 27634 30609 35609 35815 55086 48965 67927 77052 10006 5421...

result:

ok n=200000

Test #60:

score: 0
Accepted
time: 82ms
memory: 24864kb

input:

200000 20000
120219 189043 174169 146756 174169 110651 147032 69906 121188 117633 83381 174169 112529 174169 174169 36488 174169 91612 19492 106732 174169 174169 58537 174169 174169 174169 135186 174169 130517 174169 174169 174169 11167 174169 123398 38157 76193 59557 174169 147344 143943 155641 157...

output:

70905
45476 4076 7247 18314 37975 45679 17392 25330 45045 31432 17575 11643 3292 7967 22786 44104 2377 25360 37707 22794 934 19599 26260 36831 37107 40406 32181 19634 36841 825 23827 8151 35845 40531 5251 39445 43908 21703 22542 10408 41408 13184 28745 28869 35455 25119 30185 39611 20340 2879 35534 ...

result:

ok n=200000

Test #61:

score: 0
Accepted
time: 72ms
memory: 22220kb

input:

200000 20000
133074 116007 116007 133074 133074 116007 163037 124221 26870 116007 50608 133074 116007 162327 116007 116007 133074 116007 133074 133074 116007 116007 133074 133074 133074 12658 133074 133074 133074 133074 133074 133074 133074 189182 133074 133074 116007 116007 133074 116007 116007 133...

output:

59947
5960 25888 26289 26739 13719 1019 13468 3659 19292 19286 36020 28421 24589 40821 35605 31981 49320 43400 37115 41934 5685 26758 31358 27669 47482 31661 10154 10395 49957 21308 50111 7300 13049 9301 10195 42661 25003 24926 10488 9487 2373 17621 44603 16134 45043 48418 37460 8163 19738 9916 3567...

result:

ok n=200000

Test #62:

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

input:

200000 20000
19825 65159 19825 97273 97273 19825 176924 65159 65159 170273 19825 119025 19825 65159 197429 65159 19825 97273 19825 182617 65159 63466 97273 19825 19825 19825 97273 19825 19825 65159 97273 97273 19825 19825 65159 97273 19825 97273 19825 19825 19825 59464 65159 63254 97273 19825 19825 ...

output:

56698
59900 43070 90138 23918 88096 44050 94769 96406 90938 31651 58967 52828 5636 34125 16160 99239 86772 39936 25903 81723 88698 22177 34529 24834 63235 98290 62718 107658 92544 73908 59805 26988 31603 55429 96277 90600 82293 48377 20834 37165 11102 47402 73543 73435 48192 68514 6580 96926 18287 1...

result:

ok n=200000

Test #63:

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

input:

200000 20000
45204 93379 23085 9519 1493 62913 123206 25356 123206 46553 31130 93379 1493 46553 123206 46553 123206 1493 23085 45204 38443 9519 93379 46553 93379 46553 23085 182542 46553 46553 46553 1493 25356 45204 186887 9519 93379 123206 1493 23085 9519 38443 46553 130551 9519 1493 45204 45204 12...

output:

37847
2180 15983 7289 11862 2236 1473 16814 8025 21049 1842 5697 3256 24161 7726 21150 24209 16055 15232 22725 13347 15822 12449 23430 14971 17953 13101 3915 7270 20557 4982 7299 24515 17785 13675 11376 3147 6947 6211 21908 3435 11421 12252 8793 1070 9396 17323 6043 11390 7800 15223 5607 5762 20999 ...

result:

ok n=200000

Test #64:

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

input:

200000 20000
70238 167318 103566 167318 167318 129252 99566 195432 63910 4416 99566 196584 193762 44920 15141 98902 141324 98367 147838 66088 35832 63910 45568 147838 40314 141324 129252 98367 167318 148335 70238 139647 1603 70238 11104 98367 44920 35832 45568 167318 66088 70238 35832 11104 141324 4...

output:

25929
10540 10048 7514 298 7555 8842 8244 13197 528 4255 13442 13071 18070 3796 9167 2170 8129 18047 12404 14638 8658 11888 18031 1964 1754 15384 2435 13001 10209 4160 13680 16540 15113 2068 12627 3281 5669 13618 15285 7515 18050 14782 15192 658 2172 10516 5549 4956 12274 8690 15740 16700 743 4854 1...

result:

ok n=200000

Test #65:

score: 0
Accepted
time: 121ms
memory: 20496kb

input:

200000 20000
47480 97245 156827 34406 142747 156684 32363 71084 126249 107239 64535 105952 174425 149188 105813 50529 167264 29078 94102 51759 79692 194346 142334 76513 167513 149150 78396 183752 89509 44295 81215 189860 96739 162432 90502 117810 89211 61544 93946 83835 17255 33234 88533 163091 9826...

output:

100000
25109 37461 32148 26550 34036 26216 38649 19498 15900 7776 36131 28509 6293 31727 36553 20373 38719 38111 8207 37016 30667 38576 31328 15666 39573 37434 32441 39823 35088 16323 38090 33955 25750 39370 17120 28091 29180 38093 2550 39817 35290 15053 36651 33794 38313 38198 30779 35486 31658 278...

result:

ok n=200000

Test #66:

score: 0
Accepted
time: 162ms
memory: 27180kb

input:

200000 200000
76113 64426 167553 77903 10432 80203 191605 25421 102810 193431 92178 72606 112240 17107 154196 72773 14236 149513 158638 34083 68962 138454 135203 16157 193919 14106 115485 156279 78608 192330 170126 36899 51014 50789 169119 183872 139942 105687 169593 177274 24390 5001 140953 162763 ...

output:

199999
131790 91090 95675 81844 88128 137173 2354 116927 100030 85944 122572 132696 94216 54568 26279 32472 138463 80145 134933 28621 94448 125370 111853 106816 137087 87318 56066 41771 50037 130556 135341 83023 91905 50838 58651 61261 98468 66606 116620 21054 137354 35516 99286 17825 139812 134629 ...

result:

ok n=200000

Test #67:

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

input:

200000 200000
-1 145463 175919 85269 -1 157612 -1 87408 73227 92543 31417 76732 98314 -1 67077 171722 31240 -1 -1 153625 143637 50341 -1 179111 -1 -1 -1 -1 47829 -1 117903 -1 -1 -1 -1 -1 -1 40440 -1 -1 -1 28989 90052 62279 -1 -1 -1 -1 -1 -1 -1 -1 117271 74952 -1 -1 163906 -1 -1 177532 44754 162517 -...

output:

99419
3 2 4 6 13 10 8 12 9 11 16 15 17 20 21 22 24 29 31 38 43 44 42 53 54 57 60 62 61 69 66 68 64 67 65 73 74 76 77 79 80 78 85 88 90 92 94 95 98 97 100 107 106 108 111 112 110 114 116 115 119 125 124 126 129 128 131 132 135 134 139 140 138 143 145 147 149 155 154 157 159 160 164 163 162 165 166 16...

result:

ok n=200000

Test #68:

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

input:

200000 200000
25873 -1 -1 25873 25873 -1 25873 -1 -1 25873 25873 -1 -1 25873 25873 25873 -1 -1 -1 25873 25873 25873 -1 25873 25873 -1 25873 25873 25873 25873 -1 25873 -1 25873 25873 25873 -1 25873 -1 -1 -1 25873 -1 -1 -1 -1 -1 25873 25873 -1 25873 -1 -1 25873 -1 -1 -1 -1 25873 25873 25873 -1 25873 -...

output:

100062
1 5 7 4 11 10 16 15 14 22 25 30 32 36 38 35 34 42 29 28 27 24 49 51 48 54 21 20 61 63 60 59 69 68 73 78 77 76 83 85 87 90 95 94 98 93 101 106 110 113 112 109 108 118 120 124 126 123 129 132 135 137 134 140 131 144 143 149 148 147 122 105 158 162 161 160 157 168 170 174 177 176 173 172 167 183...

result:

ok n=200000

Test #69:

score: 0
Accepted
time: 69ms
memory: 20376kb

input:

200000 200000
65297 65297 -1 -1 65220 -1 65297 65220 65220 65220 -1 65297 65220 65220 65297 65220 -1 65220 65297 65220 -1 65297 -1 -1 65220 65220 65297 -1 -1 65220 65220 65220 65297 -1 65297 -1 65220 65220 -1 -1 65297 65297 -1 -1 65297 -1 -1 -1 65297 65297 -1 65220 -1 65297 -1 65220 65220 65297 -1 6...

output:

133322
2 1 5 7 10 15 16 19 20 22 18 12 14 27 26 25 33 32 35 31 38 37 42 30 41 13 45 9 8 50 52 49 54 58 57 61 56 60 64 68 73 72 76 75 71 67 87 85 86 83 91 84 93 80 95 90 100 98 102 97 108 99 107 70 111 106 114 116 115 105 104 122 82 121 81 126 128 130 125 132 79 135 139 141 143 140 146 137 149 152 15...

result:

ok n=200000

Test #70:

score: 0
Accepted
time: 75ms
memory: 18460kb

input:

200000 200000
150378 150378 170017 170017 170017 170017 150378 150378 170017 150378 -1 150378 170017 60078 150378 -1 -1 60078 170017 -1 -1 -1 170017 -1 60078 170017 170017 -1 150378 150378 170017 60078 -1 -1 -1 170017 60078 -1 170017 60078 150378 -1 170017 -1 -1 150378 150378 -1 150378 -1 170017 170...

output:

150255
9 10 13 15 14 12 6 19 18 8 5 7 4 2 23 1 27 25 31 30 32 29 26 3 36 37 39 41 40 43 47 49 54 46 56 53 67 65 68 58 59 66 71 52 77 78 74 76 81 75 84 86 88 90 91 92 96 94 85 100 98 95 102 103 51 114 111 116 119 118 120 126 123 127 132 110 115 135 134 112 131 109 105 139 140 87 138 130 83 144 129 73...

result:

ok n=200000

Test #71:

score: 0
Accepted
time: 152ms
memory: 34756kb

input:

200000 200000
65293 111769 9846 113618 4389 2686 122881 190488 87394 112653 190607 46464 176729 78380 84909 98868 88752 90532 140777 9589 166015 183684 111947 196561 102532 104824 118352 127102 198691 29161 93438 186053 62793 79630 13845 75423 75585 172499 171716 130130 141868 41527 39725 44704 1552...

output:

200000
46973 117074 170724 68760 16949 31566 62060 106229 20885 73535 152309 150880 185792 184024 187508 42611 122119 142131 45462 96687 52656 147559 22276 42973 45714 141943 89323 191159 84571 41149 148734 16452 100466 115081 151171 63648 120529 157274 84307 45781 187082 94725 151346 164614 139966 ...

result:

ok n=200000

Test #72:

score: 0
Accepted
time: 172ms
memory: 27996kb

input:

200000 200000
152578 159465 190329 187032 68046 84194 148282 75318 161889 192842 8812 79543 83337 76708 91101 13104 81874 71145 97472 54598 160342 88602 44398 176705 159254 97128 156796 94141 117461 189915 150052 74405 44583 186367 57990 122110 59961 123488 156349 109057 168634 36502 168933 67844 54...

output:

200000
149834 173696 193663 153200 186299 178773 132837 135449 122027 138972 112643 136541 176570 170788 117307 103281 113683 135630 158351 190851 178960 124651 133862 174802 120681 192787 167052 180204 156193 133688 104617 149647 154516 142491 153156 127626 149370 165447 178482 102108 164158 101169...

result:

ok n=200000

Test #73:

score: 0
Accepted
time: 160ms
memory: 28384kb

input:

200000 200000
12621 146155 49945 73754 198242 110032 151368 192200 24843 69652 190427 20595 140815 183910 49411 77737 375 33611 117268 77634 165644 40040 183334 90835 191799 158200 31294 81315 137182 21565 128202 35178 100435 122453 144007 171763 15183 194329 153112 182103 131612 95839 144458 53600 ...

output:

199999
2863 40044 47665 18486 10857 45570 30206 45246 36203 37053 22332 40531 52720 17466 12209 48709 6959 22868 48291 29616 25231 42061 37893 5313 21105 46154 15302 8584 48167 39044 18969 52482 21232 32011 34785 7779 40849 50577 36909 32993 51781 29474 8712 42702 34560 27545 38870 13124 25562 16590...

result:

ok n=200000

Test #74:

score: 0
Accepted
time: 154ms
memory: 29796kb

input:

200000 200000
64152 30271 174130 176119 93563 199046 36257 195844 703 68442 38357 21198 97620 79929 61383 81328 136091 65808 183989 7734 188960 88439 146332 137464 141728 43554 85186 11806 175237 167614 127081 90665 2315 85078 176478 69875 196012 32256 94189 139699 142746 96430 141869 160511 22416 1...

output:

200000
198457 13945 188786 107373 188145 136577 155162 158975 180747 9809 6632 111504 102992 189327 191540 37537 195025 74659 137513 113459 111934 76523 190240 185861 123863 48662 147142 194151 143295 42317 179152 58527 189719 38262 16394 189373 112701 173553 66513 6510 78166 146020 128663 136315 52...

result:

ok n=200000

Test #75:

score: 0
Accepted
time: 128ms
memory: 26564kb

input:

200000 200000
67713 51083 192623 51083 51083 179039 188005 51083 51083 161400 51083 8124 36080 51083 51083 51083 51083 152739 51083 198023 51083 51083 51083 51083 90375 128326 30418 51083 24936 51083 105259 51083 62568 51083 51083 139477 13882 51083 5614 154940 124111 194866 51083 51083 74994 188782...

output:

200000
198432 82468 178531 20823 181857 142497 25618 53856 169428 127322 86978 28507 109050 183183 187686 34063 140864 146101 132893 99719 101411 7383 51739 60744 158117 70013 36973 143063 108193 92818 121999 70250 161692 98800 19559 67412 116127 23261 15010 175154 9742 167432 94996 85625 143668 189...

result:

ok n=200000

Test #76:

score: 0
Accepted
time: 128ms
memory: 26568kb

input:

200000 200000
48187 48187 52239 48187 92871 48187 100074 52421 48187 29664 48187 93992 122053 122053 48187 48187 122053 48187 48187 48187 48187 48187 141651 48187 122053 171303 49537 124800 188027 167475 48187 48187 122906 122053 140535 198495 48187 167653 122053 122053 78495 48187 122053 85758 1293...

output:

199998
13104 17628 3234 17680 9885 14274 15560 11970 15577 19332 10113 20818 12515 17277 10037 12483 4269 15145 9696 8043 1479 6216 1220 11821 7855 179 14588 5272 9260 14527 6278 16897 10253 4623 17268 4244 3499 7303 15411 6796 5939 8026 4011 2571 15448 15572 12224 4952 14745 4229 14594 585 12638 36...

result:

ok n=200000

Test #77:

score: 0
Accepted
time: 134ms
memory: 24204kb

input:

200000 200000
70122 70122 109422 32800 32800 192486 70122 32800 32800 70122 70122 32800 109422 32800 95244 142749 32800 63504 189440 170358 43251 70122 109422 32800 32800 32800 70122 109422 131086 109422 32800 109422 109422 18932 109422 109422 38 32800 152270 32800 32800 32800 70122 94493 70122 5208...

output:

199999
34797 26781 13558 2488 30800 23952 20584 13236 1058 14569 2454 32826 6563 35051 26075 20862 21172 26621 9000 21761 28092 31681 10171 6290 24133 32324 11412 3094 11693 27651 34895 9443 20583 1397 14300 24282 17289 23370 12048 12829 33302 26222 30519 28973 18431 5905 5003 32914 10062 32312 1724...

result:

ok n=200000

Test #78:

score: 0
Accepted
time: 106ms
memory: 22516kb

input:

200000 200000
65679 171395 84702 171395 188891 143141 130660 65679 143141 65082 65679 82796 132105 130660 143141 171395 82796 147142 143141 82796 130660 147142 130660 147142 82796 143141 171395 65679 188891 84702 132105 84702 168438 65679 82796 147142 130660 188891 65679 147142 84702 19573 188891 18...

output:

200000
174076 13290 125624 94754 37063 191905 77341 73269 145895 80010 141622 99985 51214 18339 183367 167469 192001 101239 193519 165783 97157 25176 172557 73066 175523 106163 68978 159407 71347 110044 41807 57540 59482 49319 182555 149019 38303 157369 65213 174239 76126 33296 178307 137783 28289 1...

result:

ok n=200000

Test #79:

score: 0
Accepted
time: 106ms
memory: 21428kb

input:

200000 200000
125353 156353 107747 57576 37795 4454 139166 99851 124868 4454 93432 39386 7130 172476 179335 49909 156624 7130 179335 19913 156624 57576 37795 139166 63042 185541 63042 49909 112379 107747 4454 185541 154993 125353 63042 185541 101121 156624 124868 39386 138608 179335 125353 112379 25...

output:

200000
199832 59561 45162 120041 113538 157555 159754 128778 20829 160810 11231 174388 27423 194283 107210 59688 177869 105410 122316 125297 39362 13719 71240 164971 30358 36159 54001 168271 131947 185630 92655 41900 114555 146146 196365 42653 113629 6676 197781 134569 42380 88074 186789 88269 11733...

result:

ok n=200000

Test #80:

score: 0
Accepted
time: 161ms
memory: 26336kb

input:

200000 200000
4758 102225 57644 188831 121433 163116 121988 49362 28910 35875 12366 73885 7067 109876 32429 81592 162461 132939 56464 189417 146340 133306 19213 85938 97387 11107 80065 29495 18362 158763 156768 65519 196381 102972 179628 7861 116340 124617 151146 92857 136778 193844 198953 36928 155...

output:

200000
146939 167821 190815 157634 172828 107874 81336 115517 91734 128528 177139 145602 133782 53523 120245 198464 182242 106432 106913 137015 169557 98427 182936 107029 162296 40809 172447 172611 145560 188599 169667 104307 176530 170991 169197 59868 12730 11869 136234 93612 182668 155330 197843 1...

result:

ok n=200000

Test #81:

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

input:

200000 10
39431 39431 39431 39431 158033 158033 158033 158033 50191 50191 50191 50191 90470 90470 90470 90470 67108 67108 67108 67108 46529 46529 46529 46529 171564 171564 171564 171564 -1 158033 158033 158033 158033 50191 50191 50191 50191 90470 90470 90470 90470 67108 67108 67108 67108 46529 46529...

output:

57475
28 8 16 20 12 24 4 53 33 41 45 37 49 57 3 78 86 66 70 62 74 82 32 2 103 111 115 91 95 99 107 61 144 128 136 140 120 124 132 90 169 153 161 165 173 149 157 119 89 194 178 186 202 190 198 182 148 219 211 227 231 215 223 207 177 244 236 252 260 256 240 248 206 176 289 269 277 285 281 265 273 235 ...

result:

ok n=200000

Test #82:

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

input:

200000 10
40840 40840 40840 40840 83730 83730 83730 83730 57264 57264 57264 57264 22511 22511 22511 22511 766 766 766 766 163356 163356 163356 163356 162999 162999 162999 162999 -1 40840 40840 40840 40840 40840 83730 83730 83730 83730 83730 57264 57264 57264 57264 57264 22511 22511 22511 22511 22511...

output:

46864
24 28 8 12 4 16 20 59 39 44 34 49 54 27 72 78 66 84 90 58 26 105 112 98 119 89 57 136 144 128 118 88 163 154 143 117 174 162 142 116 195 199 179 183 203 187 191 173 229 234 209 214 219 224 202 172 265 241 247 253 259 233 273 280 287 294 264 232 303 311 319 293 263 329 338 318 292 262 349 337 3...

result:

ok n=200000

Test #83:

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

input:

200000 10
116795 116795 116795 101311 101311 101311 36381 36381 36381 25084 25084 25084 13632 13632 13632 164850 164850 164850 139305 139305 139305 156395 156395 156395 -1 101311 101311 101311 36381 36381 36381 25084 25084 25084 13632 13632 13632 164850 164850 164850 139305 139305 139305 156395 1563...

output:

72000
18 24 21 3 6 9 12 15 40 46 49 43 28 31 34 37 2 74 62 68 71 65 53 56 59 27 96 84 90 93 87 99 78 81 52 118 106 112 115 109 124 121 103 77 140 128 134 137 131 146 143 149 102 162 174 156 159 153 168 165 171 127 184 199 196 178 181 190 187 193 152 206 221 218 203 212 209 215 224 177 228 243 240 23...

result:

ok n=200000

Test #84:

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

input:

200000 10
143938 143938 143938 45140 45140 45140 21305 21305 21305 162598 162598 162598 37079 37079 37079 67315 67315 67315 96866 96866 96866 69128 69128 69128 -1 143938 143938 143938 143938 45140 45140 45140 45140 21305 21305 21305 21305 162598 162598 162598 162598 37079 37079 37079 37079 67315 673...

output:

50005
12 3 21 24 18 6 15 9 41 29 53 49 33 45 37 23 74 59 84 64 79 69 52 22 109 91 97 115 103 83 144 123 130 137 114 82 153 161 169 143 113 179 188 168 142 112 199 187 167 209 224 218 221 215 203 212 206 198 237 249 253 245 229 241 233 223 269 284 279 259 274 264 252 303 315 291 309 297 283 251 337 3...

result:

ok n=200000

Test #85:

score: 0
Accepted
time: 68ms
memory: 19444kb

input:

200000 10
98605 98605 44039 44039 188423 188423 194479 194479 68403 68403 40739 40739 101229 101229 6831 6831 75782 75782 -1 44039 44039 188423 188423 194479 194479 68403 68403 40739 40739 101229 101229 6831 6831 75782 75782 168720 168720 -1 188423 188423 194479 194479 68403 68403 40739 40739 101229...

output:

100003
8 6 14 2 18 10 4 12 16 25 23 37 31 35 27 21 29 33 1 42 40 54 56 48 52 44 46 50 59 71 73 65 69 61 63 75 67 39 88 94 90 82 86 78 80 92 84 105 111 107 99 103 113 97 109 101 77 122 128 124 132 116 120 130 126 118 151 139 145 141 149 137 147 143 135 115 168 170 156 162 158 166 154 164 160 185 187 ...

result:

ok n=200000

Test #86:

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

input:

200000 10
3239 3239 121254 121254 149416 149416 193649 193649 14373 14373 181301 181301 179664 179664 104580 104580 165243 165243 -1 3239 3239 3239 121254 121254 121254 149416 149416 149416 193649 193649 193649 14373 14373 14373 181301 181301 181301 179664 179664 179664 104580 104580 104580 -1 3239 ...

output:

53895
8 12 14 18 6 4 16 10 2 31 37 40 28 25 43 34 22 17 60 68 72 56 52 64 48 42 93 103 88 83 98 78 71 128 122 116 134 110 102 70 163 156 149 142 133 101 188 180 172 162 132 207 198 187 161 218 206 186 160 225 229 231 237 235 223 221 233 227 217 247 253 256 262 244 241 259 250 275 283 287 271 267 291...

result:

ok n=200000

Test #87:

score: 0
Accepted
time: 72ms
memory: 18996kb

input:

200000 10
148948 83619 9170 140556 55654 163243 171444 79532 29657 21181 -1 83619 9170 140556 55654 163243 171444 79532 29657 21181 183375 -1 9170 140556 55654 163243 171444 79532 29657 21181 183375 125758 -1 140556 55654 163243 171444 79532 29657 21181 183375 125758 65546 -1 55654 163243 171444 795...

output:

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

result:

ok n=200000

Test #88:

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

input:

200000 10
152215 19168 95979 92517 157003 165094 186258 93807 10169 24633 -1 152215 152215 19168 19168 95979 95979 92517 92517 157003 157003 165094 165094 186258 186258 93807 93807 10169 10169 -1 152215 152215 152215 19168 19168 19168 95979 95979 95979 92517 92517 92517 157003 157003 157003 165094 1...

output:

60014
7 6 5 1 3 8 4 10 2 9 25 23 21 13 17 27 19 15 29 51 48 45 33 39 54 42 36 28 83 79 75 59 67 71 63 53 114 109 89 99 104 94 82 145 121 133 139 127 113 81 153 167 174 160 144 112 183 199 191 173 143 209 218 198 172 229 217 197 171 236 235 234 232 237 233 240 239 231 238 253 251 249 245 255 247 259 ...

result:

ok n=200000

Test #89:

score: 0
Accepted
time: 84ms
memory: 20576kb

input:

200000 10
129231 162901 12430 32603 138030 186832 166799 180101 71886 73426 169232 -1 162901 12430 32603 138030 186832 166799 180101 71886 73426 169232 148402 -1 12430 32603 138030 186832 166799 180101 71886 73426 169232 148402 95973 -1 32603 138030 186832 166799 180101 71886 73426 169232 148402 959...

output:

166668
6 8 11 7 2 5 1 10 9 4 17 19 22 18 13 23 16 21 20 15 28 30 33 29 34 27 35 32 31 26 39 41 44 40 45 38 47 46 43 42 50 52 55 51 56 49 58 59 57 54 61 63 66 62 67 69 70 68 65 64 74 77 73 78 80 81 83 79 76 75 85 88 89 95 91 92 94 90 87 86 99 100 106 102 103 105 101 98 97 104 110 119 111 117 113 114 ...

result:

ok n=200000

Test #90:

score: 0
Accepted
time: 57ms
memory: 20620kb

input:

200000 10
2782 44378 18596 25741 131186 167141 45589 77077 43752 191457 95430 -1 2782 44378 18596 25741 131186 167141 45589 77077 43752 191457 -1 2782 2782 44378 44378 18596 18596 25741 25741 131186 131186 167141 167141 45589 45589 77077 77077 43752 43752 -1 2782 2782 2782 44378 44378 44378 18596 18...

output:

65310
10 6 5 11 8 7 2 9 4 3 22 18 17 20 19 14 21 16 15 13 35 33 39 37 27 41 31 29 25 60 57 66 63 48 54 51 45 40 91 87 95 75 83 79 71 65 126 121 106 116 111 101 94 157 139 151 145 133 125 93 172 186 179 165 156 124 203 211 195 185 155 230 221 210 184 241 229 209 183 251 253 247 246 252 249 248 243 25...

result:

ok n=200000

Test #91:

score: 0
Accepted
time: 81ms
memory: 18800kb

input:

200000 10
103530 148697 101786 183585 48819 56209 95827 143032 4419 179093 68642 170787 -1 148697 101786 183585 48819 56209 95827 143032 4419 179093 68642 170787 48035 -1 101786 183585 48819 56209 95827 143032 4419 179093 68642 170787 48035 80590 -1 183585 48819 56209 95827 143032 4419 179093 68642 ...

output:

153848
4 10 12 2 8 1 3 7 11 6 16 22 24 14 20 15 19 23 18 17 28 34 36 32 27 31 38 35 30 29 40 46 48 44 43 50 47 51 42 41 58 60 56 55 62 59 63 54 64 53 70 72 68 77 67 74 71 75 66 76 82 84 80 89 79 86 83 87 88 85 94 96 103 92 101 98 95 99 100 97 106 108 115 116 113 110 107 111 112 109 118 120 127 128 1...

result:

ok n=200000

Test #92:

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

input:

200000 10
30555 167760 196136 150721 4402 54656 190961 84938 4747 124498 101786 12445 -1 30555 167760 196136 150721 4402 54656 190961 84938 4747 124498 101786 -1 30555 167760 196136 150721 4402 54656 190961 84938 4747 124498 -1 30555 30555 167760 167760 196136 196136 150721 150721 4402 4402 54656 54...

output:

69825
3 7 2 4 10 11 8 6 1 12 16 20 15 17 23 24 21 19 14 22 28 32 27 29 35 33 31 26 34 30 42 50 40 44 52 48 38 54 46 64 76 61 67 79 73 58 70 53 92 108 88 96 104 84 100 78 124 119 129 139 114 134 107 158 152 164 146 170 138 106 192 185 199 178 169 137 224 216 208 198 168 243 234 223 197 254 242 222 19...

result:

ok n=200000

Test #93:

score: 0
Accepted
time: 84ms
memory: 20208kb

input:

200000 10
114034 152033 138126 9831 91205 84298 154358 70981 189838 124417 19762 31478 141455 -1 152033 138126 9831 91205 84298 154358 70981 189838 124417 19762 31478 141455 166519 -1 138126 9831 91205 84298 154358 70981 189838 124417 19762 31478 141455 166519 4936 -1 9831 91205 84298 154358 70981 1...

output:

142860
9 7 2 13 3 10 1 5 6 8 22 27 20 15 26 16 23 18 19 21 35 40 33 39 29 36 31 32 34 38 48 53 55 46 52 49 44 45 47 51 61 66 68 59 65 62 57 69 58 60 74 79 81 83 72 78 75 82 71 73 87 92 94 96 85 91 88 95 86 97 100 105 107 109 111 104 101 108 99 110 113 118 120 122 124 117 114 125 121 123 131 139 133 ...

result:

ok n=200000

Test #94:

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

input:

200000 10
71295 81136 109864 116002 78986 47559 33091 20142 60862 69006 143327 34002 18567 -1 71295 81136 109864 116002 78986 47559 33091 20142 60862 69006 143327 34002 -1 71295 81136 109864 116002 78986 47559 33091 20142 60862 69006 143327 -1 71295 81136 109864 116002 78986 47559 33091 20142 60862 ...

output:

73633
11 4 3 2 5 1 10 9 6 12 25 18 17 16 19 15 24 23 20 26 38 31 30 29 32 28 37 36 33 34 43 42 41 44 40 49 48 45 46 47 58 56 54 60 52 68 62 64 66 81 78 75 84 72 87 90 93 67 110 106 102 114 98 118 122 92 143 138 133 148 128 153 121 178 172 166 184 160 152 120 213 206 199 192 183 151 238 230 222 212 1...

result:

ok n=200000

Test #95:

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

input:

200000 20
172857 172857 172857 172857 172857 172857 172857 172857 172857 172857 172857 172857 172857 172857 20483 20483 20483 20483 20483 20483 20483 20483 20483 20483 20483 20483 20483 20483 196406 196406 196406 196406 196406 196406 196406 196406 196406 196406 196406 196406 196406 196406 197811 197...

output:

21827
56 42 14 84 98 70 28 141 127 169 197 183 155 113 13 226 212 254 282 296 268 240 112 12 311 339 367 381 353 395 325 211 111 11 424 452 466 438 480 410 494 310 210 110 10 593 509 537 551 523 565 579 409 309 209 109 9 692 678 622 636 608 650 664 508 408 308 208 777 763 707 791 721 735 749 607 507...

result:

ok n=200000

Test #96:

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

input:

200000 20
104146 104146 104146 104146 104146 104146 104146 104146 104146 104146 104146 104146 104146 104146 107109 107109 107109 107109 107109 107109 107109 107109 107109 107109 107109 107109 107109 107109 71567 71567 71567 71567 71567 71567 71567 71567 71567 71567 71567 71567 71567 71567 48837 4883...

output:

22861
70 98 28 14 84 42 56 174 129 114 189 144 159 97 270 222 206 238 254 188 96 305 288 322 339 269 187 95 376 358 394 338 268 186 94 433 414 393 337 267 185 93 454 432 392 336 266 184 92 511 553 539 469 525 483 497 453 614 644 569 629 584 599 552 452 709 661 725 677 693 643 551 451 794 743 760 777...

result:

ok n=200000

Test #97:

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

input:

200000 20
139474 139474 139474 139474 139474 139474 139474 139474 139474 139474 139474 139474 139474 12165 12165 12165 12165 12165 12165 12165 12165 12165 12165 12165 12165 12165 66593 66593 66593 66593 66593 66593 66593 66593 66593 66593 66593 66593 66593 52849 52849 52849 52849 52849 52849 52849 5...

output:

22098
91 78 13 39 52 104 65 26 183 170 209 131 144 196 157 118 12 275 262 301 223 236 288 249 314 117 11 367 354 419 393 328 380 341 406 222 116 10 459 446 511 524 485 472 433 498 327 221 115 9 551 538 629 603 616 577 564 590 432 326 220 114 8 643 721 734 695 708 669 656 682 537 431 325 839 813 826 ...

result:

ok n=200000

Test #98:

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

input:

200000 20
144112 144112 144112 144112 144112 144112 144112 144112 144112 144112 144112 144112 144112 158569 158569 158569 158569 158569 158569 158569 158569 158569 158569 158569 158569 158569 75026 75026 75026 75026 75026 75026 75026 75026 75026 75026 75026 75026 75026 174928 174928 174928 174928 17...

output:

22508
78 65 52 26 13 39 91 104 189 175 161 133 119 147 203 103 294 279 264 234 219 249 202 102 375 359 327 311 343 293 201 101 444 410 393 427 374 292 200 100 481 463 499 443 373 291 199 99 538 519 498 442 372 290 198 98 559 537 497 441 625 612 599 573 664 586 638 651 558 735 721 707 679 693 749 763...

result:

ok n=200000

Test #99:

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

input:

200000 20
78685 78685 78685 78685 78685 78685 78685 78685 78685 78685 78685 78685 177904 177904 177904 177904 177904 177904 177904 177904 177904 177904 177904 177904 49542 49542 49542 49542 49542 49542 49542 49542 49542 49542 49542 49542 143975 143975 143975 143975 143975 143975 143975 143975 143975...

output:

22754
72 24 48 108 96 12 36 60 84 169 121 145 205 193 217 133 157 181 11 266 242 302 290 314 230 254 326 278 120 10 363 435 339 399 387 411 351 423 375 229 119 9 460 544 532 496 484 508 448 520 472 338 228 118 8 557 641 629 593 581 605 617 653 569 447 337 227 117 7 738 726 762 690 678 702 714 750 66...

result:

ok n=200000

Test #100:

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

input:

200000 20
199301 199301 199301 199301 199301 199301 199301 199301 199301 199301 199301 199301 65911 65911 65911 65911 65911 65911 65911 65911 65911 65911 65911 65911 47988 47988 47988 47988 47988 47988 47988 47988 47988 47988 47988 47988 199757 199757 199757 199757 199757 199757 199757 199757 199757...

output:

22431
48 12 108 84 96 60 72 24 36 161 122 200 213 174 187 135 148 107 270 228 312 284 298 242 256 212 106 373 328 388 403 343 358 311 211 105 468 420 484 436 452 402 310 210 104 553 502 519 536 483 401 309 209 103 572 590 608 552 482 400 308 208 628 647 607 551 481 668 646 606 550 480 705 765 741 75...

result:

ok n=200000

Test #101:

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

input:

200000 20
34503 34503 34503 34503 34503 34503 34503 34503 34503 34503 34503 70194 70194 70194 70194 70194 70194 70194 70194 70194 70194 70194 115945 115945 115945 115945 115945 115945 115945 115945 115945 115945 115945 40507 40507 40507 40507 40507 40507 40507 40507 40507 40507 40507 26924 26924 269...

output:

23787
33 66 77 110 22 99 88 44 11 55 133 166 177 210 122 221 199 188 144 155 10 332 233 266 277 310 321 299 288 244 255 121 9 432 366 377 410 421 443 399 388 344 355 232 120 8 532 466 477 510 521 543 499 488 554 455 343 231 119 7 632 566 577 610 621 643 599 588 654 665 454 342 230 118 732 677 710 72...

result:

ok n=200000

Test #102:

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

input:

200000 20
114580 114580 114580 114580 114580 114580 114580 114580 114580 114580 114580 139454 139454 139454 139454 139454 139454 139454 139454 139454 139454 139454 122862 122862 122862 122862 122862 122862 122862 122862 122862 122862 122862 38300 38300 38300 38300 38300 38300 38300 38300 38300 38300...

output:

22822
55 88 22 77 110 99 33 11 44 66 171 207 135 195 219 147 123 159 183 109 285 324 246 311 259 233 272 298 218 108 395 353 423 367 339 381 409 323 217 107 499 454 469 439 484 514 422 322 216 106 595 547 563 531 579 513 421 321 215 105 630 647 613 664 594 512 420 320 701 719 683 663 593 511 758 739...

result:

ok n=200000

Test #103:

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

input:

200000 20
26513 26513 26513 26513 26513 26513 26513 26513 26513 26513 13667 13667 13667 13667 13667 13667 13667 13667 13667 13667 108121 108121 108121 108121 108121 108121 108121 108121 108121 108121 49999 49999 49999 49999 49999 49999 49999 49999 49999 49999 62180 62180 62180 62180 62180 62180 6218...

output:

25228
100 80 110 30 70 50 90 40 10 20 60 201 221 181 211 131 171 151 191 141 121 161 9 302 322 282 312 232 272 252 292 332 242 262 120 8 403 443 423 383 413 373 353 393 433 343 363 231 119 7 504 544 524 484 514 554 474 454 494 534 464 342 230 118 6 605 645 625 585 615 655 575 595 665 635 565 453 341...

result:

ok n=200000

Test #104:

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

input:

200000 20
99877 99877 99877 99877 99877 99877 99877 99877 99877 99877 69930 69930 69930 69930 69930 69930 69930 69930 69930 69930 41311 41311 41311 41311 41311 41311 41311 41311 41311 41311 37280 37280 37280 37280 37280 37280 37280 37280 37280 37280 35073 35073 35073 35073 35073 35073 35073 35073 35...

output:

23348
110 90 100 60 10 80 20 30 40 50 70 210 221 177 122 199 133 144 155 166 188 109 330 294 234 318 246 258 270 282 306 220 108 409 344 435 357 370 383 396 422 329 219 107 520 450 464 478 492 506 534 434 328 218 106 625 550 565 580 595 610 533 433 327 217 105 642 658 674 690 706 624 532 432 724 741...

result:

ok n=200000

Test #105:

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

input:

200000 20
28023 28023 28023 28023 28023 28023 28023 28023 28023 51628 51628 51628 51628 51628 51628 51628 51628 51628 91330 91330 91330 91330 91330 91330 91330 91330 91330 7412 7412 7412 7412 7412 7412 7412 7412 7412 53747 53747 53747 53747 53747 53747 53747 53747 53747 51358 51358 51358 51358 51358...

output:

27067
99 81 72 27 108 45 18 54 9 63 90 36 199 181 172 127 208 145 118 154 163 190 136 217 8 299 281 272 227 308 245 254 263 326 290 236 317 117 7 399 435 381 372 408 345 354 363 426 390 336 417 226 116 6 544 499 535 481 472 508 445 454 463 526 490 517 335 225 115 5 644 599 635 581 572 653 608 554 56...

result:

ok n=200000

Test #106:

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

input:

200000 20
36748 36748 36748 36748 36748 36748 36748 36748 36748 68337 68337 68337 68337 68337 68337 68337 68337 68337 87837 87837 87837 87837 87837 87837 87837 87837 87837 82749 82749 82749 82749 82749 82749 82749 82749 82749 132044 132044 132044 132044 132044 132044 132044 132044 132044 2141 2141 2...

output:

23613
90 81 108 63 45 72 27 36 18 99 9 54 209 199 179 159 189 139 149 129 219 119 169 107 330 319 297 275 308 253 264 242 231 286 218 106 439 415 391 427 367 379 355 343 403 329 217 105 531 505 544 479 492 466 453 518 438 328 216 104 643 615 587 601 573 559 629 543 437 327 215 719 689 704 674 659 73...

result:

ok n=200000

Test #107:

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

input:

200000 20
1972 1972 1972 1972 1972 1972 1972 1972 186691 186691 186691 186691 186691 186691 186691 186691 11404 11404 11404 11404 11404 11404 11404 11404 2636 2636 2636 2636 2636 2636 2636 2636 199735 199735 199735 199735 199735 199735 199735 199735 87165 87165 87165 87165 87165 87165 87165 87165 10...

output:

29528
40 96 16 64 56 48 104 80 72 24 32 8 88 137 193 113 161 153 145 201 177 209 169 121 129 185 7 234 290 314 258 250 242 298 274 306 266 218 226 282 112 6 331 387 419 411 355 347 339 395 371 403 363 323 379 217 111 5 428 484 516 508 524 452 444 436 492 468 500 460 476 322 216 110 629 581 613 605 6...

result:

ok n=200000

Test #108:

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

input:

200000 20
195975 195975 195975 195975 195975 195975 195975 195975 69079 69079 69079 69079 69079 69079 69079 69079 13304 13304 13304 13304 13304 13304 13304 13304 140099 140099 140099 140099 140099 140099 140099 140099 25029 25029 25029 25029 25029 25029 25029 25029 175618 175618 175618 175618 175618...

output:

24086
8 48 32 104 88 56 16 96 80 64 72 40 24 114 159 141 204 168 123 213 195 177 186 150 132 103 224 274 254 324 284 234 314 294 304 264 244 212 102 336 391 369 402 347 435 413 424 380 358 323 211 101 448 508 484 520 460 532 544 496 472 434 322 210 100 558 623 597 636 571 649 610 584 543 433 321 664...

result:

ok n=200000

Test #109:

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

input:

200000 30
164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 164024 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80978 80...

output:

14716
24 72 168 144 120 48 96 217 313 289 265 193 241 337 23 362 458 434 410 506 386 482 192 22 675 603 579 555 651 531 627 361 191 21 820 748 724 700 844 796 772 530 360 190 20 965 893 869 989 941 917 1013 699 529 359 189 19 1182 1110 1038 1134 1086 1062 1158 868 698 528 358 188 18 1327 1255 1351 1...

result:

ok n=200000

Test #110:

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

input:

200000 30
187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 187956 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28075 28...

output:

16335
168 24 96 72 144 120 48 194 269 244 319 294 219 167 346 424 398 450 372 318 166 478 559 532 505 449 317 165 588 644 616 558 448 316 164 674 703 643 557 447 315 163 734 702 642 556 446 314 162 879 807 783 903 855 831 759 733 1054 979 954 1029 1004 929 902 732 1133 1107 1185 1159 1081 1053 901 7...

result:

ok n=200000

Test #111:

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

input:

200000 30
144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 144887 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 13658 136...

output:

14376
23 92 161 184 115 138 69 46 369 254 323 346 277 300 231 208 22 531 416 485 508 439 462 393 554 207 21 693 578 647 670 601 624 739 716 392 206 20 855 809 832 763 786 901 878 924 577 391 205 19 1017 1109 971 994 948 1063 1040 1086 762 576 390 204 18 1179 1271 1133 1156 1294 1225 1202 1248 947 76...

result:

ok n=200000

Test #112:

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

input:

200000 30
74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 74586 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 24379 141158 141158 ...

output:

15877
92 69 161 115 23 138 46 184 281 257 353 305 209 329 233 183 454 429 479 379 504 404 352 182 609 583 635 531 557 503 351 181 744 717 663 690 634 502 350 180 829 773 801 743 633 501 349 179 859 888 828 742 632 500 348 178 919 887 827 741 631 499 347 177 989 966 1058 1012 1104 1035 943 1081 918 1...

result:

ok n=200000

Test #113:

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

input:

200000 30
15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 15689 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 92417 75258 75258 75258 75258 75...

output:

14219
132 88 176 44 66 154 110 198 22 309 265 353 221 243 331 287 375 397 21 486 442 530 596 420 508 464 552 574 220 20 663 619 707 795 773 685 641 729 751 419 219 19 994 840 884 972 950 862 818 906 928 618 418 218 18 1171 1193 1017 1061 1149 1127 1039 1083 1105 817 617 417 217 17 1348 1370 1392 123...

result:

ok n=200000

Test #114:

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

input:

200000 30
125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 125236 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169117 169...

output:

15196
132 110 44 176 198 22 88 154 66 337 314 245 383 222 291 360 268 197 528 504 432 408 480 552 456 382 196 703 678 603 578 653 628 551 381 195 834 756 730 808 782 702 550 380 194 889 862 943 916 833 701 549 379 193 1000 972 1028 942 832 700 548 378 192 1087 1058 1027 941 831 699 547 377 191 1118 ...

result:

ok n=200000

Test #115:

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

input:

200000 30
31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 31109 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 120756 171245 171245 171...

output:

14220
105 210 63 126 42 84 168 189 21 147 295 400 253 316 232 274 358 379 421 337 20 485 590 443 506 632 464 548 569 611 527 231 19 675 780 696 843 822 654 738 759 801 717 442 230 18 865 970 886 1033 1012 1054 928 949 991 907 653 441 229 17 1160 1076 1223 1265 1202 1244 1118 1139 1181 1097 864 652 4...

result:

ok n=200000

Test #116:

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

input:

200000 30
22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 22337 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 116496 148038 148038 148...

output:

14898
126 63 189 42 84 210 147 168 21 105 343 277 409 255 299 365 387 233 321 209 548 479 456 502 571 594 433 525 408 208 739 667 643 691 763 619 715 593 407 207 914 839 814 864 789 889 762 592 406 206 993 967 1019 941 1045 913 761 591 405 205 1127 1100 1154 1073 1044 912 760 590 404 204 1239 1211 1...

result:

ok n=200000

Test #117:

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

input:

200000 30
158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 158003 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 3742 174291 174291 174291 174291 174291 174291 174291 1...

output:

14330
80 60 20 200 120 140 220 160 180 100 40 281 261 441 401 321 341 421 361 381 301 241 19 482 462 642 602 662 522 542 622 562 582 502 240 18 683 843 803 863 723 743 883 823 763 783 703 461 239 17 1104 1044 1004 1064 924 944 1084 1024 964 984 904 682 460 238 16 1305 1245 1205 1325 1265 1125 1145 1...

result:

ok n=200000

Test #118:

score: 0
Accepted
time: 30ms
memory: 20760kb

input:

200000 30
82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 82358 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 111100 113120 113120 113120 113120 11...

output:

14719
200 220 60 100 40 160 20 120 140 180 80 431 284 326 263 389 242 347 368 410 305 219 498 542 476 608 454 564 586 630 520 430 218 700 746 677 815 654 769 792 723 629 429 217 888 936 864 840 960 984 912 814 628 428 216 1060 1110 1035 1010 1135 1085 983 813 627 427 215 1214 1266 1188 1162 1240 113...

result:

ok n=200000

Test #119:

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

input:

200000 30
53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 53417 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 145954 183475 183475 183475 183475 183475 183475 1...

output:

14568
190 57 76 38 133 171 95 228 152 19 209 114 400 267 457 286 248 343 381 305 438 362 419 324 18 686 610 477 667 496 553 591 515 648 572 629 534 247 17 915 896 820 877 706 763 801 725 858 782 839 744 476 246 16 1125 1106 1030 1087 973 1011 1144 935 1068 992 1049 954 705 475 245 15 1335 1316 1240 ...

result:

ok n=200000

Test #120:

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

input:

200000 30
94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 94589 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 196898 107342 107342 107342 107342 107342 107342 1...

output:

14723
38 228 95 133 76 190 209 57 19 171 152 114 269 329 369 309 429 449 289 249 409 389 349 227 492 555 597 534 660 513 471 639 618 576 448 226 705 771 815 749 727 683 859 837 793 659 447 225 906 975 1021 952 929 883 1044 998 858 658 446 224 1093 1165 1213 1141 1117 1069 1189 1043 857 657 445 223 1...

result:

ok n=200000

Test #121:

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

input:

200000 30
100352 100352 100352 100352 100352 100352 100352 100352 100352 100352 100352 100352 100352 100352 100352 100352 100352 100352 141161 141161 141161 141161 141161 141161 141161 141161 141161 141161 141161 141161 141161 141161 141161 141161 141161 141161 164828 164828 164828 164828 164828 164...

output:

14908
144 54 126 36 18 162 90 72 108 234 198 216 180 361 271 343 253 469 379 307 289 325 451 415 433 397 17 578 488 560 686 596 524 506 542 668 632 650 614 704 252 16 795 777 903 813 741 939 723 759 885 849 867 831 921 487 251 15 1012 1174 994 1120 1030 958 1156 976 1102 1066 1084 1048 1138 722 486 ...

result:

ok n=200000

Test #122:

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

input:

200000 30
69511 69511 69511 69511 69511 69511 69511 69511 69511 69511 69511 69511 69511 69511 69511 69511 69511 69511 198158 198158 198158 198158 198158 198158 198158 198158 198158 198158 198158 198158 198158 198158 198158 198158 198158 198158 18206 18206 18206 18206 18206 18206 18206 18206 18206 18...

output:

14804
36 162 72 234 144 198 108 18 126 180 54 216 90 273 406 311 387 444 349 254 368 425 292 463 330 233 504 644 544 624 684 584 484 604 664 524 564 462 232 727 874 769 853 811 706 832 895 748 790 683 461 231 940 1094 984 1072 1028 918 1050 962 1006 894 682 460 230 1141 1187 1279 1233 1118 1256 1164...

result:

ok n=200000

Test #123:

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

input:

200000 40
27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 27282 17945 17945 17945 17945 17945 17945 17945 17945 17945 17945 17945 17945 17945 17945 17...

output:

11510
204 136 170 102 238 34 68 409 477 341 375 307 443 273 33 614 682 546 580 716 512 648 272 32 819 887 955 751 785 921 853 511 271 31 1024 1092 1194 1160 990 1126 1058 750 510 270 30 1229 1297 1399 1365 1331 1433 1263 989 749 509 269 29 1672 1502 1604 1570 1536 1638 1468 1228 988 748 508 268 28 1...

result:

ok n=200000

Test #124:

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

input:

200000 40
156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 156118 31094 31094 31094 31094 31094 31094 31094 31094 3109...

output:

12754
170 34 136 204 102 238 68 414 274 379 449 344 309 237 630 486 594 558 522 448 236 668 779 742 705 629 447 235 818 894 856 778 628 446 234 934 973 893 777 627 445 233 1014 972 892 776 626 444 232 1151 1117 1185 1083 1253 1219 1049 1013 1394 1359 1429 1324 1464 1289 1252 1012 1609 1573 1645 1537...

result:

ok n=200000

Test #125:

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

input:

200000 40
2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 2041 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051 44051...

output:

11043
198 165 231 264 66 132 99 33 430 397 463 529 496 298 364 331 32 662 629 695 794 761 728 596 563 297 31 1059 894 861 927 1026 993 960 828 562 296 30 1291 1126 1093 1159 1258 1324 1225 1192 827 561 295 29 1523 1358 1391 1490 1556 1589 1457 1424 1092 826 560 294 28 1755 1854 1623 1722 1788 1821 1...

result:

ok n=200000

Test #126:

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

input:

200000 40
167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 167449 192901 192901 192901 192901 192901 192901 192901 192901 192...

output:

12275
66 33 132 198 264 165 231 99 333 299 401 469 435 503 367 263 574 539 644 714 679 609 502 262 787 751 859 895 823 713 501 261 970 933 1044 1007 894 712 500 260 1121 1083 1159 1043 893 711 499 259 1238 1199 1158 1042 892 710 498 258 1279 1237 1157 1041 891 709 497 257 1313 1379 1445 1511 1412 14...

result:

ok n=200000

Test #127:

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

input:

200000 40
96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 96604 47100 47100 47100 47100 47100 47100 47100 47100 47100 47100 47100 47100 47100 47100 47100 47100 47...

output:

10740
192 96 256 32 160 128 64 224 288 449 353 513 577 417 385 321 481 545 31 866 706 610 770 834 674 642 738 802 320 30 1123 963 1155 1027 1091 931 899 995 1059 609 319 29 1380 1220 1412 1284 1348 1188 1252 1316 1444 898 608 318 28 1637 1733 1477 1669 1541 1605 1509 1573 1701 1187 897 607 317 27 18...

result:

ok n=200000

Test #128:

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

input:

200000 40
107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 107198 34343 34343 34343 34343 34343 34343 34343 34343 34343 34343 34343 ...

output:

11984
256 128 224 288 160 32 192 64 96 553 421 520 454 322 487 355 388 287 690 792 724 588 758 622 656 552 286 933 968 828 1003 863 898 791 551 285 1148 1184 1040 1076 1112 1002 790 550 284 1333 1222 1259 1296 1183 1001 789 549 283 1372 1410 1448 1332 1182 1000 788 548 282 1488 1527 1447 1331 1181 9...

result:

ok n=200000

Test #129:

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

input:

200000 40
122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 122034 127807 127807 127807 127807 127807 127807 127807 127807 127807 127807 127...

output:

10547
248 310 124 186 62 31 217 155 279 93 528 590 404 621 466 342 497 435 559 373 30 808 870 932 684 901 746 777 715 839 653 341 29 1088 1150 1212 964 1181 1026 1057 995 1243 1119 652 340 28 1368 1430 1492 1461 1306 1337 1275 1523 1399 1554 963 651 339 27 1648 1710 1772 1741 1586 1617 1803 1679 183...

result:

ok n=200000

Test #130:

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

input:

200000 40
77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 77436 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866 4866...

output:

11607
217 124 310 186 279 248 31 93 155 62 535 439 503 599 567 343 407 471 375 309 831 732 798 864 633 699 765 666 598 308 1103 1001 1069 899 967 1035 933 863 597 307 1244 1314 1139 1209 1279 1174 1102 862 596 306 1459 1351 1423 1495 1387 1313 1101 861 595 305 1644 1533 1607 1570 1494 1312 1100 860 ...

result:

ok n=200000

Test #131:

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

input:

200000 40
51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 51080 62896 62896 62896 62896 62896 62896 62896 62896 62896 62896 62896 62896 62896 62896 62896 62896 62896 62896 62...

output:

10437
330 210 150 90 300 60 240 30 120 180 270 631 511 451 661 391 601 361 541 421 481 571 29 932 812 752 962 692 902 842 722 782 872 992 360 28 1233 1113 1053 1263 1323 1203 1143 1023 1083 1173 1293 691 359 27 1534 1654 1414 1354 1564 1624 1504 1444 1384 1474 1594 1022 690 358 26 1835 1955 1715 198...

result:

ok n=200000

Test #132:

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

input:

200000 40
67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 67257 132603 132603 132603 132603 132603 132603 132603 132603 132603 132603 132603 132603 132603 132603 132603 13260...

output:

11232
60 240 150 90 120 180 330 210 30 300 270 393 579 486 424 455 517 548 362 641 610 329 706 898 802 738 770 834 866 674 930 640 328 997 1195 1096 1030 1063 1129 1162 964 929 639 327 1264 1366 1298 1332 1400 1434 1230 1194 928 638 326 1505 1610 1540 1575 1645 1470 1433 1193 927 637 325 1718 1826 1...

result:

ok n=200000

Test #133:

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

input:

200000 40
69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 69008 148173 148173 148173 148173 148173 148173 148173 148173 148173 148173 148173 148173 148173 148173 148173 148173 1481...

output:

10404
203 58 174 261 290 116 319 232 29 87 348 145 697 523 378 494 581 610 436 639 552 407 668 465 28 1017 843 814 901 930 756 959 872 1046 727 988 785 377 27 1337 1163 1134 1221 1250 1076 1279 1192 1395 1366 1308 1105 726 376 26 1657 1483 1454 1541 1570 1599 1512 1715 1686 1628 1425 1744 1075 725 3...

result:

ok n=200000

Test #134:

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

input:

200000 40
53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 53059 103852 103852 103852 103852 103852 103852 103852 103852 103852 103852 103852 103852 103852 103852 103852 103852 1038...

output:

11033
116 261 203 174 232 348 145 58 29 87 319 290 469 619 559 529 589 499 409 379 439 679 649 347 804 959 897 866 928 835 742 711 773 990 678 346 1119 1279 1215 1183 1247 1151 1055 1023 1087 989 677 345 1412 1511 1478 1544 1445 1346 1313 1379 1278 988 676 344 1681 1783 1749 1715 1613 1579 1647 1543...

result:

ok n=200000

Test #135:

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

input:

200000 40
33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 33272 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 8854 88...

output:

10412
364 280 168 224 112 336 84 196 140 308 28 56 252 701 617 729 505 561 449 673 421 533 477 645 393 589 27 1038 954 1094 1066 842 898 786 1010 758 870 814 982 926 392 26 1375 1291 1431 1403 1179 1235 1123 1347 1207 1151 1319 1459 1263 757 391 25 1712 1628 1768 1740 1516 1572 1684 1544 1488 1656 1...

result:

ok n=200000

Test #136:

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

input:

200000 40
136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 136847 86948 86948 86948 86948 86948 86948 86948 86948 86948 86948 86948 86948 86948 86948 86948 8694...

output:

10889
336 280 252 28 56 140 168 364 84 308 112 224 196 713 655 626 394 423 510 539 452 684 481 597 568 363 1014 984 744 774 864 894 804 1044 834 954 924 712 362 1355 1324 1076 1107 1200 1231 1138 1169 1293 1262 1043 711 361 1644 1388 1420 1516 1548 1452 1484 1612 1580 1354 1042 710 360 1678 1711 181...

result:

ok n=200000

Test #137:

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

input:

200000 50
110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110703 110...

output:

9648
176 132 44 88 220 308 264 441 397 353 617 485 573 529 43 706 662 882 926 750 838 794 352 42 971 1235 1147 1191 1015 1103 1059 661 351 41 1500 1544 1412 1456 1280 1368 1324 970 660 350 40 1765 1809 1853 1677 1721 1633 1589 1279 969 659 349 39 2030 2074 2118 1942 1986 1898 2162 1588 1278 968 658 ...

result:

ok n=200000

Test #138:

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

input:

200000 50
88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 88740 164354 164354 164354 16435...

output:

10499
88 132 44 264 176 308 220 399 444 354 579 489 534 307 672 718 626 764 810 578 306 905 952 858 999 809 577 305 1096 1144 1048 998 808 576 304 1243 1194 1143 997 807 575 303 1294 1242 1142 996 806 574 302 1339 1383 1515 1427 1559 1471 1603 1293 1649 1694 1829 1739 1874 1784 1602 1292 1921 1967 2...

result:

ok n=200000

Test #139:

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

input:

200000 50
186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186867 186...

output:

9152
129 43 215 344 258 172 301 86 431 517 646 560 689 474 603 388 42 733 1034 819 948 862 991 776 905 387 41 1336 1121 1250 1164 1293 1078 1207 1379 732 386 40 1638 1423 1552 1466 1595 1724 1509 1681 1077 731 385 39 1940 1854 1768 1897 2069 2026 1811 1983 1422 1076 730 384 38 2242 2156 2199 2414 23...

result:

ok n=200000

Test #140:

score: 0
Accepted
time: 30ms
memory: 17876kb

input:

200000 50
117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117361 117...

output:

10124
258 43 344 172 86 129 301 215 609 389 521 433 477 653 565 343 924 699 834 744 789 879 652 342 971 1109 1017 1063 1155 923 651 341 1203 1344 1250 1297 1154 922 650 340 1393 1441 1489 1343 1153 921 649 339 1539 1588 1488 1342 1152 920 648 338 1639 1587 1487 1341 1151 919 647 337 1855 1941 1769 1...

result:

ok n=200000

Test #141:

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

input:

200000 50
144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144188 144...

output:

8802
168 336 42 126 294 84 378 210 252 505 673 463 631 757 421 715 547 589 41 842 1010 800 968 1136 1094 1052 884 926 420 40 1515 1179 1347 1305 1473 1431 1389 1221 1263 799 419 39 1852 1684 1642 1810 1768 1726 1894 1558 1600 1178 798 418 38 2189 2021 1979 2147 2105 2273 2063 2231 1937 1557 1177 797...

result:

ok n=200000

Test #142:

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

input:

200000 50
135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135277 135...

output:

9824
168 126 42 210 378 84 252 336 294 551 508 422 594 465 637 723 680 377 900 856 768 944 812 988 1032 722 376 1213 1168 1078 1258 1123 1303 1031 721 375 1488 1442 1350 1534 1396 1302 1030 720 374 1723 1676 1582 1629 1533 1301 1029 719 373 1868 1772 1820 1722 1532 1300 1028 718 372 1918 1967 1867 1...

result:

ok n=200000

Test #143:

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

input:

200000 50
118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 118497 174...

output:

8550
369 328 410 41 205 123 287 164 246 82 739 698 780 575 493 821 657 534 616 452 40 1232 1109 1068 1150 945 863 1191 1027 904 986 451 39 1602 1479 1438 1520 1315 1561 1397 1274 1643 1356 862 450 38 1972 1849 2054 1808 1890 1685 1931 1767 2013 1726 1273 861 449 37 2342 2219 2465 2424 2178 2260 2301...

result:

ok n=200000

Test #144:

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

input:

200000 50
81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 81362 166082 166082 166082 166082 166082 166082 16...

output:

9552
82 287 410 41 205 328 246 123 369 164 495 705 453 621 747 663 537 789 579 409 876 1091 833 1005 1134 1048 919 962 788 408 1223 1443 1179 1355 1399 1267 1311 1133 787 407 1534 1489 1669 1714 1579 1624 1442 1132 786 406 1807 1761 1945 1853 1899 1713 1441 1131 785 405 2040 1993 2087 2134 1944 1712...

result:

ok n=200000

Test #145:

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

input:

200000 50
51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 51720 150175 150175 150175 150175 150175 150175 150175 1...

output:

8376
360 160 80 400 280 440 320 240 40 200 120 761 561 481 801 681 881 841 721 641 601 521 39 1162 962 1322 1202 1082 1282 1242 1122 1042 1002 922 480 38 1563 1363 1723 1603 1483 1683 1643 1763 1523 1443 1403 921 479 37 1964 2124 2004 1884 2084 2044 2164 1924 1844 1804 2204 1362 920 478 36 2365 2645...

result:

ok n=200000

Test #146:

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

input:

200000 50
137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 137091 5626 5626 ...

output:

9343
400 240 160 40 280 360 120 200 440 80 320 851 687 605 482 728 810 564 646 523 769 439 1104 1020 894 1146 1230 978 1062 936 1188 850 438 1489 1403 1274 1532 1360 1446 1317 1575 1229 849 437 1840 1752 1620 1884 1708 1796 1664 1574 1228 848 436 2155 2065 1930 2020 2110 1975 1883 1573 1227 847 435 ...

result:

ok n=200000

Test #147:

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

input:

200000 50
19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 19087 126985 126985 126985 126985 126985 126985 126985 126985 ...

output:

8257
117 234 468 78 273 429 351 312 390 195 156 39 547 664 898 937 508 703 859 781 742 820 625 586 38 977 1094 1328 1367 1133 1289 1211 1172 1250 1055 1406 1016 507 37 1524 1758 1797 1875 1563 1719 1641 1602 1680 1485 1836 1446 976 506 36 1954 2188 2227 2305 1993 2344 2149 2071 2032 2110 1915 2266 1...

result:

ok n=200000

Test #148:

score: 0
Accepted
time: 30ms
memory: 21140kb

input:

200000 50
149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 149045 109522 109522 109...

output:

9056
273 351 429 39 234 195 390 78 468 312 117 156 749 829 909 509 709 669 869 549 789 589 629 467 1197 1279 951 1156 1115 1320 992 1238 1033 1074 908 466 1615 1699 1363 1573 1531 1405 1657 1447 1489 1319 907 465 2001 1743 1958 1915 1786 2044 1829 1872 1698 1318 906 464 2353 2089 2309 2265 2133 2177...

result:

ok n=200000

Test #149:

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

input:

200000 50
136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 136462 9379 9379 9379 9379 9379...

output:

8190
380 152 418 190 342 114 38 494 266 228 456 76 304 837 609 875 989 647 799 571 951 723 685 913 533 761 37 1294 1066 1332 1446 1104 1256 1028 1408 1180 1142 1370 1484 1218 532 36 1979 1751 1523 1789 1903 1561 1713 1865 1637 1599 1827 1941 1675 1027 531 35 2436 2208 2246 2360 2018 2170 2322 2094 2...

result:

ok n=200000

Test #150:

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

input:

200000 50
104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 104898 85190 85190 85190 85190 ...

output:

8847
304 380 342 266 190 418 456 38 76 152 228 494 114 807 885 846 768 690 924 963 534 573 651 729 612 493 1284 1364 1324 1244 1164 1404 1004 1044 1124 1204 1084 962 492 1733 1815 1774 1692 1610 1446 1487 1569 1651 1528 1403 961 491 2152 2194 2110 2026 1858 1900 1984 2068 1942 1814 1402 960 490 2539...

result:

ok n=200000

Test #151:

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

input:

200000 60
136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136301 136...

output:

8396
54 216 270 108 378 324 162 541 595 433 703 757 649 487 53 866 920 1136 1028 1082 974 812 432 52 1515 1191 1245 1461 1353 1407 1299 811 431 51 1840 1894 1570 1786 1678 1732 1624 1190 810 430 50 2165 2273 2219 2111 2003 2057 1949 1569 1189 809 429 49 2490 2652 2598 2544 2436 2328 2382 1948 1568 1...

result:

ok n=200000

Test #152:

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

input:

200000 60
17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17227 17...

output:

9052
378 162 324 108 270 216 54 544 709 489 654 599 434 377 878 822 990 934 766 708 376 1162 1105 1219 1048 989 707 375 1394 1336 1278 1218 988 706 374 1513 1454 1393 1217 987 705 373 1574 1512 1392 1216 986 704 372 1899 1683 1953 1845 1629 1791 1737 1573 2284 2064 2229 2009 2174 2119 1952 1572 2397...

result:

ok n=200000

Test #153:

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

input:

200000 60
66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66879 66...

output:

7913
318 159 212 265 371 424 53 106 690 849 531 584 637 743 796 478 52 1062 1221 903 956 1274 1009 1115 1168 477 51 1699 1434 1593 1328 1646 1381 1487 1540 902 476 50 2071 2124 1806 1965 2018 1753 1859 1912 1327 901 475 49 2443 2496 2549 2178 2337 2390 2231 2284 1752 1326 900 474 48 2974 2815 2868 2...

result:

ok n=200000

Test #154:

score: 0
Accepted
time: 28ms
memory: 19172kb

input:

200000 60
10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10743 10...

output:

8641
424 318 265 106 159 212 371 53 749 695 533 587 641 803 479 423 1134 1079 914 969 1024 859 802 422 1415 1247 1303 1359 1191 1133 801 421 1530 1587 1644 1473 1414 1132 800 420 1761 1819 1703 1643 1413 1131 799 419 1938 1879 1818 1642 1412 1130 798 418 1999 1937 1817 1641 1411 1129 797 417 2371 22...

result:

ok n=200000

Test #155:

score: 0
Accepted
time: 28ms
memory: 20688kb

input:

200000 60
174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174997 174...

output:

7560
364 416 52 104 468 208 312 156 260 781 833 521 885 625 729 573 677 937 51 1198 1250 1406 1302 1042 1146 990 1094 1354 520 50 1615 1667 1823 1719 1459 1563 1875 1511 1771 989 519 49 2032 2084 2240 2136 1980 2292 2344 1928 2188 1458 988 518 48 2449 2501 2657 2553 2813 2397 2709 2761 2605 1927 145...

result:

ok n=200000

Test #156:

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

input:

200000 60
100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100892 100...

output:

8364
416 208 260 52 104 364 156 468 312 893 681 734 522 575 840 628 787 467 1110 1164 948 1002 1272 1056 1218 892 466 1493 1548 1328 1383 1438 1603 1271 891 465 1828 1884 1660 1716 1772 1602 1270 890 464 2113 1942 1999 2056 1883 1601 1269 889 463 2172 2230 2288 2112 1882 1600 1268 888 462 2348 2407 ...

result:

ok n=200000

Test #157:

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

input:

200000 60
94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94107 94...

output:

7292
204 306 357 510 153 408 51 255 102 459 1021 664 766 817 970 613 868 715 562 919 50 1481 1124 1226 1277 1430 1073 1328 1175 1379 1532 561 49 1941 1584 1686 1737 1890 1788 2043 1635 1839 1992 1072 560 48 2401 2146 2197 2350 2248 2503 2095 2554 2299 2452 1583 1071 559 47 2861 2606 2657 2810 2708 2...

result:

ok n=200000

Test #158:

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

input:

200000 60
43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43303 43...

output:

8134
408 306 153 357 510 51 255 102 204 459 927 823 667 875 563 771 615 719 979 509 1404 1298 1139 1351 1033 1245 1086 1192 978 508 1729 1567 1783 1459 1675 1513 1621 1403 977 507 2114 1949 1839 2059 1894 2004 1782 1402 976 506 2283 2171 2395 2227 2339 2113 1781 1401 975 505 2567 2453 2510 2624 2394...

result:

ok n=200000

Test #159:

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

input:

200000 60
189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189299 189...

output:

7080
50 300 450 400 550 100 500 350 150 200 250 801 1101 951 901 1051 601 1001 851 651 701 751 49 1652 1302 1602 1452 1402 1552 1502 1352 1152 1202 1252 600 48 2153 2203 1803 2103 1953 1903 2053 2003 1853 1703 1753 1151 599 47 2654 2704 2304 2604 2454 2404 2554 2754 2504 2354 2254 1702 1150 598 46 3...

result:

ok n=200000

Test #160:

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

input:

200000 60
145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145396 145...

output:

7925
300 500 100 50 350 150 400 250 550 200 450 857 1061 653 602 908 704 959 806 755 1010 549 1374 1166 1114 1426 1218 1478 1322 1270 1530 1060 548 1849 1637 1584 1902 1690 1955 1796 1743 1529 1059 547 2280 2064 2010 2334 2118 2226 2172 1954 1528 1058 546 2665 2445 2390 2500 2610 2555 2333 1953 1527...

result:

ok n=200000

Test #161:

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

input:

200000 60
177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177370 177...

output:

6936
98 49 196 245 441 588 392 294 343 147 539 490 638 736 785 981 1128 932 834 883 1177 687 1079 1030 48 1766 1276 1325 1521 1668 1472 1374 1423 1717 1227 1619 1570 637 47 2306 1816 1865 2061 2355 2208 2012 1914 1963 2257 2159 2110 1226 636 46 2846 2405 2601 2944 2895 2748 2552 2454 2503 2797 2699 ...

result:

ok n=200000

Test #162:

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

input:

200000 60
104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104969 104...

output:

7799
245 441 294 343 49 147 98 392 196 490 539 588 839 1039 889 939 639 739 689 989 789 1089 1139 587 1395 1599 1446 1497 1191 1293 1242 1548 1344 1650 1138 586 1911 2119 1963 2015 1703 1807 1755 2067 1859 1649 1137 585 2385 2438 2491 2173 2279 2226 2544 2332 2118 1648 1136 584 2815 2869 2923 2599 2...

result:

ok n=200000

Test #163:

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

input:

200000 60
142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142639 142...

output:

6816
432 384 96 288 144 576 48 192 624 528 336 480 240 1009 961 673 865 721 1153 1249 769 1201 1105 913 1057 817 47 1874 1586 1538 1442 1298 1730 1826 1346 1778 1682 1490 1634 1394 672 46 2451 2163 2115 2019 2499 2307 2403 1923 2355 2259 2067 2211 1971 1297 671 45 3028 2740 2692 3124 2596 3076 2884 ...

result:

ok n=200000

Test #164:

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

input:

200000 60
3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 3371 187592 187592 187592 187592 187592 187592 187592 1...

output:

7582
624 96 528 336 576 384 432 192 144 480 240 288 48 723 1164 968 1213 1017 1066 821 772 1115 870 919 674 623 1314 1764 1564 1614 1664 1414 1364 1714 1464 1514 1264 1212 622 1867 2122 2173 2224 1969 1918 2275 2020 2071 1816 1763 1211 621 2380 2640 2692 2744 2484 2432 2536 2588 2328 2274 1762 1210 ...

result:

ok n=200000

Test #165:

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

input:

200000 70
157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157966 157...

output:

7502
192 256 64 320 448 128 384 577 641 705 833 897 513 769 63 962 1026 1090 1218 1346 1282 1154 512 62 1795 1411 1475 1603 1731 1667 1539 961 511 61 2180 1860 1988 2116 2244 2052 1924 1410 960 510 60 2565 2693 2373 2501 2629 2437 2309 1859 1409 959 509 59 2950 3078 2758 2886 3014 2822 3142 2308 185...

result:

ok n=200000

Test #166:

score: 0
Accepted
time: 28ms
memory: 18080kb

input:

200000 70
191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191315 191...

output:

7948
384 64 320 448 256 192 128 839 514 774 709 644 579 447 906 1170 1104 1038 972 838 446 1238 1439 1372 1305 1169 837 445 1508 1644 1576 1438 1168 836 444 1714 1783 1643 1437 1167 835 443 1854 1782 1642 1436 1166 834 442 2175 2303 2111 2239 2047 1983 1919 1853 2629 2564 2694 2499 2434 2369 2302 18...

result:

ok n=200000

Test #167:

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

input:

200000 70
140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140332 140...

output:

7038
252 378 504 63 315 441 126 189 694 820 946 757 883 568 631 1009 62 1136 1262 1514 1388 1199 1325 1073 1451 567 61 1578 1704 1956 1830 1641 1767 2019 1893 1072 566 60 2146 2524 2398 2272 2083 2209 2461 2335 1577 1071 565 59 2588 2966 2840 2714 3029 2651 2903 2777 2082 1576 1070 564 58 3408 3282 ...

result:

ok n=200000

Test #168:

score: 0
Accepted
time: 28ms
memory: 18212kb

input:

200000 70
61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61830 61...

output:

7581
126 315 441 378 189 63 504 252 633 825 953 889 697 569 761 503 1084 1279 1344 1149 1019 1214 952 502 1477 1675 1543 1411 1609 1343 951 501 1810 1877 1743 1944 1674 1342 950 500 2081 2149 2013 1943 1673 1341 949 499 2288 2219 2148 1942 1672 1340 948 498 2359 2287 2147 1941 1671 1339 947 497 2423...

result:

ok n=200000

Test #169:

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

input:

200000 70
151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151704 151...

output:

6674
558 62 186 434 372 310 496 124 248 1055 683 931 869 1117 807 993 621 745 61 1676 1552 1180 1428 1366 1614 1304 1490 1242 620 60 2173 2235 2049 1925 1863 2111 1801 1987 1739 1179 619 59 2670 2732 2794 2546 2422 2360 2608 2298 2484 1738 1178 618 58 3167 3229 3291 3043 2919 2857 3105 3353 2981 229...

result:

ok n=200000

Test #170:

score: 0
Accepted
time: 30ms
memory: 19832kb

input:

200000 70
138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138513 138...

output:

7281
310 62 186 372 496 124 558 434 248 874 622 748 937 1063 685 1000 811 557 1384 1128 1256 1448 1192 1512 1320 1062 556 1838 1578 1708 1903 1643 1773 1511 1061 555 2234 1970 2102 2036 2168 1902 1510 1060 554 2302 2436 2369 2503 2233 1901 1509 1059 553 2572 2708 2640 2502 2232 1900 1508 1058 552 27...

result:

ok n=200000

Test #171:

score: 0
Accepted
time: 30ms
memory: 20024kb

input:

200000 70
187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187435 187...

output:

6412
61 183 610 488 549 427 366 122 244 305 733 1160 1038 1221 1099 977 916 672 794 855 60 1283 1710 1588 1771 1649 1527 1466 1344 1405 1832 671 59 2443 2260 2138 2321 2199 2077 2016 1894 1955 2382 1282 670 58 2993 2810 3054 2688 2871 2749 2627 2566 2505 2932 1893 1281 669 57 3543 3360 3604 3238 366...

result:

ok n=200000

Test #172:

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

input:

200000 70
55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55123 55...

output:

7078
122 549 488 244 183 61 305 427 366 610 735 1169 1107 859 797 673 921 1045 983 609 1296 1674 1422 1359 1233 1485 1611 1548 1168 608 1803 1931 1867 1739 1995 2123 2059 1673 1167 607 2254 2384 2319 2189 2449 2514 2122 1672 1166 606 2647 2779 2713 2581 2845 2513 2121 1671 1165 605 2980 3114 3047 29...

result:

ok n=200000

Test #173:

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

input:

200000 70
108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108893 108...

output:

6200
300 600 180 360 540 60 120 660 240 420 480 901 1201 781 961 1141 721 1261 841 1321 1021 1081 59 1502 1802 1382 1562 1742 1862 1442 1982 1922 1622 1682 720 58 2103 2403 2163 2343 2643 2463 2043 2583 2523 2223 2283 1381 719 57 2704 3004 2764 2944 3244 3064 3184 3304 3124 2824 2884 2042 1380 718 5...

result:

ok n=200000

Test #174:

score: 0
Accepted
time: 28ms
memory: 19716kb

input:

200000 70
184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184273 184...

output:

6914
120 360 60 420 300 540 600 480 240 660 180 783 1027 722 1088 966 1210 1271 1149 905 844 659 1396 1644 1334 1706 1582 1830 1768 1520 1458 1270 658 1957 2209 1894 2272 2146 2335 2083 2020 1829 1269 657 2464 2720 2400 2784 2656 2592 2528 2334 1828 1268 656 2915 3175 2850 3110 3045 2980 2783 2333 1...

result:

ok n=200000

Test #175:

score: 0
Accepted
time: 30ms
memory: 21184kb

input:

200000 70
6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 6228 ...

output:

6047
649 236 118 531 354 413 295 590 708 472 59 177 1299 1417 886 768 1181 1004 1063 945 1240 1358 1122 827 58 1949 2067 2126 1536 1831 1654 1713 1595 1890 2008 1772 1477 767 57 2599 2717 2835 2776 2186 2481 2304 2363 2245 2540 2658 2422 1476 766 56 3249 3367 3485 3426 3544 3131 2954 3013 2895 3190 ...

result:

ok n=200000

Test #176:

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

input:

200000 70
153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153029 153...

output:

6757
236 59 649 118 590 177 354 472 531 708 295 413 949 769 1369 829 1309 889 1069 1189 1249 1009 1129 707 1614 1431 1492 1980 1553 1736 1858 1919 1675 1797 1368 706 2229 2043 2105 2167 2353 2477 2539 2291 2415 1979 1367 705 2792 2603 2666 2729 2918 3044 2855 2981 2538 1978 1366 704 3301 3109 3173 3...

result:

ok n=200000

Test #177:

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

input:

200000 70
63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63572 63...

output:

5903
638 522 754 406 116 696 290 232 58 174 348 580 464 1335 1219 1451 1103 813 1393 987 929 871 1509 1045 1277 1161 57 2032 1916 2148 1800 2264 2090 1684 1626 1568 2206 1742 1974 1858 812 56 2729 2613 2845 3019 2497 2961 2787 2381 2323 2903 2439 2671 2555 1567 811 55 3426 3774 3310 3542 3716 3194 3...

result:

ok n=200000

Test #178:

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

input:

200000 70
41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41563 41...

output:

6656
464 290 522 406 696 754 232 116 638 580 58 348 174 1227 1050 1286 1168 1463 991 873 1404 1345 814 1109 932 753 1944 1764 2004 1884 1704 1584 2124 2064 1524 1824 1644 1462 752 2613 2430 2674 2552 2369 2247 2735 2186 2491 2308 2123 1461 751 3232 3046 3294 3170 2984 2860 2798 3108 2922 2734 2122 1...

result:

ok n=200000

Test #179:

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

input:

200000 80
153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153054 153...

output:

6820
222 518 74 444 370 148 296 667 1037 963 889 815 593 741 73 1112 1482 1408 1334 1260 1186 1556 592 72 2075 1927 1853 1779 1705 1631 2001 1111 591 71 2520 2372 2298 2224 2594 2150 2446 1630 1110 590 70 2965 2817 3113 2743 2669 3039 2891 2149 1629 1109 589 69 3410 3262 3558 3188 3632 3484 3336 266...

result:

ok n=200000

Test #180:

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

input:

200000 80
71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71559 71...

output:

7138
296 148 444 518 370 222 74 819 669 969 894 744 594 517 1274 1122 1350 1198 1046 968 516 1659 1505 1582 1428 1349 967 515 1816 1894 1738 1658 1348 966 514 2053 1974 1893 1657 1347 965 513 2134 2052 1892 1656 1346 964 512 2357 2209 2505 2579 2431 2283 2653 2133 2879 2729 3029 3104 2954 2804 2652 ...

result:

ok n=200000

Test #181:

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

input:

200000 80
112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112348 112...

output:

6358
219 511 73 365 146 438 584 292 731 1169 1023 877 658 950 1096 804 72 1754 1243 1681 1535 1389 1462 1608 1316 657 71 2266 2193 2047 2339 1901 1974 2120 1828 1242 656 70 2778 2705 2559 2851 2924 2413 2486 2632 1827 1241 655 69 3290 3217 3071 3363 3436 3509 2998 3144 2412 1826 1240 654 68 3802 372...

result:

ok n=200000

Test #182:

score: 0
Accepted
time: 28ms
memory: 20256kb

input:

200000 80
135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135216 135...

output:

6761
219 292 146 73 584 438 365 511 807 881 733 659 1029 955 1103 583 1329 1404 1254 1179 1554 1479 1102 582 1783 1859 1707 1631 1935 1553 1101 581 2167 2244 2090 2013 1934 1552 1100 580 2479 2401 2323 2243 1933 1551 1099 579 2638 2559 2478 2242 1932 1550 1098 578 2719 2637 2477 2241 1931 1549 1097 ...

result:

ok n=200000

Test #183:

score: 0
Accepted
time: 30ms
memory: 20144kb

input:

200000 80
16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16516 16...

output:

6027
648 432 144 288 216 576 360 72 504 1225 1009 721 865 1297 793 1153 937 1081 71 1802 1586 1946 1442 1874 1370 1730 1514 1658 720 70 2595 2379 2163 2523 2019 2451 2307 2091 2235 1369 719 69 3172 2956 2740 3100 3244 3028 2884 2668 2812 2018 1368 718 68 3749 3533 3317 3677 3821 3605 3461 3893 3389 ...

result:

ok n=200000

Test #184:

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

input:

200000 80
82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82150 82...

output:

6503
576 288 216 360 72 144 432 504 648 1233 941 868 1014 722 795 1087 1160 647 1530 1456 1604 1308 1382 1678 1752 1232 646 2053 1978 2128 1828 1903 2203 1751 1231 645 2508 2432 2584 2280 2356 2202 1750 1230 644 2893 2816 2662 2739 2583 2201 1749 1229 643 3128 2972 3050 2892 2582 2200 1748 1228 642 ...

result:

ok n=200000

Test #185:

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

input:

200000 80
185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185094 185...

output:

5760
639 71 710 497 213 142 355 568 426 284 1279 1350 1137 853 782 995 1208 1066 924 1421 70 1919 1990 1777 2132 1493 1635 1848 1706 1564 2061 781 69 2559 2630 2417 2772 2275 2488 2346 2843 2204 2701 1492 780 68 3199 3270 3057 3554 3412 2915 3128 2986 3483 3341 2203 1491 779 67 3839 3910 3697 4194 4...

result:

ok n=200000

Test #186:

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

input:

200000 80
44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44986 44...

output:

6315
213 426 710 142 284 568 355 639 71 497 927 1143 855 999 1287 1071 1359 783 1215 709 1579 1798 1506 1652 1944 1725 1433 1871 1358 708 2167 2389 2093 2241 2315 2019 2463 1943 1357 707 2689 2914 2614 2764 2839 2539 2462 1942 1356 706 3143 3067 3219 3295 2991 2913 2461 1941 1355 705 3527 3450 3604 ...

result:

ok n=200000

Test #187:

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

input:

200000 80
92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92812 92...

output:

5548
420 140 560 280 70 630 700 490 350 210 770 1121 841 1261 981 1331 1401 1191 1051 911 1471 1541 69 1822 1962 1682 2032 2102 1892 1752 1612 2172 2312 2242 840 68 2523 2663 2383 3083 2733 2803 2593 2453 2873 3013 2943 1611 839 67 3224 3364 3784 3854 3434 3504 3294 3154 3574 3714 3644 2382 1610 838...

result:

ok n=200000

Test #188:

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

input:

200000 80
46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46154 46...

output:

6142
420 700 350 140 770 490 70 560 630 210 280 1197 1481 1126 913 1268 842 1339 1410 984 1055 769 1914 1842 1626 1986 1554 2058 2130 1698 1770 1480 768 2569 2496 2277 2642 2204 2715 2350 2423 2129 1479 767 3160 3086 2864 3234 2790 2938 3012 2714 2128 1478 766 3685 3610 3385 3310 3460 3535 3233 2713...

result:

ok n=200000

Test #189:

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

input:

200000 80
38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38357 38...

output:

5386
759 483 621 552 828 207 345 414 690 69 138 276 1657 1519 1243 1381 1312 1588 967 1105 1174 1450 898 1036 68 2417 2279 2003 2486 2141 2072 2348 1727 1865 1934 2210 1796 897 67 3177 3039 2763 3246 2901 2832 3108 2625 2694 2970 3315 2556 1726 896 66 3937 3799 3523 4006 4144 3661 3592 3868 3385 345...

result:

ok n=200000

Test #190:

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

input:

200000 80
26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26451 26...

output:

6019
621 690 345 483 138 828 276 414 207 552 759 69 1459 1529 1179 1319 969 1109 1249 1039 1389 1599 899 827 2239 2310 1955 2097 1742 1884 2026 1813 2168 1671 1598 826 2959 2671 2815 2455 2599 2743 2527 2887 2383 2309 1597 825 3325 3471 3106 3252 3398 3179 3544 3033 2958 2308 1596 824 3915 4063 3693...

result:

ok n=200000

Test #191:

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

input:

200000 80
74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74378 74...

output:

5236
816 884 748 136 204 272 476 544 408 68 680 612 340 1633 1701 1565 1769 953 1021 1089 1293 1361 1225 1497 1429 1157 67 2450 2518 2382 2586 1838 1906 2110 2178 2042 2654 2314 2246 1974 952 66 3267 3335 3199 3539 3403 2723 2927 2995 2859 3471 3131 3063 2791 1837 951 65 4084 4152 4424 4016 4356 422...

result:

ok n=200000

Test #192:

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

input:

200000 80
26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26277 26...

output:

5880
340 408 476 544 748 816 204 884 680 612 68 272 136 1230 1299 1368 1437 1644 1713 1092 1575 1506 954 1161 1023 883 2064 2134 2204 2274 2484 1924 2414 2344 1784 1994 1854 1712 882 2840 2911 2982 3053 2698 3195 3124 2556 2769 2627 2483 1711 881 3556 3628 3700 3772 3412 3844 3268 3484 3340 3194 248...

result:

ok n=200000

Test #193:

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

input:

200000 90
163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163306 163...

output:

6278
84 168 504 420 252 588 336 1177 673 1009 925 757 1093 841 83 1682 1514 1766 1430 1262 1598 1346 672 82 2187 2019 2271 1935 2355 2103 1851 1261 671 81 2692 2944 2524 2776 2440 2860 2608 1850 1260 670 80 3197 3449 3533 3029 3281 3365 3113 2439 1849 1259 669 79 3702 4122 3954 4038 3786 3870 3618 3...

result:

ok n=200000

Test #194:

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

input:

200000 90
128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128666 128...

output:

6490
336 168 84 252 420 504 588 929 759 674 844 1014 1099 587 1444 1272 1186 1358 1530 1098 586 1879 1705 1618 1792 1529 1097 585 2056 1968 2144 1878 1528 1096 584 2323 2234 2143 1877 1527 1095 583 2414 2322 2142 1876 1526 1094 582 2667 2499 2583 2751 2835 2919 3003 2413 3259 3089 3174 3344 3429 351...

result:

ok n=200000

Test #195:

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

input:

200000 90
118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118695 118...

output:

5836
166 581 83 332 415 498 664 249 748 1163 1329 914 997 1080 1246 831 82 1745 1911 1496 1579 1662 1994 1828 1413 747 81 2659 2327 2493 2078 2161 2244 2576 2410 1412 746 80 3241 3324 2909 3075 2743 2826 3158 2992 2077 1411 745 79 3823 3989 3906 3491 3657 3408 3740 3574 2742 2076 1410 744 78 4405 45...

result:

ok n=200000

Test #196:

score: 0
Accepted
time: 28ms
memory: 19576kb

input:

200000 90
9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 9582 ...

output:

6136
415 249 332 166 498 83 581 664 1085 917 1001 833 1169 749 1253 663 1679 1509 1594 1424 1764 1339 1252 662 2195 2023 2109 1937 1851 1763 1251 661 2457 2544 2370 2283 2194 1762 1250 660 2809 2721 2633 2543 2193 1761 1249 659 2988 2899 2808 2542 2192 1760 1248 658 3079 2987 2807 2541 2191 1759 124...

result:

ok n=200000

Test #197:

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

input:

200000 90
101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101867 101...

output:

5504
410 246 738 82 328 164 656 574 492 1067 903 1395 1477 985 821 1313 1231 1149 81 1724 1560 2052 2134 2216 1642 1970 1888 1806 820 80 2381 2709 2791 2873 2955 2299 2627 2545 2463 1559 819 79 3038 3366 3694 3448 3530 3612 3284 3202 3120 2298 1558 818 78 4023 4351 4105 4187 4269 3941 3859 4433 3777...

result:

ok n=200000

Test #198:

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

input:

200000 90
17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17458 17...

output:

5877
574 410 246 328 738 656 82 492 164 1320 1154 988 1071 1403 822 1237 905 737 1992 1824 1656 1740 1488 1908 1572 1402 736 2418 2248 2333 2078 2503 2163 1991 1401 735 2934 2762 2848 2590 2676 2502 1990 1400 734 3196 3283 3022 3109 2933 2501 1989 1399 733 3548 3372 3460 3282 2932 2500 1988 1398 732...

result:

ok n=200000

Test #199:

score: 0
Accepted
time: 30ms
memory: 20640kb

input:

200000 90
127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127905 127...

output:

5244
162 810 81 243 486 405 324 648 567 729 1621 892 1540 973 1216 1135 1054 1378 1297 1459 80 2351 2270 1703 2432 1946 1865 1784 2108 2027 2189 891 79 3081 3000 3162 3243 2676 2595 2514 2838 2757 2919 1702 890 78 3811 3730 3892 3973 3406 3325 4054 3568 3487 3649 2513 1701 889 77 4541 4460 4622 4703...

result:

ok n=200000

Test #200:

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

input:

200000 90
188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188405 188...

output:

5699
81 567 405 324 810 162 648 486 729 243 893 1385 1221 1139 975 1467 1303 1549 1057 809 1633 2131 1965 1882 1716 2214 2048 1799 1548 808 2299 2803 2635 2551 2383 2719 2467 2213 1547 807 2889 3229 3144 2974 3314 3059 2802 2212 1546 806 3401 3745 3659 3487 3573 3313 2801 2211 1545 805 3833 4094 392...

result:

ok n=200000

Test #201:

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

input:

200000 90
16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16080 16...

output:

5043
400 320 240 640 720 560 160 480 800 880 80 1201 1121 1041 1441 1521 1361 961 1281 1761 1601 1681 79 2002 2642 1922 1842 2242 2322 2162 2082 2562 2402 2482 960 78 2803 3443 2723 3043 3523 3123 2963 2883 3363 3203 3283 1841 959 77 3604 4244 4404 3844 4324 3924 3764 3684 4164 4004 4084 2722 1840 9...

result:

ok n=200000

Test #202:

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

input:

200000 90
173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173822 173...

output:

5516
80 160 640 240 480 800 720 560 400 320 880 962 1043 1529 1124 1367 1691 1610 1448 1286 1205 879 1774 1856 2348 1938 2184 2430 2266 2102 2020 1690 878 2514 2597 3095 2680 2929 3012 2846 2763 2429 1689 877 3180 3264 3348 3600 3684 3516 3432 3094 2428 1688 876 3770 3855 3940 4195 4110 4025 3683 30...

result:

ok n=200000

Test #203:

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

input:

200000 90
16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16553 16...

output:

4870
158 316 474 869 711 553 237 948 395 632 790 79 1028 1186 1897 1344 1739 1581 1423 1107 1818 1265 1502 1660 78 2056 2767 2214 2609 2451 2293 1977 2688 2135 2372 2530 2846 1027 77 2926 3637 3795 3084 3479 3321 3163 3558 3005 3242 3400 3716 1976 1026 76 4744 4507 4665 3954 4349 4191 4033 4428 3875...

result:

ok n=200000

Test #204:

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

input:

200000 90
154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154884 154...

output:

5410
553 711 79 869 790 316 632 158 395 237 948 474 1509 1669 1029 1829 1749 1269 1589 1109 1349 1189 1429 947 2397 2559 1911 2640 2154 2478 1992 2235 2073 2316 1828 946 3215 3379 2723 2969 3297 2805 3051 2887 3133 2639 1827 945 3961 3463 3712 4044 3546 3795 3629 3878 3378 2638 1826 944 4633 4129 43...

result:

ok n=200000

Test #205:

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

input:

200000 90
190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190198 190...

output:

4752
936 78 780 702 390 156 312 1014 546 234 624 468 858 1873 2029 1717 1639 1327 1093 1249 1951 1483 1171 1561 1405 1795 77 2810 2966 2654 2576 2264 3044 2186 2888 2420 2108 2498 2342 2732 1092 76 3747 3903 3591 3513 3201 3981 3123 3825 3357 4059 3435 3279 3669 2107 1091 75 4684 4840 4528 4450 4138...

result:

ok n=200000

Test #206:

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

input:

200000 90
164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164091 164...

output:

5284
858 78 1014 624 546 780 234 468 936 156 702 312 390 1884 1094 1647 1568 1805 1252 1489 1963 1173 1726 1331 1410 1013 2844 2044 2604 2524 2764 2204 2444 2124 2684 2284 2364 1962 1012 2926 3493 3412 3655 3088 3331 3007 3574 3169 3250 2843 1961 1011 3738 4312 4230 3902 4148 3820 4394 3984 4066 365...

result:

ok n=200000

Test #207:

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

input:

200000 100
8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343 8343...

output:

5842
282 564 188 658 470 94 376 847 1129 753 1223 1317 1035 941 93 1412 1694 1788 1882 1976 1600 1506 752 92 2635 2259 2353 2447 2541 2165 2071 1411 751 91 3200 3294 2824 2918 3012 3106 2730 2070 1410 750 90 3765 3859 3389 3953 3483 3577 3671 2729 2069 1409 749 89 4330 4424 4612 4518 4048 4142 4236 ...

result:

ok n=200000

Test #208:

score: 0
Accepted
time: 28ms
memory: 21072kb

input:

200000 100
111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 111510 11...

output:

5966
282 376 470 658 94 564 188 944 1039 1134 754 1229 849 657 1518 1614 1710 1326 1422 1228 656 2002 2099 1808 1905 1709 1227 655 2394 2198 2296 2098 1708 1226 654 2494 2593 2393 2097 1707 1225 653 2694 2592 2392 2096 1706 1224 652 2883 2977 3071 3259 3353 3165 2789 2693 3544 3639 3734 3924 3829 34...

result:

ok n=200000

Test #209:

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

input:

200000 100
34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 34491 3...

output:

5420
186 372 558 465 279 651 93 744 838 1024 1210 1117 931 1303 1489 1396 92 1676 1862 1769 1583 1955 2141 2048 2234 837 91 2328 2514 2421 2607 2979 2793 2700 2886 1582 836 90 3166 3073 3724 3259 3631 3445 3352 3538 2327 1581 835 89 4469 3818 4376 3911 4283 4097 4004 4190 3072 2326 1580 834 88 5214 ...

result:

ok n=200000

Test #210:

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

input:

200000 100
186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 186169 18...

output:

5641
651 93 558 186 465 279 744 372 1403 839 1309 933 1215 1027 1121 743 1499 1974 1594 1879 1689 1784 1402 742 2071 2167 2455 2263 2359 1973 1401 741 2553 2650 2747 2844 2454 1972 1400 740 2943 3041 3139 2843 2453 1971 1399 739 3239 3338 3138 2842 2452 1970 1398 738 3439 3337 3137 2841 2451 1969 13...

result:

ok n=200000

Test #211:

score: 0
Accepted
time: 28ms
memory: 20532kb

input:

200000 100
132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 132818 13...

output:

5100
184 92 736 828 644 552 460 368 276 921 1473 1565 1657 1381 1289 1197 1105 1013 91 2486 2210 2302 2394 2118 2026 1934 1842 1750 920 90 3223 3315 2947 3039 3131 2855 2763 2671 2579 1749 919 89 3960 4144 4052 3684 3776 3868 3592 3500 3408 2578 1748 918 88 4697 4881 4973 4789 4421 4513 4605 4329 42...

result:

ok n=200000

Test #212:

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

input:

200000 100
182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 182328 18...

output:

5369
92 276 736 552 460 644 368 828 184 922 1108 1573 1387 1294 1480 1201 1015 827 1668 1856 2138 2044 2232 1950 1762 1572 826 2328 2518 2803 2708 2613 2423 2231 1571 825 2900 3092 3284 3188 2996 2802 2230 1570 824 3382 3576 3673 3479 3283 2801 2229 1569 823 3772 3968 3870 3672 3282 2800 2228 1568 8...

result:

ok n=200000

Test #213:

score: 0
Accepted
time: 30ms
memory: 21256kb

input:

200000 100
137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 137809 13...

output:

4840
910 637 455 819 91 273 364 546 728 182 1730 1457 1275 1821 1639 1093 1184 1366 1548 1002 90 2550 2277 2095 2641 2459 1913 2004 2186 2368 2732 1001 89 3370 3097 2915 3461 3643 3279 2824 3006 3188 3552 1912 1000 88 4554 4190 3917 3735 4281 4463 4099 3826 4008 4372 2823 1911 999 87 5374 5465 5010 ...

result:

ok n=200000

Test #214:

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

input:

200000 100
168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 168110 16...

output:

5183
910 637 91 728 819 273 182 455 546 364 1555 1003 1647 1739 1187 1095 1371 1463 1279 909 2391 1833 2484 2019 1926 2205 2298 2112 1738 908 3143 2579 2767 2673 2955 3049 2861 2483 1737 907 3239 3429 3334 3619 3714 3524 3142 2482 1736 906 3811 4003 3907 4195 4099 3713 3141 2481 1735 905 4293 4487 4...

result:

ok n=200000

Test #215:

score: 0
Accepted
time: 28ms
memory: 19680kb

input:

200000 100
166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 166835 16...

output:

4631
360 90 180 270 450 630 540 990 810 900 720 1261 1081 1171 1351 1531 1441 1891 1711 1801 1981 1621 89 2162 2072 2252 2432 2342 2792 2972 2612 2702 2882 2522 1080 88 3063 3963 3153 3333 3243 3693 3873 3513 3603 3783 3423 2071 1079 87 4864 4054 4234 4144 4594 4774 4414 4954 4504 4684 4324 3062 207...

result:

ok n=200000

Test #216:

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

input:

200000 100
19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 19586 1...

output:

5031
720 360 540 180 900 630 450 270 990 90 810 1719 1355 1537 1173 1901 1628 1446 1264 1082 1810 989 2638 2270 2454 2086 2546 2362 2178 1994 2730 1900 988 3475 3103 3289 2917 3382 3196 3010 2824 2729 1899 987 3852 4040 3664 4134 3946 3758 3570 3474 2728 1898 986 4515 4705 4325 4610 4420 4230 4133 3...

result:

ok n=200000

Test #217:

score: 0
Accepted
time: 28ms
memory: 20168kb

input:

200000 100
45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 45771 4...

output:

4484
534 890 178 979 445 267 1068 801 623 89 356 712 1514 1870 1158 1959 1425 2137 1247 2048 1781 1603 1336 1692 88 2494 2850 2939 2405 3206 3117 2227 3028 2761 2583 2316 2672 1157 87 3474 3830 3919 3385 4186 4097 4008 3741 3563 3296 3652 4275 2226 1156 86 4454 4810 4899 4365 5166 5077 4988 4721 454...

result:

ok n=200000

Test #218:

score: 0
Accepted
time: 28ms
memory: 20476kb

input:

200000 100
93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 93997 9...

output:

4892
979 712 1068 89 445 356 623 178 534 801 267 890 2059 1789 1159 1519 1429 1699 1249 1609 1879 1339 1969 1067 2788 2151 2515 2424 2697 2242 2606 2879 2333 2970 2058 1066 3707 3063 3431 3339 3615 3155 3523 3799 3247 2969 2057 1065 4544 3893 4265 4172 4451 3986 4358 4079 3798 2968 2056 1064 4639 50...

result:

ok n=200000

Test #219:

score: 0
Accepted
time: 30ms
memory: 20024kb

input:

200000 100
115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 115552 11...

output:

4336
616 792 440 88 968 1056 352 176 264 528 880 1144 704 1673 1849 2289 1497 2025 2113 1409 1233 1321 1585 1937 2201 1761 87 2730 2906 3346 2554 3082 3170 2466 2378 2642 2994 3434 3258 2818 1232 86 3787 3963 4403 3611 4139 4227 3523 3699 4579 4051 4491 4315 3875 2377 1231 85 4844 5724 5020 5460 466...

result:

ok n=200000

Test #220:

score: 0
Accepted
time: 28ms
memory: 20964kb

input:

200000 100
65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 65998 6...

output:

4806
792 176 440 1144 968 704 88 264 1056 880 616 352 528 1946 1323 1590 2124 1857 1234 1412 2213 2035 1768 1501 1679 1143 3024 2394 2664 3204 2934 2304 2484 3114 2844 2574 2754 2212 1142 4024 3387 3660 3933 3296 3478 4115 3842 3569 3751 3203 2211 1141 4944 4300 4576 4852 4208 4392 4760 4484 4668 41...

result:

ok n=200000