QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#376461 | #6109. Similarity Graph | schrodingerstom | AC ✓ | 8ms | 4612kb | C++14 | 3.2kb | 2024-04-04 10:25:05 | 2024-04-04 10:25:05 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
bool memBeg;
template<typename T,typename TT> void chkmin(T &x,TT y) {if(x>y) x=y;}
template<typename T,typename TT> void chkmax(T &x,TT y) {if(x<y) x=y;}
constexpr int mod=998244353;
void inc(int &x,int y) {x+=y; x-=(x>=mod)*mod;}
void dec(int &x,int y) {x-=y; x+=(x<0)*mod;}
constexpr int add(int x,int y) {return (x+y>=mod)?x+y-mod:x+y;}
constexpr int sub(int x,int y) {return (x<y)?x-y+mod:x-y;}
constexpr int quick_pow(int x,ll times,int ret=1) {
for(;times;times>>=1,x=1ll*x*x%mod) if(times&1) ret=1ll*ret*x%mod;
return ret;
}
constexpr int maxn=105;
int n,a[maxn][maxn],fa[maxn*maxn];
int find(int x) {return fa[x]==x?x:fa[x]=find(fa[x]);}
int qhash(int i,int j) {return (i-1)*n+j;}
bool ban[maxn*maxn],ltx[maxn][maxn],lty[maxn][maxn];
vector<pair<int,int>> bel[maxn*maxn];
void work(bool lt[maxn][maxn],int *aim) {
static int ideg[maxn],que[maxn];
for(int i=1;i<=n;i++) ideg[i]=0;
for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) if(lt[i][j]) ideg[j]++;
int tead=0,rail=0;
for(int i=1;i<=n;i++) if(!ideg[i]) que[rail++]=i;
while(tead<rail) {
int cur=que[tead++];
for(int i=1;i<=n;i++) if(lt[cur][i]&&!--ideg[i]) que[rail++]=i;
}
assert(rail==n);
for(int i=0;i<n;i++) aim[que[i]]=i+1;
}
int x[maxn],y[maxn];
bool memEn;
void fl() {
freopen(".in","r",stdin);
freopen(".out","w",stdout);
}
int main() {
fprintf(stderr,"%.24lf\n",fabs(&memEn-&memBeg)/1024.0/1024.0);
// fl();
scanf("%d",&n);
for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) scanf("%d",&a[i][j]);
iota(fa+1,fa+n*n+1,1);
for(int i=1;i<=n;i++) {
for(int j=1;j<=n;j++) {
if(i==j) continue;
for(int k=1;k<=n;k++) {
if(i==k||j==k) continue;
if(a[i][j]==a[i][k]&&a[i][j]!=a[j][k]) {
fa[find(qhash(i,j))]=find(qhash(i,k));
fa[find(qhash(j,i))]=find(qhash(k,i));
}
}
}
}
for(int i=1;i<=n;i++) for(int j=i+1;j<=n;j++) {
if(find(qhash(i,j))==find(qhash(j,i))) return puts("NO"),0;
}
for(int i=n;i>=1;i--) {
for(int j=n;j>=1;j--) {
if(i==j) continue;
bel[find(qhash(i,j))].emplace_back(i,j);
}
}
for(int i=n;i>=1;i--) {
for(int j=n;j>=1;j--) {
if(i==j) continue;
int x=find(qhash(i,j));
if(ban[x]) continue;
ban[x]=true;
for(auto v:bel[x]) {
int p,q; tie(p,q)=v;
ltx[p][q]=true;
ban[find(qhash(q,p))]=true;
}
}
}
for(int i=1;i<=n;i++) {
for(int j=i+1;j<=n;j++) assert(ltx[i][j]!=ltx[j][i]);
}
work(ltx,x);
for(int i=1;i<=n;i++) {
for(int j=1;j<=n;j++) {
if(i==j) continue;
if(a[i][j]) lty[i][j]=ltx[i][j];
else lty[i][j]=!ltx[i][j];
}
}
work(lty,y);
puts("YES");
for(int i=1;i<=n;i++) printf("%d%c",x[i]," \n"[i==n]);
for(int i=1;i<=n;i++) printf("%d%c",y[i]," \n"[i==n]);
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 4212kb
input:
4 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0
output:
YES 4 3 2 1 3 1 4 2
result:
ok ok
Test #2:
score: 0
Accepted
time: 1ms
memory: 4212kb
input:
6 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0
output:
NO
result:
ok ok
Test #3:
score: 0
Accepted
time: 1ms
memory: 4172kb
input:
1 0
output:
YES 1 1
result:
ok ok
Test #4:
score: 0
Accepted
time: 1ms
memory: 4168kb
input:
2 0 0 0 0
output:
YES 2 1 1 2
result:
ok ok
Test #5:
score: 0
Accepted
time: 1ms
memory: 4212kb
input:
2 0 1 1 0
output:
YES 2 1 2 1
result:
ok ok
Test #6:
score: 0
Accepted
time: 1ms
memory: 4192kb
input:
3 0 0 0 0 0 0 0 0 0
output:
YES 3 2 1 1 2 3
result:
ok ok
Test #7:
score: 0
Accepted
time: 1ms
memory: 4184kb
input:
3 0 0 0 0 0 1 0 1 0
output:
YES 3 2 1 1 3 2
result:
ok ok
Test #8:
score: 0
Accepted
time: 0ms
memory: 4188kb
input:
3 0 0 1 0 0 0 1 0 0
output:
YES 2 3 1 3 1 2
result:
ok ok
Test #9:
score: 0
Accepted
time: 1ms
memory: 4148kb
input:
3 0 0 1 0 0 1 1 1 0
output:
YES 3 2 1 2 3 1
result:
ok ok
Test #10:
score: 0
Accepted
time: 1ms
memory: 4220kb
input:
3 0 1 0 1 0 0 0 0 0
output:
YES 3 2 1 2 1 3
result:
ok ok
Test #11:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 0 1 0 1 0 1 0 1 0
output:
YES 2 3 1 1 3 2
result:
ok ok
Test #12:
score: 0
Accepted
time: 1ms
memory: 4148kb
input:
3 0 1 1 1 0 0 1 0 0
output:
YES 3 2 1 3 1 2
result:
ok ok
Test #13:
score: 0
Accepted
time: 1ms
memory: 4140kb
input:
3 0 1 1 1 0 1 1 1 0
output:
YES 3 2 1 3 2 1
result:
ok ok
Test #14:
score: 0
Accepted
time: 1ms
memory: 4184kb
input:
4 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0
output:
YES 4 3 2 1 2 3 1 4
result:
ok ok
Test #15:
score: 0
Accepted
time: 0ms
memory: 4204kb
input:
4 0 1 1 1 1 0 0 0 1 0 0 0 1 0 0 0
output:
YES 4 3 2 1 4 1 2 3
result:
ok ok
Test #16:
score: 0
Accepted
time: 1ms
memory: 4204kb
input:
4 0 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0
output:
YES 3 2 4 1 4 1 2 3
result:
ok ok
Test #17:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
4 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0
output:
YES 4 3 2 1 2 1 4 3
result:
ok ok
Test #18:
score: 0
Accepted
time: 1ms
memory: 4208kb
input:
4 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
output:
YES 4 3 2 1 1 2 4 3
result:
ok ok
Test #19:
score: 0
Accepted
time: 1ms
memory: 4168kb
input:
5 0 0 1 0 1 0 0 1 1 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 0
output:
YES 2 4 5 3 1 4 3 5 1 2
result:
ok ok
Test #20:
score: 0
Accepted
time: 1ms
memory: 4212kb
input:
5 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 1 0
output:
YES 5 4 3 2 1 3 4 1 5 2
result:
ok ok
Test #21:
score: 0
Accepted
time: 1ms
memory: 4164kb
input:
5 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 0 1 1 0 0
output:
YES 5 1 4 3 2 3 2 5 1 4
result:
ok ok
Test #22:
score: 0
Accepted
time: 1ms
memory: 4168kb
input:
5 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0
output:
YES 3 5 2 4 1 1 5 2 4 3
result:
ok ok
Test #23:
score: 0
Accepted
time: 1ms
memory: 4140kb
input:
5 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0
output:
YES 3 2 5 4 1 5 1 2 3 4
result:
ok ok
Test #24:
score: 0
Accepted
time: 1ms
memory: 4164kb
input:
6 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 0
output:
YES 6 2 3 5 4 1 3 4 1 6 5 2
result:
ok ok
Test #25:
score: 0
Accepted
time: 1ms
memory: 4208kb
input:
6 0 0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0
output:
YES 2 3 1 6 5 4 5 1 4 2 6 3
result:
ok ok
Test #26:
score: 0
Accepted
time: 1ms
memory: 4148kb
input:
6 0 0 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 0 1 0 0
output:
YES 4 5 3 6 2 1 6 2 1 5 3 4
result:
ok ok
Test #27:
score: 0
Accepted
time: 1ms
memory: 4184kb
input:
6 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 0 0 0 1 1 0 0
output:
YES 4 6 2 5 3 1 1 2 6 5 3 4
result:
ok ok
Test #28:
score: 0
Accepted
time: 1ms
memory: 4184kb
input:
6 0 0 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 0 0 1 1 0 1 1 1 0 0 1 1 1 1 0 0
output:
YES 2 6 5 4 3 1 6 4 3 5 1 2
result:
ok ok
Test #29:
score: 0
Accepted
time: 1ms
memory: 4204kb
input:
7 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 0 0 1 1 0
output:
YES 7 1 2 6 5 4 3 5 2 7 1 4 6 3
result:
ok ok
Test #30:
score: 0
Accepted
time: 1ms
memory: 4168kb
input:
7 0 0 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 0 1 0 0 1 0 0 1 0
output:
YES 2 3 4 6 5 7 1 4 2 6 1 3 7 5
result:
ok ok
Test #31:
score: 0
Accepted
time: 1ms
memory: 4088kb
input:
7 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 1 1 1 0 0
output:
NO
result:
ok ok
Test #32:
score: 0
Accepted
time: 1ms
memory: 4160kb
input:
7 0 1 1 0 1 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 0
output:
NO
result:
ok ok
Test #33:
score: 0
Accepted
time: 1ms
memory: 4200kb
input:
7 0 1 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 1 0 0 0 1 0 1 0
output:
YES 3 7 2 6 5 4 1 1 2 4 7 3 6 5
result:
ok ok
Test #34:
score: 0
Accepted
time: 1ms
memory: 4156kb
input:
8 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 1 1 1 0 1 0 1 0 0 1 0 1 0 1 0
output:
YES 8 3 6 4 7 2 5 1 1 2 8 4 6 3 7 5
result:
ok ok
Test #35:
score: 0
Accepted
time: 1ms
memory: 4176kb
input:
12 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 0 1 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0
output:
YES 7 1 9 4 12 8 11 10 5 6 3 2 7 5 3 4 6 2 8 10 12 1 9 11
result:
ok ok
Test #36:
score: 0
Accepted
time: 1ms
memory: 4196kb
input:
13 0 0 1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 1 1 1 1 0 1 1...
output:
YES 2 5 10 11 9 3 8 4 7 13 12 6 1 6 3 11 4 12 8 1 5 2 13 9 10 7
result:
ok ok
Test #37:
score: 0
Accepted
time: 1ms
memory: 4228kb
input:
17 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 1 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0...
output:
YES 17 15 10 6 7 14 16 4 11 2 5 8 9 3 12 13 1 17 13 11 7 14 3 1 10 4 6 16 5 15 9 12 2 8
result:
ok ok
Test #38:
score: 0
Accepted
time: 1ms
memory: 4196kb
input:
24 0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0 1 0 0 1 1...
output:
YES 20 11 14 22 17 3 16 2 5 21 4 1 7 13 23 24 8 19 9 10 18 12 15 6 21 12 10 4 6 14 3 13 2 5 22 15 11 9 19 24 20 18 23 17 8 16 1 7
result:
ok ok
Test #39:
score: 0
Accepted
time: 1ms
memory: 4232kb
input:
27 0 1 1 1 0 1 1 0 0 0 1 0 1 1 0 1 0 0 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 1 0 1 0 0 1 1 1...
output:
YES 18 3 4 1 16 22 11 23 19 17 21 10 8 9 25 13 27 20 7 12 6 15 26 2 14 24 5 19 6 14 7 27 21 5 11 3 23 24 20 16 9 1 15 2 18 4 17 13 10 26 12 8 25 22
result:
ok ok
Test #40:
score: 0
Accepted
time: 0ms
memory: 4252kb
input:
31 0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 0 1 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1...
output:
YES 30 19 29 1 26 27 6 8 18 11 7 21 28 4 24 20 15 23 25 13 16 17 22 10 3 31 14 9 12 5 2 17 4 16 8 29 9 21 15 14 2 10 20 3 1 18 12 31 24 7 23 25 19 5 28 13 22 6 30 26 27 11
result:
ok ok
Test #41:
score: 0
Accepted
time: 1ms
memory: 4216kb
input:
39 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 0...
output:
YES 3 9 39 5 4 16 33 28 13 32 18 36 17 26 35 2 15 34 27 31 6 12 14 1 23 24 19 25 10 30 11 20 7 38 8 29 22 37 21 22 33 12 21 3 34 11 25 17 8 26 9 30 23 18 29 1 39 19 32 13 16 10 4 28 37 7 6 24 5 2 15 35 14 20 36 31 38 27
result:
ok ok
Test #42:
score: 0
Accepted
time: 0ms
memory: 4288kb
input:
48 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0...
output:
YES 8 20 42 24 38 10 45 29 28 41 19 46 16 17 11 7 12 39 33 37 43 15 31 48 21 44 6 40 9 22 30 26 32 1 47 18 13 3 5 25 34 14 23 27 4 36 35 2 34 41 11 28 10 29 8 3 26 31 2 32 15 27 18 21 4 43 47 5 42 36 44 48 38 30 7 39 12 14 20 45 9 22 37 13 16 6 23 25 40 35 17 24 19 46 1 33
result:
ok ok
Test #43:
score: 0
Accepted
time: 0ms
memory: 4304kb
input:
53 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1...
output:
YES 9 23 15 45 32 49 7 2 1 24 27 8 26 31 53 35 38 46 37 36 30 33 29 11 25 6 39 52 16 13 21 48 5 18 40 47 4 14 22 43 20 28 17 12 51 34 42 41 10 44 19 50 3 9 46 38 1 39 37 14 29 18 51 11 20 28 30 25 45 43 44 10 22 52 8 4 3 47 2 34 26 21 41 6 7 40 42 27 32 50 17 35 31 5 16 48 23 24 49 13 19 33 12 36 53...
result:
ok ok
Test #44:
score: 0
Accepted
time: 2ms
memory: 4264kb
input:
59 0 1 1 1 0 0 1 1 1 0 0 0 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1...
output:
YES 21 27 9 26 59 36 49 50 6 22 19 32 17 34 41 3 7 35 54 20 30 46 4 11 24 38 10 58 33 52 13 5 25 47 43 37 57 51 31 8 15 16 53 39 18 56 29 14 23 44 55 48 42 1 45 40 2 28 12 37 39 17 43 32 16 38 58 19 34 57 11 1 56 8 36 3 46 6 10 9 4 55 49 33 41 31 27 53 45 40 21 5 35 25 50 26 51 12 7 2 28 13 59 18 52...
result:
ok ok
Test #45:
score: 0
Accepted
time: 0ms
memory: 4336kb
input:
65 0 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1 1 0 0 0 0...
output:
YES 57 4 37 3 44 58 25 38 35 30 28 50 39 26 55 22 16 19 43 42 51 10 17 14 11 60 7 6 9 41 20 36 59 65 8 18 49 40 1 56 21 12 45 53 48 63 54 32 52 23 27 29 34 2 33 13 5 62 47 64 24 61 31 46 15 20 33 10 39 3 51 40 25 61 55 29 46 16 1 34 12 65 47 7 38 2 31 58 15 62 37 53 54 18 17 24 43 28 13 35 26 6 60 4...
result:
ok ok
Test #46:
score: 0
Accepted
time: 3ms
memory: 4368kb
input:
72 0 1 0 1 0 0 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0 0...
output:
YES 25 23 19 61 38 44 27 47 13 69 68 35 60 32 7 40 26 57 16 2 10 34 36 5 18 59 67 65 54 29 49 53 43 46 56 48 51 28 66 52 45 64 70 15 9 31 21 17 6 71 14 22 50 55 39 11 42 72 58 3 63 4 62 1 30 12 8 24 37 41 33 20 35 9 59 54 11 3 25 65 43 6 12 14 37 72 24 70 67 26 27 58 39 36 49 46 64 22 61 33 44 50 38...
result:
ok ok
Test #47:
score: 0
Accepted
time: 4ms
memory: 4356kb
input:
77 0 0 0 0 1 0 0 1 1 1 1 0 1 1 0 0 1 1 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 1...
output:
YES 52 51 69 33 62 48 17 68 5 73 57 71 34 39 45 29 74 24 6 54 49 23 31 44 56 55 35 26 76 70 75 3 65 60 30 28 61 32 43 14 13 63 47 36 59 1 19 25 4 11 8 38 40 42 72 15 50 2 21 77 27 37 67 7 41 53 58 22 18 46 20 12 66 64 10 16 9 20 70 1 26 64 56 52 27 5 31 71 18 13 3 76 69 43 4 68 36 30 38 25 75 40 57 ...
result:
ok ok
Test #48:
score: 0
Accepted
time: 5ms
memory: 4320kb
input:
82 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 1...
output:
YES 55 17 39 33 16 38 40 7 58 56 28 35 26 50 4 36 65 74 10 2 45 57 77 69 46 66 5 81 32 72 61 42 68 25 15 23 44 34 53 29 18 71 82 14 62 8 19 1 11 79 41 63 76 30 27 78 24 67 52 9 37 80 70 73 21 12 13 47 6 54 64 49 59 31 60 75 22 20 3 51 48 43 15 57 1 64 81 17 10 53 36 44 22 5 12 77 24 30 9 69 48 59 19...
result:
ok ok
Test #49:
score: 0
Accepted
time: 5ms
memory: 4304kb
input:
86 0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 0...
output:
YES 12 33 61 50 2 8 35 18 3 23 14 85 22 17 16 60 77 74 6 20 79 78 28 19 30 26 39 64 24 71 10 1 29 11 5 15 72 56 65 40 86 70 27 7 59 69 54 13 68 46 42 9 32 82 76 34 4 67 58 38 62 52 43 63 53 31 55 84 21 48 36 25 47 41 51 44 73 66 57 45 81 80 83 49 75 37 45 59 75 41 5 78 50 65 54 27 76 39 26 66 7 17 6...
result:
ok ok
Test #50:
score: 0
Accepted
time: 6ms
memory: 4300kb
input:
90 0 0 0 1 0 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1...
output:
YES 23 87 61 12 90 73 62 1 75 67 83 51 16 10 72 53 3 30 76 81 7 85 86 26 70 66 42 45 56 48 32 74 27 6 54 35 77 46 5 64 68 29 41 38 21 31 15 71 80 59 65 39 19 18 52 79 84 9 8 13 49 22 2 55 14 4 25 20 44 89 78 34 60 24 88 58 57 63 43 33 11 69 47 40 28 36 17 82 50 37 72 31 4 57 56 89 82 84 40 7 79 11 4...
result:
ok ok
Test #51:
score: 0
Accepted
time: 6ms
memory: 4424kb
input:
91 0 1 1 1 1 1 1 1 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 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 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0...
output:
YES 88 74 49 67 50 16 55 41 40 57 8 53 91 21 43 20 60 26 29 66 78 46 90 48 54 51 2 4 39 52 77 38 36 9 31 81 84 83 71 59 37 80 62 6 61 30 18 76 63 33 69 34 25 72 73 11 32 75 70 14 87 79 13 12 19 28 82 27 35 17 86 23 22 1 44 58 45 7 85 10 65 56 89 15 47 24 5 64 42 68 3 90 68 40 22 59 58 88 61 67 77 63...
result:
ok ok
Test #52:
score: 0
Accepted
time: 6ms
memory: 4348kb
input:
92 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 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 0 1 1 1 1 1 1 1 0 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1...
output:
YES 88 51 9 53 14 29 24 3 1 34 67 12 46 4 82 37 47 6 33 76 18 73 23 71 92 68 7 56 26 72 66 5 77 17 79 87 70 45 30 85 43 41 21 10 19 64 55 32 84 36 28 78 91 75 40 27 25 8 50 52 59 69 13 90 38 89 63 48 62 61 81 16 49 20 35 74 31 2 44 83 15 39 11 60 58 57 80 65 22 86 54 42 84 51 44 53 5 76 37 72 70 62 ...
result:
ok ok
Test #53:
score: 0
Accepted
time: 6ms
memory: 4320kb
input:
93 0 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0...
output:
YES 15 84 29 67 33 40 35 34 1 16 13 70 22 47 76 53 30 6 28 8 74 19 49 43 50 79 73 10 27 24 9 65 89 32 60 14 75 61 92 54 59 72 62 42 41 91 63 18 7 37 46 78 66 86 90 64 17 77 20 21 3 81 69 88 48 87 57 44 36 85 39 55 23 12 4 52 38 11 51 45 31 2 80 93 68 83 26 71 5 58 82 56 25 13 9 61 72 2 23 88 68 53 8...
result:
ok ok
Test #54:
score: 0
Accepted
time: 6ms
memory: 4396kb
input:
94 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 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 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1...
output:
YES 84 15 18 92 27 30 63 50 22 2 45 59 41 81 55 86 77 80 72 44 16 25 6 66 26 90 35 73 62 89 28 94 42 34 51 7 38 74 36 43 65 1 56 37 17 21 5 11 14 13 23 61 49 57 24 39 83 46 52 60 91 93 75 58 54 40 79 67 8 4 71 31 32 88 87 19 33 70 12 76 85 78 82 69 68 47 53 3 10 64 9 48 29 20 94 54 78 87 26 7 70 34 ...
result:
ok ok
Test #55:
score: 0
Accepted
time: 6ms
memory: 4324kb
input:
95 0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0...
output:
YES 51 71 4 72 65 45 78 42 47 5 29 68 22 91 61 34 75 19 62 74 24 35 89 86 41 16 1 36 87 10 90 80 57 30 67 76 2 9 83 32 58 70 55 12 26 93 14 84 85 73 33 95 82 17 40 23 49 66 39 25 21 77 64 94 11 59 27 46 3 37 60 20 7 53 52 8 81 50 13 38 31 56 69 48 18 44 15 28 6 54 43 63 88 92 79 21 61 78 26 17 65 31...
result:
ok ok
Test #56:
score: 0
Accepted
time: 6ms
memory: 4440kb
input:
96 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0...
output:
YES 16 56 60 18 82 52 24 66 75 49 13 9 3 95 47 35 92 6 69 46 21 36 37 50 34 86 59 89 45 40 30 71 4 51 2 90 83 41 19 62 10 85 33 48 68 44 12 73 61 77 32 63 26 88 20 80 54 79 25 14 38 94 57 93 22 84 67 96 31 1 11 91 87 15 29 17 81 58 53 55 74 7 23 70 27 64 43 78 39 72 65 76 42 8 28 5 84 51 15 45 12 37...
result:
ok ok
Test #57:
score: 0
Accepted
time: 7ms
memory: 4380kb
input:
97 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 0...
output:
YES 83 63 45 37 51 68 6 10 38 93 62 53 84 56 67 2 49 24 35 55 76 12 32 52 30 1 29 4 21 46 47 20 5 9 81 78 88 65 86 59 87 94 42 31 19 71 57 80 60 43 66 79 48 17 91 8 11 73 28 25 22 3 33 95 82 64 41 7 69 96 13 16 92 50 77 72 70 85 75 58 34 15 44 36 26 40 27 89 61 39 14 97 23 74 54 90 18 10 63 78 7 90 ...
result:
ok ok
Test #58:
score: 0
Accepted
time: 7ms
memory: 4316kb
input:
98 0 0 1 1 0 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 1 1 0...
output:
YES 43 25 29 5 36 71 15 50 63 65 41 91 93 35 90 33 81 75 88 27 69 72 47 20 13 98 89 37 61 48 68 78 66 7 9 38 11 80 53 87 82 95 58 60 84 79 52 45 21 24 76 28 10 67 22 4 73 3 12 23 64 44 40 31 62 8 49 51 39 74 2 46 85 19 86 26 57 32 55 1 56 83 59 16 30 6 54 96 42 70 17 18 14 97 94 77 92 34 47 85 40 44...
result:
ok ok
Test #59:
score: 0
Accepted
time: 7ms
memory: 4416kb
input:
99 0 1 1 0 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 0 1 0 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 1 1...
output:
YES 61 80 54 87 19 74 63 81 70 27 84 85 94 65 17 98 15 41 35 71 3 53 79 24 91 16 62 46 56 67 31 86 4 1 58 6 52 5 14 90 36 11 37 68 12 8 40 47 43 60 32 99 23 78 64 20 66 33 77 89 10 83 34 26 49 30 9 51 88 42 21 22 25 73 96 50 48 93 13 57 7 2 76 69 95 18 44 38 39 45 72 55 28 59 75 92 82 97 29 29 86 24...
result:
ok ok
Test #60:
score: 0
Accepted
time: 8ms
memory: 4236kb
input:
100 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 0 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 0 0 0 0 0 1 ...
output:
NO
result:
ok ok
Test #61:
score: 0
Accepted
time: 8ms
memory: 4284kb
input:
100 0 0 1 1 0 1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 ...
output:
NO
result:
ok ok
Test #62:
score: 0
Accepted
time: 8ms
memory: 4252kb
input:
100 0 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 ...
output:
NO
result:
ok ok
Test #63:
score: 0
Accepted
time: 8ms
memory: 4236kb
input:
100 0 1 0 1 1 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 ...
output:
NO
result:
ok ok
Test #64:
score: 0
Accepted
time: 7ms
memory: 4396kb
input:
100 0 0 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 ...
output:
YES 1 10 14 8 84 3 97 70 43 68 2 17 92 24 6 40 52 16 71 83 57 67 38 7 30 27 48 51 50 98 44 96 80 42 60 87 75 81 91 77 100 64 28 72 26 61 36 34 33 47 82 79 37 88 66 15 85 13 4 90 73 21 25 86 46 95 23 12 11 94 93 29 41 78 65 19 63 58 35 20 69 62 18 9 49 55 74 45 54 89 31 53 99 32 76 56 39 22 59 5 44 2...
result:
ok ok
Test #65:
score: 0
Accepted
time: 7ms
memory: 4412kb
input:
100 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 ...
output:
YES 32 5 1 63 15 65 33 2 83 4 68 41 55 20 45 95 35 39 82 18 64 85 71 72 99 89 76 24 54 17 67 58 22 77 44 60 49 34 37 81 48 25 11 36 59 8 38 31 29 47 52 97 74 53 14 62 6 93 79 73 66 9 56 23 88 100 75 12 92 80 61 84 3 26 87 43 21 27 46 42 94 50 86 51 13 78 10 16 90 70 19 28 98 91 96 69 30 40 57 7 21 7...
result:
ok ok
Test #66:
score: 0
Accepted
time: 7ms
memory: 4428kb
input:
100 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 ...
output:
YES 44 49 41 63 39 16 83 65 99 94 27 75 57 85 81 25 54 59 71 14 51 24 22 23 42 34 97 35 33 47 50 21 67 28 92 100 13 18 98 74 12 38 19 30 78 43 7 36 89 66 8 84 2 11 76 17 77 88 1 93 20 96 72 60 31 37 4 95 3 52 70 6 10 32 29 64 9 45 82 68 55 79 40 61 5 48 87 58 91 69 15 80 46 56 26 90 62 86 73 53 93 2...
result:
ok ok
Test #67:
score: 0
Accepted
time: 8ms
memory: 4388kb
input:
100 0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 1 0 ...
output:
YES 29 40 3 69 58 50 20 84 10 23 66 28 63 93 98 33 71 30 42 6 38 7 85 21 95 89 11 55 87 81 37 76 19 68 77 91 62 49 99 12 2 80 13 59 41 75 1 47 57 100 24 27 14 65 97 54 46 35 64 8 92 67 86 53 4 60 22 31 88 48 26 79 56 94 44 9 32 16 52 72 74 70 51 78 17 96 83 61 36 90 39 45 5 82 34 73 43 25 18 15 9 78...
result:
ok ok
Test #68:
score: 0
Accepted
time: 7ms
memory: 4344kb
input:
100 0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 1 0 0 0 1 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 ...
output:
YES 57 72 53 38 51 9 12 56 99 18 88 29 76 21 10 31 75 78 69 42 84 81 100 52 32 60 1 58 62 3 73 19 14 25 54 63 98 23 45 89 77 92 4 65 15 11 64 87 47 17 93 90 34 67 80 50 7 44 85 37 74 8 20 22 49 39 27 95 96 28 40 94 82 6 26 2 59 70 97 33 16 86 36 30 43 79 46 68 91 48 66 13 5 55 61 71 83 35 41 24 45 8...
result:
ok ok
Test #69:
score: 0
Accepted
time: 3ms
memory: 4396kb
input:
100 0 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 1 ...
output:
YES 19 38 99 76 62 64 90 50 13 73 8 2 49 6 63 10 46 40 23 88 45 94 42 29 43 26 96 37 3 51 11 57 77 82 25 31 93 32 83 5 65 85 44 68 22 9 80 55 16 79 12 98 71 97 21 67 61 78 86 60 7 95 89 58 72 92 27 70 47 91 28 14 18 59 39 69 53 74 87 66 56 52 20 54 35 34 24 100 17 36 75 4 48 41 81 1 84 30 33 15 62 8...
result:
ok ok
Test #70:
score: 0
Accepted
time: 7ms
memory: 4392kb
input:
100 0 1 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1 1 1 1 1 0 1 1 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 ...
output:
YES 37 84 64 38 17 50 43 35 47 7 94 41 18 25 66 68 99 1 98 57 42 48 92 88 22 49 45 5 9 11 10 40 29 97 44 79 90 46 70 30 13 27 96 2 82 52 39 83 81 54 93 15 12 76 95 34 28 60 4 77 33 69 16 8 3 14 59 19 58 31 65 21 32 24 73 87 85 74 6 61 86 53 36 80 26 100 91 75 56 20 23 67 89 63 62 51 71 78 72 55 57 5...
result:
ok ok
Test #71:
score: 0
Accepted
time: 3ms
memory: 4424kb
input:
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 ...
output:
YES 95 43 18 69 22 38 58 40 26 50 8 74 91 15 13 72 64 75 85 7 33 34 21 70 42 37 54 79 81 77 65 89 19 28 46 88 62 94 14 1 60 49 41 36 83 6 44 71 52 67 87 90 80 97 84 20 2 11 78 16 93 56 96 86 57 99 61 76 51 30 92 55 35 10 31 4 82 100 48 5 17 73 45 24 66 59 47 9 98 23 3 39 29 25 53 68 12 32 63 27 1 51...
result:
ok ok
Test #72:
score: 0
Accepted
time: 3ms
memory: 4428kb
input:
100 0 1 0 1 0 1 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1 1 0 0 1 0 0 1 ...
output:
YES 67 38 79 14 76 37 64 83 1 62 12 2 18 86 77 27 36 70 52 57 19 63 87 82 23 42 89 59 60 48 100 71 58 72 74 88 39 80 47 33 93 40 24 28 73 16 75 10 84 26 15 9 35 29 51 3 7 5 44 66 81 56 46 90 8 11 31 65 54 25 30 55 92 91 50 13 20 94 43 41 53 32 99 98 6 21 17 78 22 61 95 97 49 68 96 85 34 45 69 4 86 4...
result:
ok ok
Test #73:
score: 0
Accepted
time: 7ms
memory: 4384kb
input:
100 0 1 0 1 1 0 1 1 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 ...
output:
YES 61 38 100 23 28 99 35 48 95 37 39 25 53 78 1 81 89 50 47 76 72 68 66 45 16 55 86 2 62 27 49 57 31 51 6 20 80 58 79 91 36 41 26 40 42 59 13 24 44 21 85 7 46 84 75 19 94 4 64 71 60 17 98 97 82 15 96 14 18 54 22 92 11 3 70 63 43 32 90 87 67 52 73 8 56 65 83 12 9 5 74 69 34 10 30 93 77 33 88 29 48 2...
result:
ok ok
Test #74:
score: 0
Accepted
time: 1ms
memory: 4172kb
input:
9 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0
output:
YES 9 8 7 4 6 5 3 2 1 8 9 7 3 6 5 4 2 1
result:
ok ok
Test #75:
score: 0
Accepted
time: 1ms
memory: 4296kb
input:
54 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 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 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...
output:
YES 2 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 4 14 13 12 11 10 9 8 7 6 5 3 1 1 54 53 52 51 50 49 48 47 46 45 44 43 41 42 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 3 14 13 12 11 10 9 8 ...
result:
ok ok
Test #76:
score: 0
Accepted
time: 2ms
memory: 4608kb
input:
100 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 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 ...
output:
YES 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 100 ...
result:
ok ok
Test #77:
score: 0
Accepted
time: 2ms
memory: 4584kb
input:
100 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 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 ...
output:
YES 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 69 79 78 77 76 75 74 73 72 71 70 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 34 47 46 45 44 43 42 41 40 39 38 37 36 35 15 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 14 13 12 11 10 9 8 7 6 5 4 3 2 1 100 ...
result:
ok ok
Test #78:
score: 0
Accepted
time: 2ms
memory: 4496kb
input:
100 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 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 ...
output:
YES 100 99 98 97 96 16 95 94 93 92 91 90 89 88 64 87 86 76 85 84 83 82 81 80 79 78 41 77 75 74 73 72 71 70 69 68 67 66 65 63 62 61 60 59 58 57 56 55 54 53 52 51 43 50 49 48 47 36 46 6 45 44 42 40 39 38 37 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 5 18 17 15 14 13 12 11 10 9 8 4 7 3 2 1 100 ...
result:
ok ok
Test #79:
score: 0
Accepted
time: 1ms
memory: 4208kb
input:
4 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0
output:
YES 3 2 4 1 4 2 1 3
result:
ok ok
Test #80:
score: 0
Accepted
time: 2ms
memory: 4236kb
input:
89 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 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 1 0 0 0 0 0 0 0...
output:
NO
result:
ok ok
Test #81:
score: 0
Accepted
time: 0ms
memory: 4548kb
input:
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
YES 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 1 2 ...
result:
ok ok
Test #82:
score: 0
Accepted
time: 3ms
memory: 4612kb
input:
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
YES 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 51 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 1 2 ...
result:
ok ok
Test #83:
score: 0
Accepted
time: 3ms
memory: 4480kb
input:
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:
YES 100 99 98 97 96 95 94 47 93 92 91 24 90 89 18 15 88 87 86 85 84 66 83 64 8 82 81 80 45 79 78 77 76 65 75 74 73 72 71 70 69 38 68 67 63 62 61 60 59 49 58 57 56 55 54 53 52 51 50 48 46 16 44 43 42 41 40 39 37 36 19 35 34 22 33 32 31 30 29 28 27 23 26 25 21 20 17 14 13 12 11 10 9 7 6 5 4 3 2 1 1 2 ...
result:
ok ok