QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#163996#7121. Beech Treezhouhuanyi54 518ms368236kbC++143.3kb2023-09-04 17:50:552024-04-28 07:24:02

Judging History

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

  • [2024-04-28 07:24:02]
  • 管理员手动重测本题所有提交记录
  • 测评结果:54
  • 用时:518ms
  • 内存:368236kb
  • [2023-09-04 17:50:56]
  • 评测
  • 测评结果:54
  • 用时:639ms
  • 内存:375952kb
  • [2023-09-04 17:50:55]
  • 提交

answer

#include"beechtree.h"
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<bitset>
#define N 200000
#define SM 2000
using namespace std;
struct reads
{
	int x,y;
};
int n,t,length,dfn[N+1],sz[N+1],rt[N+1],cnt[N+1],l[N+1],cl[N+1],fa[N+1],tong[N+1];
vector<int>E[N+1];
vector<reads>v[N+1];
vector<reads>st[N+1];
bool used[SM+1][SM+1],vis[SM+1];
bitset<SM+1>B[SM+1];
bitset<SM+1>B2[SM+1];
void dfs(int x)
{
	tong[++length]=x;
	for (int i=0;i<E[x].size();++i) dfs(E[x][i]);
	return;
}
void dfs2(int x)
{
	tong[++length]=x,dfn[x]=length,sz[x]=1;
	for (int i=0;i<E[x].size();++i) dfs2(E[x][i]),sz[x]+=sz[E[x][i]];
	return;
}
bool LENG(int x,int y)
{
	return dfn[x]<=dfn[y]&&dfn[y]<=dfn[x]+sz[x]-1;
}
bool cmp(int x,int y)
{
	return E[x].size()>E[y].size();
}
int find(int x)
{
	if (rt[x]==x) return x;
	return rt[x]=find(rt[x]);
}
void unionn(int x,int y)
{
	rt[x]=y;
	return;
}
void adder(int x,int y)
{
	used[x][y]=B[x][y]=B2[y][x]=1;
	bitset<SM+1>res;
	bitset<SM+1>rst;
	int ps;
	while (1)
	{
		rst=B[x],rst.flip(),res=B[y]&rst,ps=res._Find_first();
		if (ps!=res.size()) adder(x,ps);
		else break;
	}
	while (1)
	{
		rst=B2[y],rst.flip(),res=B2[x]&rst,ps=res._Find_first();
		if (ps!=res.size()) adder(ps,y);
		else break;
	}
	if (fa[x]!=-1&&fa[y]!=-1&&cl[x]==cl[y]&&!used[fa[x]][fa[y]])
	{
		if (min(dfn[fa[x]],dfn[fa[y]])>=t) adder(fa[x],fa[y]); 
		else v[min(dfn[fa[x]],dfn[fa[y]])].push_back((reads){fa[x],fa[y]});
	}
	return;
}
void dfs3(int x,int y)
{
	if (LENG(x,y)) l[x]=x;
	if (x<y) st[l[x]].push_back((reads){x,y});
	for (int i=0;i<E[x].size();++i) l[E[x][i]]=l[x],dfs3(E[x][i],y);
	return;
}
vector<int>beechtree(int SN,int M,vector<int>P,vector<int>C)
{
	bool op=1,opt;
	vector<int>p(SN);
	n=SN;
	for (int i=0;i<M;++i) cnt[i]=0;
    for (int i=1;i<n;++i) op&=(P[i]==i-1),E[P[i]].push_back(i),cl[i]=C[i],fa[i]=P[i];
	for (int i=0;i<n;++i) rt[i]=i;
	if (op)
	{
		opt=1;
		for (int i=n-1;i>=0;--i)
		{
			if (i<=n-3) opt&=(cl[i+1]==cl[i+2]);
		    p[i]=opt;
		}
		return p;
	}
	for (int i=0;i<n;++i)
	{
		length=0,dfs(i),sort(tong+1,tong+length+1,cmp);
		for (int j=1;j<=M;++j) cnt[j]=0;
		for (int j=1;j<=length;++j)
			if (tong[j]!=i)
				cnt[cl[tong[j]]]++,opt&=(E[fa[tong[j]]].size()>=E[tong[j]].size());
		opt=1;
		for (int j=1;j<=M;++j)
			for (int k=1;k<=cnt[j];++k)
			{
				op=0;
				for (int t=0;t<E[tong[k]].size();++t) op|=(C[E[tong[k]][t]]==j);
				opt&=op;
			}
		p[i]=opt;
	}
	length=0,dfs2(0);
	for (int i=0;i<n;++i) dfs3(0,i);
	for (int i=n;i>=1;--i)
	{
		if (tong[i]) unionn(tong[i],fa[tong[i]]);
		t=i;
		for (int j=0;j<E[tong[i]].size();++j)
			if (!used[tong[i]][E[tong[i]][j]])
				adder(tong[i],E[tong[i]][j]);
		for (int j=0;j<st[tong[i]].size();++j)
		{
			if (E[st[tong[i]][j].x].size()<E[st[tong[i]][j].y].size()&&!used[st[tong[i]][j].y][st[tong[i]][j].x]) adder(st[tong[i]][j].y,st[tong[i]][j].x);
			if (E[st[tong[i]][j].x].size()>E[st[tong[i]][j].y].size()&&!used[st[tong[i]][j].x][st[tong[i]][j].y]) adder(st[tong[i]][j].x,st[tong[i]][j].y);
		}
		for (int j=0;j<v[i].size();++j)
			if (!used[v[i][j].x][v[i][j].y])
				adder(v[i][j].x,v[i][j].y);
		p[tong[i]]&=(!used[tong[i]][tong[i]]);
	}
	for (int i=length;i>=1;--i)
		for (int j=0;j<E[tong[i]].size();++j)
			p[tong[i]]&=p[E[tong[i]][j]];
	return p;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 9
Accepted

Test #1:

score: 9
Accepted
time: 0ms
memory: 24264kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 1 2 3 4 5 6
0 281 281 281 281 281 281 281

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1

result:

ok 

Test #2:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 1 2 3 4 5 6
0 11 169 169 169 169 169 169

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1

result:

ok 

Test #3:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 1 2 3 4 5 6
0 324 324 492 324 324 324 324

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 1 1 1 1 1

result:

ok 

Test #4:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 1 2 3 4 5 6
0 216 220 387 371 53 34 188

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 1 1

result:

ok 

Test #5:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 500
-1 0 0 0 1 1 2
0 357 147 147 20 147 20

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #6:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
4 500
-1 0 0 0
0 267 210 278

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1

result:

ok 

Test #7:

score: 0
Accepted
time: 4ms
memory: 24280kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 500
-1 0 0 0 1 2 3
0 250 140 214 250 250 140

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #8:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 0 0 1 1 3 3
0 40 205 455 455 36 36 455

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1

result:

ok 

Test #9:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 500
-1 0 0 1 1 1 2
0 181 33 33 181 201 33

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #10:

score: 0
Accepted
time: 4ms
memory: 24528kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
5 500
-1 0 0 1 2
0 162 281 162 162

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1

result:

ok 

Subtask #2:

score: 5
Accepted

Test #11:

score: 5
Accepted
time: 41ms
memory: 34096kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #12:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #13:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #14:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #15:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #16:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #17:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #18:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #19:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #20:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #21:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #22:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #23:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #24:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Subtask #3:

score: 0
Time Limit Exceeded

Test #25:

score: 0
Time Limit Exceeded

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
103965 200000
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:


result:


Subtask #4:

score: 0
Time Limit Exceeded

Test #48:

score: 0
Time Limit Exceeded

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
199979 200000
-1 0 1 1 1 1 1 1 1 1 1 1 11 11 1 11 11 11 11 11 11 11 0 22 23 23 23 23 23 23 23 23 23 23 33 22 35 36 36 36 36 36 36 36 36 38 38 38 35 48 49 49 49 49 49 49 49 53 53 48 59 60 60 60 60 60 59 66 67 67 67 67 67 67 67 67 67 67 73 71 66 80 81 81 81 81 81 81 81...

output:


result:


Subtask #5:

score: 14
Accepted

Dependency #1:

100%
Accepted

Test #54:

score: 14
Accepted
time: 0ms
memory: 24772kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #55:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
195 500
-1 0 1 2 3 0 5 5 6 6 7 7 5 8 6 8 9 10 11 9 12 13 14 15 16 10 11 12 17 18 19 20 21 22 13 23 24 14 25 26 15 27 28 1 43 43 44 45 46 47 48 44 49 45 46 50 43 44 47 51 52 53 54 45 55 56 48 49 57 58 59 60 61 62 63 64 46 65 66 50 67 2 81 82 81 81 82 83 84 83 84 85 86...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 0 ...

result:

ok 

Test #56:

score: 0
Accepted
time: 6ms
memory: 24988kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
190 500
-1 0 1 2 3 4 5 6 7 8 0 10 11 12 13 14 15 16 17 18 10 19 20 21 22 23 11 12 1 28 29 30 31 28 29 30 31 32 33 32 34 33 34 35 35 36 2 46 46 47 48 49 50 51 47 48 52 53 54 55 56 57 49 58 3 64 65 66 64 65 67 68 66 67 69 70 68 71 69 70 72 71 4 82 82 83 84 85 83 86 87 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #57:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #58:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
191 500
-1 0 1 2 1 2 3 3 4 5 6 4 7 5 6 7 8 8 9 9 10 11 10 11 12 12 13 13 14 14 15 16 17 15 18 19 20 21 16 0 39 39 40 41 40 41 42 42 43 44 43 44 45 46 45 47 46 48 49 50 47 48 49 50 51 51 52 53 54 52 55 56 57 58 53 59 54 0 77 77 78 78 79 79 80 80 81 81 82 83 84 82 85 8...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #59:

score: 0
Accepted
time: 6ms
memory: 24716kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
181 500
-1 0 1 1 2 3 4 5 2 6 7 3 8 4 9 5 6 7 8 0 19 20 21 19 22 23 24 20 21 25 22 23 26 27 24 28 25 0 37 37 38 38 39 40 41 42 39 40 43 41 44 42 43 44 45 0 55 55 56 56 57 57 58 59 58 60 61 59 62 63 60 64 65 0 73 73 74 75 74 76 77 78 75 79 76 77 78 79 80 80 81 0 91 91 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 ...

result:

ok 

Test #60:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #61:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
191 500
-1 0 1 1 2 1 2 3 3 4 2 5 1 6 3 4 7 8 9 5 10 6 4 11 12 7 13 14 15 16 17 8 9 18 10 11 19 5 12 0 39 39 40 41 42 43 44 45 46 47 39 40 48 41 49 50 51 52 42 40 43 41 44 53 54 55 56 57 58 42 59 60 61 62 63 64 65 0 77 78 79 80 81 82 83 84 85 86 87 88 77 89 90 91 92 9...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 0 ...

result:

ok 

Test #62:

score: 0
Accepted
time: 6ms
memory: 25220kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
190 500
-1 0 1 2 3 4 5 6 7 8 0 10 10 11 12 13 14 11 12 15 16 13 17 18 19 14 20 15 1 28 29 28 30 31 32 33 34 28 35 36 29 37 30 28 38 29 2 46 47 46 48 47 48 49 50 51 52 53 54 46 55 56 57 58 3 64 64 65 66 67 68 64 64 69 70 65 71 65 72 73 74 66 4 82 82 83 84 82 85 86 87 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #63:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #64:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
190 500
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 1 14 15 16 17 18 19 20 21 22 23 24 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 0 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 47 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Subtask #6:

score: 14
Accepted

Test #65:

score: 14
Accepted
time: 0ms
memory: 24636kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #66:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #67:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #68:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #69:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #70:

score: 0
Accepted
time: 215ms
memory: 158628kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #71:

score: 0
Accepted
time: 194ms
memory: 46696kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #72:

score: 0
Accepted
time: 291ms
memory: 298656kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #73:

score: 0
Accepted
time: 271ms
memory: 81548kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1960 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 0 40 41 42 40 43 41 42 44 45 43 44 46 47 45 48 49 50 51 52 53 54 55 56 57 58 46 59 47 60 48 61 62 63 64 49 50 51 65 66 67 52 68 53 69 70 54 71 1 88 88...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #74:

score: 0
Accepted
time: 164ms
memory: 46384kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #75:

score: 0
Accepted
time: 168ms
memory: 80564kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #76:

score: 0
Accepted
time: 219ms
memory: 51180kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1921 2
-1 0 1 2 3 1 4 5 6 7 2 3 4 8 9 10 11 12 5 13 14 6 15 16 17 18 19 7 8 20 9 10 11 12 21 22 23 24 25 13 14 15 16 26 17 27 28 29 30 0 49 49 50 51 52 50 53 54 51 52 55 56 57 53 54 58 59 60 55 61 62 63 64 65 66 56 67 68 57 69 70 71 58 59 60 72 61 73 74 75 62 76 77 7...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #77:

score: 0
Accepted
time: 196ms
memory: 47092kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #78:

score: 0
Accepted
time: 453ms
memory: 368236kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #79:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 0 4 4
0 1 1 1 2 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #80:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 1 0 4 5
0 1 2 1 2 2 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #81:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 0 4 4
0 2 2 2 1 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #82:

score: 0
Accepted
time: 4ms
memory: 24588kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 1 0 4 5
0 2 1 2 1 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #83:

score: 0
Accepted
time: 4ms
memory: 24268kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 1 0 4 5
0 1 1 2 2 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #84:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 1 2 3
0 1 2 1 2 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #85:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 1 2 3
0 2 1 2 1 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #86:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 2 2 4
0 1 2 1 2 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #87:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 2 2 4
0 2 1 2 1 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #88:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
6 2
-1 0 0 1 3 1
0 1 2 2 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1

result:

ok 

Test #89:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
6 2
-1 0 0 1 3 1
0 2 1 1 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1

result:

ok 

Test #90:

score: 0
Accepted
time: 4ms
memory: 24356kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 3 4 0
0 2 2 2 2 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1

result:

ok 

Test #91:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 2
-1 0 1 2 3 4 0 1
0 2 2 2 2 2 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1

result:

ok 

Test #92:

score: 0
Accepted
time: 4ms
memory: 24284kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 0 4 5
0 1 1 2 1 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 1 1 1 1 1

result:

ok 

Test #93:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 0 4 5
0 1 1 1 1 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 0 1 1

result:

ok 

Subtask #7:

score: 12
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Test #94:

score: 12
Accepted
time: 503ms
memory: 54684kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #95:

score: 0
Accepted
time: 351ms
memory: 47172kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #96:

score: 0
Accepted
time: 440ms
memory: 46452kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #97:

score: 0
Accepted
time: 443ms
memory: 76092kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #98:

score: 0
Accepted
time: 425ms
memory: 50856kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1960 200000
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 0 40 40 41 42 43 40 44 45 46 47 48 49 50 51 52 53 54 41 40 42 40 55 56 43 57 58 59 60 61 44 45 62 46 47 63 64 48 65 41 66 42 49 67 68 50 51 69 1 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #99:

score: 0
Accepted
time: 357ms
memory: 47052kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 200000
-1 0 0 1 2 1 3 0 0 0 1 2 1 1 2 2 2 3 3 4 4 3 5 3 6 7 4 4 5 5 6 7 8 9 4 5 6 5 7 10 8 11 6 7 6 8 8 9 9 7 10 10 11 8 9 9 12 11 10 12 13 14 13 11 14 12 15 10 12 11 13 15 13 14 14 15 16 16 15 12 16 17 17 16 17 18 18 18 19 13 19 19 20 17 21 22 18 20 19 14 20 20...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #100:

score: 0
Accepted
time: 360ms
memory: 43556kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1991 200000
-1 0 1 1 2 1 1 2 3 2 3 3 4 5 2 4 4 5 3 6 4 5 7 6 8 7 9 5 8 6 10 11 12 6 7 7 8 8 13 9 9 10 9 10 11 12 11 12 13 14 14 15 13 15 16 14 15 17 18 16 17 16 17 10 19 18 19 20 20 21 18 21 19 20 21 22 23 24 25 22 23 24 26 27 22 25 11 12 13 14 15 26 27 28 16 17 29 3...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #101:

score: 0
Accepted
time: 370ms
memory: 41996kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1921 200000
-1 0 1 1 1 2 3 4 5 2 6 7 3 4 8 9 5 2 3 6 4 10 7 8 5 6 9 10 11 11 12 7 13 14 8 15 16 12 9 17 13 10 11 12 18 14 13 14 15 0 49 50 49 49 50 51 51 50 52 53 51 52 54 55 56 53 52 57 53 54 58 59 55 54 56 55 57 60 61 58 62 56 59 63 60 61 62 63 64 64 65 65 57 58 66...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #102:

score: 0
Accepted
time: 449ms
memory: 47760kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #103:

score: 0
Accepted
time: 518ms
memory: 100308kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #104:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
3 2
-1 0 0
0 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1

result:

ok 

Test #105:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
3 2
-1 0 0
0 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1

result:

ok 

Test #106:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
3 2
-1 0 1
0 2 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1

result:

ok 

Test #107:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
3 2
-1 0 1
0 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1

result:

ok 

Subtask #8:

score: 0
Time Limit Exceeded

Dependency #6:

100%
Accepted

Test #108:

score: 17
Accepted
time: 40ms
memory: 34072kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #109:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #110:

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

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #111:

score: 0
Accepted
time: 38ms
memory: 32568kb

input:

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

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 

Test #112:

score: -17
Time Limit Exceeded

input:

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

output:


result:


Subtask #9:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%