QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#246133 | #7629. Make SYSU Great Again II | ucup-team1447# | AC ✓ | 203ms | 29220kb | C++23 | 10.5kb | 2023-11-10 16:26:01 | 2023-11-10 16:26:01 |
Judging History
answer
// dottle bot
#ifndef ONLINE_JUDGE
#define DEBUG
#endif
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <queue>
#include <vector>
#include <bitset>
#include <map>
#include <assert.h>
#include <math.h>
#include <set>
#define nln puts("")
#define od(x) printf("%d",x)
#define odb(x) printf("%d ",x)
#define odl(x) printf("%d\n",x)
#define odp(x,y) printf("%d %d\n",x,y)
#define ol(x) puts("")
#define old(x) printf("%lld",x)
#define oldb(x) printf("%lld ",x)
#define oldl(x) printf("%lld\n",x)
#define oldp(x,y) printf("%lld %lld\n",x,y)
#define rg(x) for(int i=1;i<=(x);i++){
#define rg_(i,x) for(int i=1;i<=(x);i++){
#define fe(u) for(int i=h[u];i;i=e[i].nxt){int v=e[i].v;
#define gr }
#define rrg(x) for(int i=0;i<(x);i++){
#define rdln(a) a[i]=read();
#define rdln0(a,x) rrg(x) rdln(a) gr
#define rdln1(a,x) rg(x) rdln(a) gr
// #define int long long
const int mod=998244353;
#ifdef int
#define inf 0x3f3f3f3f3f3f3f3fll
#else
#define inf 0x3f3f3f3f
#endif
inline int min(int a,int b){return a>b?b:a;}
inline int max(int a,int b){return a<b?b:a;}
#define cmlSEGMIN
#define cmlSEGMAX
#define cmlSEGSUM
class SegTreeAl{
#ifdef cmlSEGMIN
int minn[1000005<<2];
#endif
#ifdef cmlSEGMAX
int maxn[1000005<<2];
#endif
#ifdef cmlSEGSUM
int sum[1000005<<2];
#endif
int tag[1000005<<2];
#ifdef cmlSEGSUM
void pushdown(int o,int l,int r)
#else
void pushdown(int o)
#endif
{
int&t=tag[o];
#ifdef cmlSEGMIN
minn[o<<1]+=t;
minn[o<<1|1]+=t;
#endif
#ifdef cmlSEGMAX
maxn[o<<1]+=t;
maxn[o<<1|1]+=t;
#endif
#ifdef cmlSEGSUM
int m=l+r>>1;
sum[o<<1]+=t*(m-l+1);
sum[o<<1|1]+=t*(r-m);
#endif
tag[o<<1]+=t;
tag[o<<1|1]+=t;
t=0;
}
void add(int o,int l,int r,int L,int R,int v)
{
if(L<=l&&r<=R)
{
#ifdef cmlSEGMAX
maxn[o]+=v;
#endif
#ifdef cmlSEGMIN
minn[o]+=v;
#endif
#ifdef cmlSEGSUM
sum[o]+=v*(r-l+1);
#endif
tag[o]+=v;
return;
}
int m=l+r>>1;
#ifdef cmlSEGSUM
pushdown(o,l,r);
#else
pushdown(o);
#endif
if(L<=m)add(o<<1,l,m,L,R,v);
if(m<R)add(o<<1|1,m+1,r,L,R,v);
#ifdef cmlSEGMAX
maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
}
#ifdef cmlSEGMIN
int qmin(int o,int l,int r,int L,int R)
{
if(L<=l&&r<=R)
{
return minn[o];
}
int m=l+r>>1,res=inf;
#ifdef cmlSEGSUM
pushdown(o,l,r);
#else
pushdown(o);
#endif
if(L<=m)res=min(res,qmin(o<<1,l,m,L,R));
if(m<R)res=min(res,qmin(o<<1|1,m+1,r,L,R));
#ifdef cmlSEGMAX
maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
return res;
}
#endif
#ifdef cmlSEGMAX
int qmax(int o,int l,int r,int L,int R)
{
if(L<=l&&r<=R)
{
return maxn[o];
}
int m=l+r>>1,res=-inf;
#ifdef cmlSEGSUM
pushdown(o,l,r);
#else
pushdown(o);
#endif
if(L<=m)res=max(res,qmax(o<<1,l,m,L,R));
if(m<R)res=max(res,qmax(o<<1|1,m+1,r,L,R));
#ifdef cmlSEGMAX
maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
return res;
}
#endif
#ifdef cmlSEGSUM
int qsum(int o,int l,int r,int L,int R)
{
if(L<=l&&r<=R)
{
return sum[o];
}
int m=l+r>>1,res=0;
#ifdef cmlSEGSUM
pushdown(o,l,r);
#else
pushdown(o);
#endif
if(L<=m)res+=qsum(o<<1,l,m,L,R);
if(m<R)res+=qsum(o<<1|1,m+1,r,L,R);
#ifdef cmlSEGMAX
maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
return res;
}
#endif
};
#define newe(n) struct Edge{int v,w,nxt;}e[2*n+5];\
typedef int arr[n+5];\
arr h;\
int cnt=1;\
inline void addedge(int u,int v,int w){e[cnt]=(Edge){v,w,h[u]};h[u]=cnt++;}\
struct node{\
int u,d;\
bool operator<(const node&b)const{return d>b.d;}\
};\
void dij(int s,int *d,int N)\
{\
memset(d,0x3f,sizeof(int)*(N+3));\
d[s]=0;std::priority_queue<node>q;q.push((node){s,0});\
while(!q.empty())\
{\
int u=q.top().u,D=q.top().d;q.pop();if(D!=d[u])continue;\
for(int i=h[u];i;i=e[i].nxt){int v=e[i].v,w=e[i].w;\
if(d[u]+w<d[v])d[v]=d[u]+w,q.push((node){v,d[v]});\
}\
}\
}
#define mgs int fa[1<<22],sz[1<<22];\
inline int f(int x){return x==fa[x]?x:fa[x]=f(fa[x]);}\
inline int uf(int x,int y)\
{\
int fx=f(x),fy=f(y);\
if(fx==fy)return 0;\
if(sz[fx]>sz[fy])fx^=fy^=fx^=fy;\
fa[fx]=fy,sz[fy]+=sz[fx];\
return 1;\
}
inline int read()
{
int num=0,f=1;char c=getchar();
while(c<48||c>57){if(c=='-')f=-1;c=getchar();}
while(c>47&&c<58)num=num*10+(c^48),c=getchar();
return num*f;
}
inline int re1d()
{
char c=getchar();
while(c<48||c>49)c=getchar();
return c&1;
}
#ifdef cmlBIT
struct BIT{int a[1<<20|1],n;
void add(int x,int p){while(x<=n)a[x]+=p,x+=x&-x;}
int operator[](int x){int res=0;while(x)res+=a[x],x-=x&-x;return res;}
int operator()(int l,int r){return (*this)[r]-(*this)[l-1];}};
#endif
int rnv[1000005];
// #define COMB
#ifdef COMB
#ifndef int
#define int long long
#endif
int fac[1000005],inv[1000005];
#endif
void initprog()
{
#ifdef COMB
fac[0]=inv[0]=inv[1]=1;
rg(1000000)fac[i]=fac[i-1]*i%mod;gr
rg(1000000)if(i>1)inv[i]=inv[mod%i]*(mod-mod/i)%mod;gr
rg(1000000)rnv[i]=inv[i];gr
rg(1000000)inv[i]=inv[i]*inv[i-1]%mod;gr
#endif
}
#ifdef COMB
int C(int n,int m)
{
if(n==m||m==0)return 1;
if(n<m)return 0;
return fac[n]*inv[m]%mod*inv[n-m]%mod;
}
#endif
inline int qp(int a,int b){int c=1;while(b){if(b&1)c=c*a%mod;a=a*a%mod;b>>=1;}return c;}
inline int mae(int &a,int b){a+=b;if(a>=mod)a-=mod;return a;}
inline int mde(int &a,int b){a+=mod-b;if(a>=mod)a-=mod;return a;}
inline int mle(int &a,int b){a=a*b%mod;return a;}
inline int mve(int &a,int b){a=a*qp(b,mod-2)%mod;return a;}
inline int mxe(int &a,int b){return a=a>b?a:b;}
inline int mne(int &a,int b){return a=a<b?a:b;}
inline int ae(int a,int b){int c=a+b;return c>=mod?c-mod:c;}
inline int de(int a,int b){return ae(a,mod-b);}
inline int me(int a,int b){return a*b%mod;}
inline int mive(int &a,int b){a=a*rnv[b]%mod;return a;}
inline int ive(int a,int b){return a*rnv[b]%mod;}
inline int ve(int a,int b){return a*qp(b,mod-2)%mod;}
#ifdef cmlST
struct STmin{
int a[21][1000005],n;
void init(int N,int *b)
{
n=N;
rg(n)a[0][i]=b[i];gr
rg(20)rg_(j,n-(1<<i)+1)a[i][j]=min(a[i-1][j],a[i-1][j+(1<<i-1)]);gr gr
}
int q(int l,int r)
{
int d=std::__lg(r-l+1);
return min(a[d][l],a[d][r-(1<<d)+1]);
}
};
struct STmax{
int a[21][1000005],n;
void init(int N,int *b)
{
n=N;
rg(n)a[0][i]=b[i];gr
rg(20)rg_(j,n-(1<<i)+1)a[i][j]=max(a[i-1][j],a[i-1][j+(1<<i-1)]);gr gr
}
int q(int l,int r)
{
int d=std::__lg(r-l+1);
return max(a[d][l],a[d][r-(1<<d)+1]);
}
};
#endif
#ifdef cmlSAM
struct SAM{
int ch[1000005][26],lnk[1000005],len[1000005],lst=1,cc=1;
int sz[1000005];
void insert(int c)
{
len[++cc]=len[lst]+1;sz[cc]=1;
int p=lst;lst=cc;
while(p&&ch[p][c]==0)ch[p][c]=cc,p=lnk[p];
if(p==0)lnk[cc]=1;
else
{
int x=ch[p][c];
if(len[p]+1==len[x])lnk[cc]=x;
else
{
int q=cc;++cc;
lnk[cc]=lnk[x];
lnk[x]=lnk[q]=cc;
len[cc]=len[p]+1;
memcpy(ch[cc],ch[x],sizeof(ch[cc]));
while(p&&ch[p][c]==x)ch[p][c]=cc,p=lnk[p];
}
}
}
newe(1000005);
long long ans;
void build()
{
rg(cc)addedge(lnk[i],i,0);gr
}
void dfs(int u)
{
fe(u)dfs(v),sz[u]+=sz[v];gr
if(sz[u]>1)ans=max(ans,1ll*sz[u]*len[u]);
}
}t;
#endif
int n=read(),k=1;
int a[20408];
int vis[2048];
int G[2048*2048];
int res[2048][2048];
int sgn[2048];
int dfs(int u)
{
if(u==k/2)
{
int ok=-1;
rrg(k)if(!vis[i]&&(i&a[u-1])==0&&(i&a[u-2])==0)ok=i;gr
if(ok==-1)return 0;
// rrg(k/2)odb(a[i]);gr puts("");
rrg(k/2)a[k-1-i]=a[i];gr
rrg(k)a[k+i]=a[i];gr
// odl(ok);
a[u]=ok;
// return 1;
// puts("?DFSf");
// rrg(k)odb(a[i]);gr
// return 1;
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
{
// res[(i+n-j)%n ][(i+j)%n]=(a[i]*k)+a[j];
// res[i+j&1][j+i&1]=()
res[j][i]=(a[j+i%2])*k+(a[i+j%2]);
// res[j][i]=(j+i%2)*10+(i+j%2);
// res[i][j]=(i+j%2);
// int lo,hi;
// lo=a[(i+j)%n];
// hi=a[(j+i)%n];
// G[lo+hi*k]++;
// printf("%d ",lo+hi*k);
// if(G[lo+hi*k]>5)
// {
// puts("gg");
// puts("gg");
// return 1;
// }
}
for(int i=0;i<n;i++,puts(""))
for(int j=0;j<n;j++)
{
odb(res[i][j]);
//fflush(stdout);
// assert((res[i][j]&res[i+1][j])==0);
// assert((res[i][j]&res[i][j+1])==0);
// G[res[i][j]]++;
// if(G[res[i][j]]>5)
// {
// assert(0);
// // puts("gg");
// // puts("gg");
// // puts("gg");
// return 1;
// }
}
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
{
// odb(res[i][j]);
assert((res[i][j]&res[i+1][j])==0);
assert((res[i][j]&res[i][j+1])==0);
G[res[i][j]]++;
assert(res[i][j]<4*n*n);
if(G[res[i][j]]>5)
{
assert(0);
// puts("gg");
// puts("gg");
// puts("gg");
return 1;
}
}
return 1;
}
for(int i=k-2;i>=0;i--)
if(!vis[i]&&(i&a[u-1])==0)
{
a[u]=i;
vis[i]=1;
if(dfs(u+1))return 1;
vis[i]=0;
}
// int mx=-1,mp=0;
// for(int i=0;i<k-1;i++)
// {
// // if(vis[i]&&(sgn[i])==(u&1))continue;
// if(a[u-1]&i)continue;
// if(vis[i]==2)continue;
// if(vis[i])continue;
// if(a[u-2]!=i)continue;
// if(__builtin_popcount(i)>mx)mx=__builtin_popcount(i),mp=i;
// }
// if(mx!=-1)
// {
// a[u]=mp;
// vis[mp]++;
// sgn[mp]=u&1;
// if(dfs(u+1))return 1;
// vis[mp]--;
// }
// mx=-1,mp=0;
// for(int i=0;i<k-1;i++)
// {
// // if(vis[i]&&(sgn[i])==(u&1))continue;
// if(a[u-1]&i)continue;
// if(vis[i]==2)continue;
// if(a[u-2]==i)continue;
// if(vis[i])continue;
// if(__builtin_popcount(i)>mx)mx=__builtin_popcount(i),mp=i;
// }
// if(mx!=-1)
// {
// a[u]=mp;
// sgn[mp]=u&1;
// vis[mp]++;
// if(dfs(u+1))return 1;
// vis[mp]--;
// }
return 0;
}
signed main()
{
initprog();
puts("Yes");
if(n==1)
{
puts("0");
return 0;
}
if(n==2)
{
puts("0 0");
puts("0 0");
return 0;
}
while(k<n)k<<=1;
a[0]=0,a[1]=k-2;vis[a[1]+1]=1;
vis[a[0]]=vis[a[1]]=1;
dfs(2);
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3456kb
input:
4
output:
Yes 0 10 1 8 10 5 8 4 4 2 5 0 2 1 0 0
result:
ok 1
Test #2:
score: 0
Accepted
time: 0ms
memory: 3348kb
input:
1
output:
Yes 0
result:
ok 1
Test #3:
score: 0
Accepted
time: 0ms
memory: 3300kb
input:
2
output:
Yes 0 0 0 0
result:
ok 1
Test #4:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
3
output:
Yes 0 10 1 10 5 8 4 2 5
result:
ok 1
Test #5:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
5
output:
Yes 0 54 1 52 2 54 9 52 10 49 8 38 9 36 10 38 17 36 18 33 16 14 17 12 18
result:
ok 1
Test #6:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
8
output:
Yes 0 54 1 52 2 49 6 48 54 9 52 10 49 14 48 8 8 38 9 36 10 33 14 32 38 17 36 18 33 22 32 16 16 14 17 12 18 9 22 8 14 49 12 50 9 54 8 48 48 6 49 4 50 1 54 0 6 1 4 2 1 6 0 0
result:
ok 1
Test #7:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
13
output:
Yes 0 238 1 236 3 232 4 233 2 228 8 227 12 238 17 236 19 232 20 233 18 228 24 227 28 225 16 206 17 204 19 200 20 201 18 196 24 195 28 206 49 204 51 200 52 201 50 196 56 195 60 193 48 142 49 140 51 136 52 137 50 132 56 131 60 142 65 140 67 136 68 137 66 132 72 131 76 129 64 158 65 156 67 152 68...
result:
ok 1
Test #8:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
21
output:
Yes 0 990 1 988 3 984 7 976 14 977 12 979 8 982 9 980 2 969 22 968 19 990 33 988 35 984 39 976 46 977 44 979 40 982 41 980 34 969 54 968 51 972 32 926 33 924 35 920 39 912 46 913 44 915 40 918 41 916 34 905 54 904 51 926 97 924 99 920 103 912 110 913 108 915 104 918 105 916 98 905 118 904 115 908...
result:
ok 1
Test #9:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
34
output:
Yes 0 4030 1 4028 3 4024 7 4016 15 4000 30 4001 28 4003 24 4007 16 4014 17 4012 19 4008 23 3976 54 3977 52 3979 36 3995 4 4025 2 3972 4030 65 4028 67 4024 71 4016 79 4000 94 4001 92 4003 88 4007 80 4014 81 4012 83 4008 87 3976 118 3977 116 3979 100 3995 68 4025 66 3972 91 64 3902 65 3900 67 3896 7...
result:
ok 1
Test #10:
score: 0
Accepted
time: 1ms
memory: 5664kb
input:
55
output:
Yes 0 4030 1 4028 3 4024 7 4016 15 4000 30 4001 28 4003 24 4007 16 4014 17 4012 19 4008 23 3976 54 3977 52 3979 36 3995 4 4025 2 3972 27 4004 11 4020 9 4022 8 3991 40 3987 44 3985 46 3984 39 3992 35 3996 33 3998 32 4030 65 4028 67 4024 71 4016 79 4000 94 4001 92 4003 88 4007 80 4014 81 4012 83 4008...
result:
ok 1
Test #11:
score: 0
Accepted
time: 0ms
memory: 3924kb
input:
89
output:
Yes 0 16254 1 16252 3 16248 7 16240 15 16224 31 16192 62 16193 60 16195 56 16199 48 16207 32 16222 33 16220 35 16216 39 16208 47 16144 110 16145 108 16147 104 16151 72 16183 8 16246 9 16244 11 16228 27 16196 59 16132 122 16133 114 16141 98 16157 66 16189 2 16249 6 16241 14 16225 24 16197 34 16152 97...
result:
ok 1
Test #12:
score: 0
Accepted
time: 1ms
memory: 7736kb
input:
100
output:
Yes 0 16254 1 16252 3 16248 7 16240 15 16224 31 16192 62 16193 60 16195 56 16199 48 16207 32 16222 33 16220 35 16216 39 16208 47 16144 110 16145 108 16147 104 16151 72 16183 8 16246 9 16244 11 16228 27 16196 59 16132 122 16133 114 16141 98 16157 66 16189 2 16249 6 16241 14 16225 24 16197 34 16152 97...
result:
ok 1
Test #13:
score: 0
Accepted
time: 0ms
memory: 4588kb
input:
200
output:
Yes 0 65278 1 65276 3 65272 7 65264 15 65248 31 65216 63 65152 126 65153 124 65155 120 65159 112 65167 96 65183 64 65214 65 65212 67 65208 71 65200 79 65184 95 65056 222 65057 220 65059 216 65063 208 65071 144 65135 16 65262 17 65260 19 65256 23 65224 55 65160 119 65032 246 65033 244 65035 228 65051...
result:
ok 1
Test #14:
score: 0
Accepted
time: 6ms
memory: 7440kb
input:
300
output:
Yes 0 261630 1 261628 3 261624 7 261616 15 261600 31 261568 63 261504 127 261376 254 261377 252 261379 248 261383 240 261391 224 261407 192 261439 128 261502 129 261500 131 261496 135 261488 143 261472 159 261440 191 261184 446 261185 444 261187 440 261191 432 261199 416 261215 288 261343 32 261598 ...
result:
ok 1
Test #15:
score: 0
Accepted
time: 10ms
memory: 7012kb
input:
400
output:
Yes 0 261630 1 261628 3 261624 7 261616 15 261600 31 261568 63 261504 127 261376 254 261377 252 261379 248 261383 240 261391 224 261407 192 261439 128 261502 129 261500 131 261496 135 261488 143 261472 159 261440 191 261184 446 261185 444 261187 440 261191 432 261199 416 261215 288 261343 32 261598 ...
result:
ok 1
Test #16:
score: 0
Accepted
time: 15ms
memory: 9352kb
input:
500
output:
Yes 0 261630 1 261628 3 261624 7 261616 15 261600 31 261568 63 261504 127 261376 254 261377 252 261379 248 261383 240 261391 224 261407 192 261439 128 261502 129 261500 131 261496 135 261488 143 261472 159 261440 191 261184 446 261185 444 261187 440 261191 432 261199 416 261215 288 261343 32 261598 ...
result:
ok 1
Test #17:
score: 0
Accepted
time: 13ms
memory: 10956kb
input:
600
output:
Yes 0 1047550 1 1047548 3 1047544 7 1047536 15 1047520 31 1047488 63 1047424 127 1047296 255 1047040 510 1047041 508 1047043 504 1047047 496 1047055 480 1047071 448 1047103 384 1047167 256 1047294 257 1047292 259 1047288 263 1047280 271 1047264 287 1047232 319 1047168 383 1046656 894 1046657 892 104...
result:
ok 1
Test #18:
score: 0
Accepted
time: 16ms
memory: 11544kb
input:
700
output:
Yes 0 1047550 1 1047548 3 1047544 7 1047536 15 1047520 31 1047488 63 1047424 127 1047296 255 1047040 510 1047041 508 1047043 504 1047047 496 1047055 480 1047071 448 1047103 384 1047167 256 1047294 257 1047292 259 1047288 263 1047280 271 1047264 287 1047232 319 1047168 383 1046656 894 1046657 892 104...
result:
ok 1
Test #19:
score: 0
Accepted
time: 29ms
memory: 13420kb
input:
800
output:
Yes 0 1047550 1 1047548 3 1047544 7 1047536 15 1047520 31 1047488 63 1047424 127 1047296 255 1047040 510 1047041 508 1047043 504 1047047 496 1047055 480 1047071 448 1047103 384 1047167 256 1047294 257 1047292 259 1047288 263 1047280 271 1047264 287 1047232 319 1047168 383 1046656 894 1046657 892 104...
result:
ok 1
Test #20:
score: 0
Accepted
time: 40ms
memory: 14696kb
input:
900
output:
Yes 0 1047550 1 1047548 3 1047544 7 1047536 15 1047520 31 1047488 63 1047424 127 1047296 255 1047040 510 1047041 508 1047043 504 1047047 496 1047055 480 1047071 448 1047103 384 1047167 256 1047294 257 1047292 259 1047288 263 1047280 271 1047264 287 1047232 319 1047168 383 1046656 894 1046657 892 104...
result:
ok 1
Test #21:
score: 0
Accepted
time: 51ms
memory: 14832kb
input:
1000
output:
Yes 0 1047550 1 1047548 3 1047544 7 1047536 15 1047520 31 1047488 63 1047424 127 1047296 255 1047040 510 1047041 508 1047043 504 1047047 496 1047055 480 1047071 448 1047103 384 1047167 256 1047294 257 1047292 259 1047288 263 1047280 271 1047264 287 1047232 319 1047168 383 1046656 894 1046657 892 104...
result:
ok 1
Test #22:
score: 0
Accepted
time: 72ms
memory: 23652kb
input:
1200
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Test #23:
score: 0
Accepted
time: 80ms
memory: 23928kb
input:
1400
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Test #24:
score: 0
Accepted
time: 129ms
memory: 26816kb
input:
1600
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Test #25:
score: 0
Accepted
time: 167ms
memory: 29220kb
input:
1800
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Test #26:
score: 0
Accepted
time: 203ms
memory: 29148kb
input:
1900
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Test #27:
score: 0
Accepted
time: 178ms
memory: 28848kb
input:
1920
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Test #28:
score: 0
Accepted
time: 182ms
memory: 28692kb
input:
2000
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Test #29:
score: 0
Accepted
time: 0ms
memory: 5808kb
input:
62
output:
Yes 0 4030 1 4028 3 4024 7 4016 15 4000 30 4001 28 4003 24 4007 16 4014 17 4012 19 4008 23 3976 54 3977 52 3979 36 3995 4 4025 2 3972 27 4004 11 4020 9 4022 8 3991 40 3987 44 3985 46 3984 39 3992 35 3996 33 3998 32 3983 48 3975 56 3971 60 3969 4030 65 4028 67 4024 71 4016 79 4000 94 4001 92 4003 88...
result:
ok 1
Test #30:
score: 0
Accepted
time: 1ms
memory: 4308kb
input:
130
output:
Yes 0 65278 1 65276 3 65272 7 65264 15 65248 31 65216 63 65152 126 65153 124 65155 120 65159 112 65167 96 65183 64 65214 65 65212 67 65208 71 65200 79 65184 95 65056 222 65057 220 65059 216 65063 208 65071 144 65135 16 65262 17 65260 19 65256 23 65224 55 65160 119 65032 246 65033 244 65035 228 65051...
result:
ok 1
Test #31:
score: 0
Accepted
time: 0ms
memory: 5748kb
input:
126
output:
Yes 0 16254 1 16252 3 16248 7 16240 15 16224 31 16192 62 16193 60 16195 56 16199 48 16207 32 16222 33 16220 35 16216 39 16208 47 16144 110 16145 108 16147 104 16151 72 16183 8 16246 9 16244 11 16228 27 16196 59 16132 122 16133 114 16141 98 16157 66 16189 2 16249 6 16241 14 16225 24 16197 34 16152 97...
result:
ok 1
Test #32:
score: 0
Accepted
time: 1ms
memory: 3860kb
input:
66
output:
Yes 0 16254 1 16252 3 16248 7 16240 15 16224 31 16192 62 16193 60 16195 56 16199 48 16207 32 16222 33 16220 35 16216 39 16208 47 16144 110 16145 108 16147 104 16151 72 16183 8 16246 9 16244 11 16228 27 16196 59 16132 122 16133 114 16141 98 16157 66 16189 2 16249 6 16241 14 16225 24 16197 34 16152 1...
result:
ok 1
Test #33:
score: 0
Accepted
time: 73ms
memory: 15464kb
input:
1021
output:
Yes 0 1047550 1 1047548 3 1047544 7 1047536 15 1047520 31 1047488 63 1047424 127 1047296 255 1047040 510 1047041 508 1047043 504 1047047 496 1047055 480 1047071 448 1047103 384 1047167 256 1047294 257 1047292 259 1047288 263 1047280 271 1047264 287 1047232 319 1047168 383 1046656 894 1046657 892 104...
result:
ok 1
Test #34:
score: 0
Accepted
time: 50ms
memory: 14724kb
input:
1022
output:
Yes 0 1047550 1 1047548 3 1047544 7 1047536 15 1047520 31 1047488 63 1047424 127 1047296 255 1047040 510 1047041 508 1047043 504 1047047 496 1047055 480 1047071 448 1047103 384 1047167 256 1047294 257 1047292 259 1047288 263 1047280 271 1047264 287 1047232 319 1047168 383 1046656 894 1046657 892 104...
result:
ok 1
Test #35:
score: 0
Accepted
time: 43ms
memory: 15708kb
input:
1023
output:
Yes 0 1047550 1 1047548 3 1047544 7 1047536 15 1047520 31 1047488 63 1047424 127 1047296 255 1047040 510 1047041 508 1047043 504 1047047 496 1047055 480 1047071 448 1047103 384 1047167 256 1047294 257 1047292 259 1047288 263 1047280 271 1047264 287 1047232 319 1047168 383 1046656 894 1046657 892 104...
result:
ok 1
Test #36:
score: 0
Accepted
time: 58ms
memory: 15380kb
input:
1024
output:
Yes 0 1047550 1 1047548 3 1047544 7 1047536 15 1047520 31 1047488 63 1047424 127 1047296 255 1047040 510 1047041 508 1047043 504 1047047 496 1047055 480 1047071 448 1047103 384 1047167 256 1047294 257 1047292 259 1047288 263 1047280 271 1047264 287 1047232 319 1047168 383 1046656 894 1046657 892 104...
result:
ok 1
Test #37:
score: 0
Accepted
time: 41ms
memory: 21920kb
input:
1025
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Test #38:
score: 0
Accepted
time: 47ms
memory: 22292kb
input:
1026
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Test #39:
score: 0
Accepted
time: 55ms
memory: 21864kb
input:
1027
output:
Yes 0 4192254 1 4192252 3 4192248 7 4192240 15 4192224 31 4192192 63 4192128 127 4192000 255 4191744 511 4191232 1022 4191233 1020 4191235 1016 4191239 1008 4191247 992 4191263 960 4191295 896 4191359 768 4191487 512 4191742 513 4191740 515 4191736 519 4191728 527 4191712 543 4191680 575 4191616 639...
result:
ok 1
Extra Test:
score: 0
Extra Test Passed