QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#291320 | #5567. Balanced Permutations | Crysfly# | AC ✓ | 24ms | 10532kb | C++14 | 7.0kb | 2023-12-26 11:16:51 | 2023-12-26 11:16:51 |
Judging History
answer
// what is matter? never mind.
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define int long long
#define ull unsigned long long
using namespace std;
inline int read()
{
char c=getchar();int x=0;bool f=0;
for(;!isdigit(c);c=getchar())f^=!(c^45);
for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
if(f)x=-x;return x;
}
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
#define maxn 400005
#define inf 0x3f3f3f3f
const ull P[2]={9000000000000000041,9000000000000000053};
ull add(ull x,ull y,ull z){
return x+y>=z?x+y-z:x+y;
}
ull sub(ull x,ull y,ull z){
return x<y?x-y+z:x-y;
}
ull mul(ull x,ull y,ull P){
return (__int128)x*y%P;
ll s=x*y-(ll)((long double)x*y/P)*P;
if(s<0)return s+P;
return (s<P?s:s-P);
}
ull qpow(ull a,ull b,ull P){
ull c=1;
for(;b;b>>=1,a=mul(a,a,P))if(b&1)c=mul(c,a,P);
return c;
}
struct node{
ull a[2];
node(ull b=0){a[0]=(b+P[0])%P[0],a[1]=(b+P[1])%P[1];}
node(ull X,ull Y){a[0]=X,a[1]=Y;}
ull&operator [](ull b){return a[b];}
node operator +(node b){return {add(a[0],b[0],P[0]),add(a[1],b[1],P[1])};}
node operator -(node b){return {sub(a[0],b[0],P[0]),sub(a[1],b[1],P[1])};}
node operator *(node b){return {mul(a[0],b[0],P[0]),mul(a[1],b[1],P[1])};}
node inv(){return {qpow(a[0],P[0]-2,P[0]),qpow(a[1],P[1]-2,P[1])};}
node operator /(node b){return ((*this))*(b.inv());}
void operator +=(node b){(*this)=(*this)+b;}
void operator -=(node b){(*this)=(*this)-b;}
void operator *=(node b){(*this)=(*this)*b;}
void operator /=(node b){(*this)=(*this)/b;}
bool isinf(){return a[0]!=a[1];}
};
int n,k1,k2;
int f[maxn],L[maxn],R[maxn];
node g[44],C[44][44];
node fac[44],ifac[44];
int mid0[maxn],mid1[maxn];
int res[maxn];
void solve(int l,int r,int vl,int vr,int op){
// 0 : small
// 1 : large
assert(vr-vl==r-l);
if(l>r)return;
// cout<<"solve "<<l<<" "<<r<<" "<<vl<<" "<<vr<<"\n";
if(op==0){
int mid=l+mid0[r-l+1];
res[mid]=vr;
solve(l,mid-1,vl,vl+(mid-1-l),op);
solve(mid+1,r,vl+mid-l,vr-1,op);
}else{
int mid=l+mid1[r-l+1];
res[mid]=vr;
solve(l,mid-1,vr-1-(mid-1-l),vr-1,op);
solve(mid+1,r,vl,vr-2-(mid-1-l),op);
}
}
int m,b[42],pos[42];
bool use[42];
int nn;
node dp[42][42][42];
bool vis[42][42][42];
bool ok[42][42];
int suf[42];
node dfs(int l,int r,int k){
if(!k)return 1;
if(vis[l][r][k])return dp[l][r][k];
node &res=dp[l][r][k]=0; vis[l][r][k]=1;
// cout<<"dfs "<<l<<" "<<r<<" "<<k<<"\n";
if(use[k]){
int p=pos[k];
if((p>=l)&&(!ok[l][p-1]||(p-l<L[r-l+1]||p-l>R[r-l+1])))return /*cout<<"fail "<<l<<" "<<r<<" "<<k<<"\n",*/res;
return res=dfs(max(p+1,l),r,k-1);
}
int cnt=nn-r-suf[k+1];
if(cnt) res+=dfs(l,r,k-1)*cnt;
For(p,m+1,r){
// put k at p
if(p-l<L[r-l+1] || p-l>R[r-l+1])continue;
int len=r-p;
node t=dfs(l,p-1,k-1);
// cout<<"l,r,k "<<l<<" "<<r<<" "<<k<<"\n";
// cout<<"t: "<<t.a[0]<<" "<<len<<" "<<ifac[len].a[0]<<" "<<g[len].a[0]<<"\n";
res+=t*ifac[len]*g[len];
}
// cout<<"res "<<l<<" "<<r<<" "<<k<<" "<<res.a[0]<<"\n";
return res;
}
node chk(int n,int m){
// cout<<"chk "<<n<<" "<<m<<"\n";
// For(i,1,m)cout<<b[i]<<" "; cout<<" b\n";
nn=n;
::m=m;
memset(vis,0,sizeof vis);
For(i,1,m)pos[b[i]]=i;
suf[n+1]=0;
Rep(i,n,1) suf[i]=suf[i+1]+(!use[i]);
For(i,1,m+1)ok[i][i-1]=1;
For(len,1,m){
For(i,1,m-len+1){
int j=i+len-1,p=i;
For(k,i,j)if(b[k]>b[p])p=k;
ok[i][j]=(ok[i][p-1]&&ok[p+1][j]&&(p-i>=L[len]&&p-i<=R[len]));
}
}
node res=dfs(1,n,n);
// cout<<res.a[0]<<" "<<res.isinf()<<"\n";
return res;
}
void solve_small(int k){
cerr<<"solve_small\n";
if(n<=30){
if(!g[n].isinf() && k>g[n].a[0]){
puts("-1");
return;
}
}
int n=::n;
int lst=1;
int nowl=1,nowr=n;
while(n){
// cout<<"n: "<<n<<" "<<lst<<" "<<nowl<<" "<<nowr<<"\n";
int pos=mid0[n];
bool ok=0;
if(n-1-pos>40 || g[n-1-pos].isinf() || g[n-1-pos].a[0]>=k) ok=1;
if(ok){
// cout<<"pos "<<pos<<"\n";
res[lst+pos]=nowr;
solve(lst,lst+pos-1,nowl,nowl+pos-1,0);
// For(_,1,::n)cout<<res[_]<<" "; cout<<"\n";
n-=pos+1;
lst+=pos+1;
nowl+=pos;
nowr-=1;
continue;
}
cerr<<"n: "<<n<<" "<<g[n].a[0]<<" "<<k<<"\n";
assert(n<=40);
For(i,1,n)use[i]=0;
For(i,1,n){
bool qwq=0;
For(j,1,n) if(!use[j]) {
b[i]=j; use[j]=1;
node t=chk(n,i);
if(t.isinf() || t.a[0]>=k){
use[j]=qwq=1;
break;
}
k-=t.a[0];
use[j]=0;
}
assert(qwq);
}
For(i,1,n) res[lst+i-1]=nowl+b[i]-1;
break;
}
For(i,1,::n) cout<<res[i]<<" "; cout<<"\n";
}
void solve_large(int k){
cerr<<"solve_large\n";
if(n<=30){
if(!g[n].isinf() && k>g[n].a[0]){
puts("-1");
return;
}
}
int n=::n;
int lst=1;
int nowl=1,nowr=n;
while(n){
// cout<<"n: "<<n<<" "<<lst<<" "<<nowl<<" "<<nowr<<"\n";
int pos=mid1[n];
bool ok=0;
if(n-1-pos>40 || g[n-1-pos].isinf() || g[n-1-pos].a[0]>=k) ok=1;
if(ok){
// cout<<"pos "<<pos<<"\n";
res[lst+pos]=nowr;
solve(lst,lst+pos-1,nowr-pos,nowr-1,1);
// For(_,1,::n)cout<<res[_]<<" "; cout<<"\n";
n-=pos+1;
lst+=pos+1;
nowr-=pos+1;
continue;
}
cerr<<"n: "<<n<<"\n";
assert(n<=40);
For(i,1,n)use[i]=0;
For(i,1,n){
bool qwq=0;
Rep(j,n,1) if(!use[j]) {
b[i]=j; use[j]=1;
node t=chk(n,i);
if(t.isinf() || t.a[0]>=k){
use[j]=qwq=1;
break;
}
k-=t.a[0];
use[j]=0;
}
assert(qwq);
}
For(i,1,n) res[lst+i-1]=nowl+b[i]-1;
break;
}
For(i,1,::n) cout<<res[i]<<" "; cout<<"\n";
}
signed main()
{
// freopen("my.out","w",stdout);
f[1]=1;
L[1]=R[1]=0;
g[1]=g[0]=1;
C[0][0]=1;
For(i,1,40){
C[i][0]=1;
For(j,1,i) C[i][j]=C[i-1][j]+C[i-1][j-1];
}
fac[0]=ifac[0]=1;
For(i,1,40)fac[i]=fac[i-1]*i,ifac[i]=ifac[i-1]/i;
For(i,2,100000){
f[i]=f[(i-1)/2]+f[i-1-(i-1)/2]+i;
int l=0,r=(i-1)/2,pos=(i-1)/2;
while(l<=r){
int mid=l+r>>1;
if(f[mid]+f[i-1-mid]+i==f[i])pos=mid,r=mid-1;
else l=mid+1;
}
L[i]=pos,R[i]=i-1-pos;
// cout<<i<<" "<<f[i]<<" "<<::l[i]<<" "<<::r[i]<<"\n";
if(i<=40){
For(j,L[i],R[i])
g[i]+=C[i-1][j]*g[j]*g[i-1-j];
// cout<<"i: "<<i<<" "<<L[i]<<" "<<R[i]<<" "<<g[i].a[0]<<" "<<g[i].a[1]<<"\n";
}
}
mid0[1]=0;
For(i,2,100000){
int k=0,up=i/2;
while((1<<(k+1))<=up) ++k;
mid0[i]=max((1ll<<k),L[i]);
mid1[i]=max((1ll<<k)-1,L[i]);
// if(i<=500)cout<<"imid: "<<i<<" "<<mid0[i]<<" "<<mid1[i]<<"\n";
}
n=read(),k1=read(),k2=read();
solve_small(k1);
solve_large(k2);
return 0;
}
/*
1000000000000000000
1825861835980459085
4
1 3 2 4
3 4 1 2
*/
詳細信息
Test #1:
score: 100
Accepted
time: 7ms
memory: 8696kb
input:
3 1 2
output:
1 3 2 1 3 2
result:
ok 6 numbers
Test #2:
score: 0
Accepted
time: 7ms
memory: 8620kb
input:
4 9 13
output:
3 1 4 2 -1
result:
ok 5 number(s): "3 1 4 2 -1"
Test #3:
score: 0
Accepted
time: 7ms
memory: 8736kb
input:
4 20 7
output:
-1 2 3 4 1
result:
ok 5 number(s): "-1 2 3 4 1"
Test #4:
score: 0
Accepted
time: 11ms
memory: 9392kb
input:
99500 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199000 numbers
Test #5:
score: 0
Accepted
time: 15ms
memory: 9444kb
input:
99500 40467622443163494 495971246876580853
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199000 numbers
Test #6:
score: 0
Accepted
time: 15ms
memory: 9452kb
input:
99600 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199200 numbers
Test #7:
score: 0
Accepted
time: 19ms
memory: 9468kb
input:
99600 876080080810139630 528446840542737495
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199200 numbers
Test #8:
score: 0
Accepted
time: 20ms
memory: 9452kb
input:
99700 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199400 numbers
Test #9:
score: 0
Accepted
time: 15ms
memory: 9392kb
input:
99700 711692547767050359 156213023658572307
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199400 numbers
Test #10:
score: 0
Accepted
time: 15ms
memory: 9452kb
input:
99800 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199600 numbers
Test #11:
score: 0
Accepted
time: 24ms
memory: 9444kb
input:
99800 547305006134026495 783979211069374416
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199600 numbers
Test #12:
score: 0
Accepted
time: 19ms
memory: 9396kb
input:
99900 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199800 numbers
Test #13:
score: 0
Accepted
time: 15ms
memory: 9452kb
input:
99900 382917468795969927 188373361625400717
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199800 numbers
Test #14:
score: 0
Accepted
time: 19ms
memory: 9476kb
input:
100000 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 200000 numbers
Test #15:
score: 0
Accepted
time: 15ms
memory: 9452kb
input:
100000 527271021985658374 940151335561648448
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 200000 numbers
Test #16:
score: 0
Accepted
time: 5ms
memory: 8860kb
input:
24999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 49998 numbers
Test #17:
score: 0
Accepted
time: 5ms
memory: 8816kb
input:
24999 136771156689394005 924256336536334059
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 49998 numbers
Test #18:
score: 0
Accepted
time: 7ms
memory: 8848kb
input:
29999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 59998 numbers
Test #19:
score: 0
Accepted
time: 11ms
memory: 8856kb
input:
29999 275583998678440849 312380694035658334
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 59998 numbers
Test #20:
score: 0
Accepted
time: 8ms
memory: 8972kb
input:
34999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 69998 numbers
Test #21:
score: 0
Accepted
time: 8ms
memory: 8964kb
input:
34999 541165311540387602 981345461923895956
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 69998 numbers
Test #22:
score: 0
Accepted
time: 12ms
memory: 9012kb
input:
39999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 79998 numbers
Test #23:
score: 0
Accepted
time: 12ms
memory: 8988kb
input:
39999 903350181794275662 369469819423220230
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 79998 numbers
Test #24:
score: 0
Accepted
time: 9ms
memory: 8972kb
input:
44999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 89998 numbers
Test #25:
score: 0
Accepted
time: 13ms
memory: 8964kb
input:
44999 168931494656222415 261806619871266364
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 89998 numbers
Test #26:
score: 0
Accepted
time: 14ms
memory: 9072kb
input:
49999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 99998 numbers
Test #27:
score: 0
Accepted
time: 9ms
memory: 9048kb
input:
49999 531116369205077770 649930977370590638
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 99998 numbers
Test #28:
score: 0
Accepted
time: 10ms
memory: 9052kb
input:
54999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 109998 numbers
Test #29:
score: 0
Accepted
time: 4ms
memory: 9092kb
input:
54999 796697677772057227 318895740963860964
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 109998 numbers
Test #30:
score: 0
Accepted
time: 7ms
memory: 9084kb
input:
59999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 119998 numbers
Test #31:
score: 0
Accepted
time: 5ms
memory: 9168kb
input:
59999 930392135317961046 514344917370708985
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 119998 numbers
Test #32:
score: 0
Accepted
time: 14ms
memory: 9168kb
input:
64999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 129998 numbers
Test #33:
score: 0
Accepted
time: 15ms
memory: 9208kb
input:
64999 424463865182859336 599356898911231372
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 129998 numbers
Test #34:
score: 0
Accepted
time: 11ms
memory: 9220kb
input:
69999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 139998 numbers
Test #35:
score: 0
Accepted
time: 12ms
memory: 9216kb
input:
69999 563276707171906180 987481256410555646
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 139998 numbers
Test #36:
score: 0
Accepted
time: 16ms
memory: 9200kb
input:
74999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 149998 numbers
Test #37:
score: 0
Accepted
time: 12ms
memory: 9316kb
input:
74999 828858015738885637 879818061153569076
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 149998 numbers
Test #38:
score: 0
Accepted
time: 17ms
memory: 9248kb
input:
79999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 159998 numbers
Test #39:
score: 0
Accepted
time: 16ms
memory: 9316kb
input:
79999 191042890287740993 267942410062958759
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 159998 numbers
Test #40:
score: 0
Accepted
time: 14ms
memory: 9328kb
input:
84999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 169998 numbers
Test #41:
score: 0
Accepted
time: 17ms
memory: 9328kb
input:
84999 456624198854720450 936907177951196380
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 169998 numbers
Test #42:
score: 0
Accepted
time: 18ms
memory: 9380kb
input:
89999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 179998 numbers
Test #43:
score: 0
Accepted
time: 13ms
memory: 9324kb
input:
89999 818809073403575806 325031535450520655
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 179998 numbers
Test #44:
score: 0
Accepted
time: 15ms
memory: 9360kb
input:
94999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 189998 numbers
Test #45:
score: 0
Accepted
time: 15ms
memory: 9416kb
input:
94999 84390386265522559 217368340193534085
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 189998 numbers
Test #46:
score: 0
Accepted
time: 15ms
memory: 9480kb
input:
99999 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199998 numbers
Test #47:
score: 0
Accepted
time: 19ms
memory: 9472kb
input:
99999 223203228254569402 605492693397891063
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 199998 numbers
Test #48:
score: 0
Accepted
time: 10ms
memory: 8676kb
input:
35 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 23 11 12 10 20 9 15 14 35 18 25 16 30 21 13 27 22 34 29 31 26 19 33 24 28 32 17 31 32 30 33 28 29 27 34 24 25 22 26 3 10 12 9 11 35 4 8 15 1 20 6 19 14 23 17 18 5 2 21 7 16 13
result:
ok 70 numbers
Test #49:
score: 0
Accepted
time: 6ms
memory: 8620kb
input:
35 511704785331017757 621033432375162630
output:
1 2 4 3 8 5 7 6 22 12 17 15 21 10 14 18 11 35 20 29 24 30 19 25 13 34 26 23 27 9 33 31 16 32 28 31 32 30 33 28 29 27 34 24 25 23 4 26 6 13 7 35 16 14 18 17 20 3 10 12 9 22 8 15 1 21 2 5 19 11
result:
ok 70 numbers
Test #50:
score: 0
Accepted
time: 9ms
memory: 8616kb
input:
36 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 20 9 17 14 19 11 18 10 36 15 32 12 33 30 21 34 16 23 13 35 28 29 27 31 25 26 24 22 32 33 31 34 29 30 28 35 25 26 24 27 18 5 22 12 36 9 17 1 21 7 11 20 14 15 23 13 16 3 2 19 4 6 10 8
result:
ok 72 numbers
Test #51:
score: 0
Accepted
time: 9ms
memory: 8660kb
input:
36 784783501880360048 944159764336367242
output:
1 2 4 3 8 5 7 6 20 9 11 10 18 14 17 16 13 36 29 30 19 33 22 15 27 23 21 35 25 32 12 34 28 31 26 24 32 33 31 34 29 30 28 35 25 26 24 27 18 12 23 22 36 5 1 11 10 20 2 13 14 7 6 21 3 15 8 19 4 9 17 16
result:
ok 72 numbers
Test #52:
score: 0
Accepted
time: 6ms
memory: 8672kb
input:
37 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 18 9 15 12 17 14 16 10 37 24 27 13 23 33 20 11 30 22 36 21 32 25 35 31 29 34 26 28 19 33 34 32 35 30 31 29 36 26 27 25 28 23 16 24 5 37 4 10 8 6 19 13 2 15 7 22 14 9 20 17 21 1 3 18 11 12
result:
ok 74 numbers
Test #53:
score: 0
Accepted
time: 3ms
memory: 8672kb
input:
37 281234255284478147 779772222703343379
output:
1 2 4 3 8 5 7 6 17 10 15 11 16 12 14 13 37 18 22 25 21 35 32 23 34 27 36 28 30 31 9 24 19 33 20 29 26 33 34 32 35 30 31 29 36 26 27 25 28 23 21 24 16 37 12 15 18 6 19 1 13 11 9 22 7 14 4 3 20 2 5 17 10 8
result:
ok 74 numbers
Test #54:
score: 0
Accepted
time: 9ms
memory: 8612kb
input:
38 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 17 9 11 10 16 14 15 12 13 38 26 33 34 19 23 36 18 30 25 27 37 20 31 21 35 24 32 28 29 22 34 35 33 36 31 32 30 37 27 28 26 29 24 25 21 17 38 16 19 4 3 22 8 2 20 1 18 9 23 12 14 6 15 5 7 13 10 11
result:
ok 76 numbers
Test #55:
score: 0
Accepted
time: 6ms
memory: 8672kb
input:
38 554312976128787734 615384685365286811
output:
1 2 4 3 8 5 7 6 16 11 13 12 15 10 14 9 38 31 33 21 32 19 36 29 27 35 23 18 37 28 22 30 17 34 24 25 26 20 34 35 33 36 31 32 30 37 27 28 26 29 24 25 22 15 38 8 4 9 1 20 6 17 16 10 23 2 14 12 19 7 11 21 3 13 18 5
result:
ok 76 numbers
Test #56:
score: 0
Accepted
time: 10ms
memory: 8692kb
input:
39 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 13 10 15 12 14 11 39 21 30 22 19 36 23 34 18 33 38 28 31 35 20 32 27 37 26 29 24 25 17 35 36 34 37 32 33 31 38 28 29 27 30 25 26 24 39 5 7 6 19 10 14 3 16 11 13 9 23 15 17 4 12 2 22 1 8 21 18 20
result:
ok 78 numbers
Test #57:
score: 0
Accepted
time: 9ms
memory: 8620kb
input:
39 827391692678130025 450997143732262947
output:
1 2 4 3 8 5 7 6 16 9 13 10 15 11 14 12 39 18 17 27 19 23 33 22 26 20 38 28 25 36 30 37 24 31 29 35 21 34 32 35 36 34 37 32 33 31 38 28 29 27 30 25 26 24 39 11 5 13 3 12 10 22 19 20 2 23 8 4 16 7 6 21 1 17 9 18 15 14
result:
ok 78 numbers
Test #58:
score: 0
Accepted
time: 4ms
memory: 8672kb
input:
40 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 40 27 29 36 22 26 38 23 21 33 30 32 19 39 34 31 35 25 37 18 24 28 20 17 36 37 35 38 33 34 32 39 29 30 28 31 26 27 25 40 16 20 22 19 18 23 2 13 1 21 9 24 12 14 6 15 11 8 17 3 4 10 5 7
result:
ok 80 numbers
Test #59:
score: 0
Accepted
time: 5ms
memory: 8628kb
input:
40 211339265697552204 758247565352450609
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 40 19 20 34 22 23 38 21 17 31 25 29 39 18 35 36 30 33 28 37 26 32 27 24 36 37 35 38 33 34 32 39 29 30 28 31 26 27 25 40 17 18 5 20 2 19 21 3 11 10 1 24 12 4 22 8 15 7 23 13 16 9 14 6
result:
ok 80 numbers
Test #60:
score: 0
Accepted
time: 4ms
memory: 8668kb
input:
41 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 41 18 22 21 38 29 32 24 39 31 23 34 19 26 40 30 36 25 17 37 33 35 27 28 20 37 38 36 39 34 35 33 40 30 31 29 32 27 28 26 41 21 1 22 6 13 5 24 12 14 20 9 19 10 25 16 15 18 4 17 3 23 2 7 11 8
result:
ok 82 numbers
Test #61:
score: 0
Accepted
time: 8ms
memory: 8672kb
input:
41 707790023396637599 593860028014394042
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 41 17 33 35 18 28 39 31 30 32 20 23 22 40 26 29 19 27 38 24 36 37 21 34 25 37 38 36 39 34 35 33 40 30 31 29 32 27 28 26 41 21 16 22 8 18 4 23 11 13 17 2 15 25 10 19 1 20 7 9 24 12 5 14 3 6
result:
ok 82 numbers
Test #62:
score: 0
Accepted
time: 8ms
memory: 8624kb
input:
42 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 42 17 22 37 24 35 31 38 23 28 27 33 19 26 41 29 32 30 36 25 40 18 34 39 20 21 38 39 37 40 35 36 34 41 31 32 30 33 28 29 27 42 23 9 24 5 7 3 25 15 18 17 22 13 19 26 8 10 14 1 11 4 21 2 6 20 12 16
result:
ok 84 numbers
Test #63:
score: 0
Accepted
time: 8ms
memory: 8628kb
input:
42 980868739945979890 429472486381370178
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 42 17 22 36 23 28 39 30 35 27 32 25 41 29 33 38 24 37 34 40 20 21 31 19 26 18 38 39 37 40 35 36 34 41 31 32 30 33 28 29 27 42 23 19 24 7 22 18 25 11 16 5 17 6 10 26 12 4 15 8 9 2 21 13 1 20 3 14
result:
ok 84 numbers
Test #64:
score: 0
Accepted
time: 8ms
memory: 8736kb
input:
43 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 43 17 19 26 18 39 28 32 36 27 34 21 42 24 25 40 33 35 29 41 31 37 30 38 22 23 20 39 40 38 41 36 37 35 42 32 33 31 34 29 30 28 43 24 22 25 12 13 6 26 9 10 4 21 15 19 5 27 8 11 17 1 14 3 23 2 7 20 16 18
result:
ok 86 numbers
Test #65:
score: 0
Accepted
time: 8ms
memory: 8676kb
input:
43 253947460790289477 265084949043313610
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 43 17 18 33 28 22 40 19 24 21 39 23 35 26 42 25 36 31 32 29 41 37 30 38 20 34 27 39 40 38 41 36 37 35 42 32 33 31 34 29 30 28 43 24 25 11 21 18 26 14 17 6 22 12 7 27 10 15 3 16 4 13 8 23 9 19 20 1 5 2
result:
ok 86 numbers
Test #66:
score: 0
Accepted
time: 4ms
memory: 8664kb
input:
44 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 44 17 18 34 25 33 29 40 30 37 26 27 22 43 21 28 19 41 36 35 42 32 38 31 39 23 24 20 40 41 39 42 37 38 36 43 33 34 32 35 30 31 29 44 25 26 5 19 18 27 1 22 15 23 8 14 11 28 9 7 13 4 6 2 24 3 12 10 21 16 20 17
result:
ok 88 numbers
Test #67:
score: 0
Accepted
time: 8ms
memory: 8672kb
input:
44 527026173044664473 100697407410289747
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 44 17 18 32 19 29 26 41 27 28 25 39 38 23 43 24 35 30 40 34 37 42 33 20 36 21 31 22 40 41 39 42 37 38 36 43 33 34 32 35 30 31 29 44 25 26 19 24 12 27 20 1 23 8 11 6 28 9 10 4 21 13 18 5 22 2 16 3 17 14 15 7
result:
ok 88 numbers
Test #68:
score: 0
Accepted
time: 8ms
memory: 8612kb
input:
45 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 45 17 18 31 23 22 43 24 36 35 42 28 40 25 44 26 27 39 33 34 29 41 32 37 30 38 20 21 19 41 42 40 43 38 39 37 44 34 35 33 36 31 32 30 45 26 27 5 20 18 28 1 23 15 24 8 16 11 29 9 10 7 14 4 6 2 25 3 13 12 22 17 21 19
result:
ok 90 numbers
Test #69:
score: 0
Accepted
time: 4ms
memory: 8632kb
input:
45 23476930743749868 936309870072233179
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 45 17 18 23 21 20 40 34 35 29 39 19 31 44 22 27 24 42 28 30 26 43 32 37 25 41 36 38 33 41 42 40 43 38 39 37 44 34 35 33 36 31 32 30 45 26 27 6 17 12 28 10 11 2 14 8 13 1 29 20 23 7 24 18 21 9 25 4 5 3 22 16 19 15
result:
ok 90 numbers
Test #70:
score: 0
Accepted
time: 5ms
memory: 8628kb
input:
46 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 46 17 18 30 22 23 44 19 38 32 41 28 40 39 45 25 27 26 42 34 35 29 43 33 36 31 37 21 24 20 42 43 41 44 39 40 38 45 35 36 34 37 32 33 31 46 27 26 28 5 20 18 29 1 23 15 24 8 16 11 30 9 10 7 14 4 6 2 25 3 13 12 22 17 21 19
result:
ok 92 numbers
Test #71:
score: 0
Accepted
time: 8ms
memory: 8624kb
input:
46 296555651588059455 771922328439209315
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 46 17 18 27 22 24 21 41 28 32 19 40 29 25 45 26 31 23 43 36 39 33 44 20 38 34 42 30 37 35 42 43 41 44 39 40 38 45 35 36 34 37 32 33 31 46 27 26 28 8 19 14 29 2 23 6 25 3 12 1 30 5 20 18 21 13 15 7 24 10 16 4 22 11 17 9
result:
ok 92 numbers
Test #72:
score: 0
Accepted
time: 0ms
memory: 8696kb
input:
47 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 47 17 18 31 22 24 23 45 19 39 33 42 29 41 40 46 26 28 27 43 35 36 30 44 34 37 32 38 21 25 20 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 47 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3 13 12 22 17 21 19
result:
ok 94 numbers
Test #73:
score: 0
Accepted
time: 4ms
memory: 8672kb
input:
47 569634368137401746 607534791101152748
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 47 17 18 30 19 22 20 42 21 32 26 40 35 36 27 46 39 41 28 44 24 34 31 45 33 38 23 43 29 37 25 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 47 27 28 26 29 10 22 20 30 11 17 14 21 18 19 5 31 15 16 13 24 6 9 2 25 4 12 3 23 1 8 7
result:
ok 94 numbers
Test #74:
score: 0
Accepted
time: 5ms
memory: 8660kb
input:
48 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 48 17 19 18 32 23 25 24 46 20 40 34 43 30 42 41 47 27 29 28 44 36 37 31 45 35 38 33 39 22 26 21 44 45 43 46 41 42 40 47 37 38 36 39 34 35 33 32 48 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3 13 12 22 17 21 19
result:
ok 96 numbers
Test #75:
score: 0
Accepted
time: 8ms
memory: 8700kb
input:
48 66085125836487141 443147253763096180
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 48 17 19 18 27 20 25 21 46 23 41 36 43 35 37 32 47 28 33 22 44 24 42 29 45 30 31 26 40 34 39 38 44 45 43 46 41 42 40 47 37 38 36 39 34 35 33 32 48 27 28 26 29 13 16 5 30 4 10 8 21 9 17 15 31 12 18 3 22 19 20 2 25 11 14 6 24 1 23 7
result:
ok 96 numbers
Test #76:
score: 0
Accepted
time: 4ms
memory: 8620kb
input:
49 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 17 9 10 12 11 16 13 15 14 49 18 20 19 33 24 26 25 47 21 41 35 44 31 43 42 48 28 30 29 45 37 38 32 46 36 39 34 40 23 27 22 45 46 44 47 42 43 41 48 38 39 37 40 35 36 33 34 32 49 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3 13 12 22 17 21 19
result:
ok 98 numbers
Test #77:
score: 0
Accepted
time: 5ms
memory: 8616kb
input:
49 339163842385829432 278759716425039612
output:
1 2 4 3 8 5 7 6 17 9 10 12 11 16 13 15 14 49 18 20 19 30 26 29 21 47 22 33 27 44 39 42 38 48 23 41 40 45 25 43 32 46 34 36 35 37 28 31 24 45 46 44 47 42 43 41 48 38 39 37 40 35 36 33 34 32 49 27 28 26 29 15 25 8 30 13 17 16 24 5 23 18 31 4 14 11 20 1 10 6 22 9 19 7 21 2 12 3
result:
ok 98 numbers
Test #78:
score: 0
Accepted
time: 8ms
memory: 8660kb
input:
50 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 18 9 10 12 11 17 13 14 16 15 50 19 21 20 34 25 27 26 48 22 42 36 45 32 44 43 49 29 31 30 46 38 39 33 47 37 40 35 41 24 28 23 46 47 45 48 43 44 42 49 39 40 38 41 36 35 37 33 34 32 50 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3 13 12 22 17 21 19
result:
ok 100 numbers
Test #79:
score: 0
Accepted
time: 4ms
memory: 8676kb
input:
50 723111415405251611 586010129455292682
output:
1 2 4 3 8 5 7 6 18 9 10 12 11 17 13 14 16 15 50 19 21 20 33 26 27 25 46 24 40 22 43 31 42 23 49 28 39 36 47 35 38 30 48 29 41 37 45 32 44 34 46 47 45 48 43 44 42 49 39 40 38 41 36 35 37 33 34 32 50 27 28 26 29 11 12 5 30 8 22 15 24 9 14 1 31 16 17 4 18 7 10 6 25 3 21 20 23 2 19 13
result:
ok 100 numbers
Test #80:
score: 0
Accepted
time: 9ms
memory: 8700kb
input:
51 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 19 9 10 12 11 18 13 14 17 15 16 51 20 22 21 35 26 28 27 49 23 43 37 46 33 45 44 50 30 32 31 47 39 40 34 48 38 41 36 42 25 29 24 47 48 46 49 44 45 43 50 40 41 39 42 36 37 35 38 33 34 32 51 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3 13 12 22 17 21 19
result:
ok 102 numbers
Test #81:
score: 0
Accepted
time: 8ms
memory: 8728kb
input:
51 996190136249561198 421622592117236114
output:
1 2 4 3 8 5 7 6 19 9 10 12 11 18 13 14 17 15 16 51 20 22 21 35 26 27 25 46 39 44 37 45 28 31 23 50 30 41 40 43 24 38 36 49 42 47 33 48 32 34 29 47 48 46 49 44 45 43 50 40 41 39 42 36 37 35 38 33 34 32 51 27 28 26 29 13 20 16 30 1 24 3 25 9 18 14 31 7 12 8 21 11 17 4 23 6 15 5 22 2 19 10
result:
ok 102 numbers
Test #82:
score: 0
Accepted
time: 0ms
memory: 8676kb
input:
52 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 20 9 10 12 11 19 13 14 18 15 17 16 52 21 23 22 36 27 29 28 50 24 44 38 47 34 46 45 51 31 33 32 48 40 41 35 49 39 42 37 43 26 30 25 48 49 47 50 45 46 44 51 41 42 40 39 43 36 37 35 38 33 34 32 52 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3 13 12 22 17 21 19
result:
ok 104 numbers
Test #83:
score: 0
Accepted
time: 8ms
memory: 8668kb
input:
52 269268848503936193 257235054779179547
output:
1 2 4 3 8 5 7 6 20 9 10 12 11 19 13 14 18 15 17 16 52 21 23 22 33 26 28 27 49 34 36 31 43 35 37 25 51 24 46 44 48 29 41 30 50 38 45 32 47 39 42 40 48 49 47 50 45 46 44 51 41 42 40 39 43 36 37 35 38 33 34 32 52 27 28 26 29 16 20 9 30 10 15 2 22 4 14 5 31 6 12 7 23 13 17 3 25 11 21 8 24 18 19 1
result:
ok 104 numbers
Test #84:
score: 0
Accepted
time: 8ms
memory: 8616kb
input:
53 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 21 9 10 12 11 20 13 15 14 19 16 18 17 53 22 24 23 37 28 30 29 51 25 45 39 48 35 47 46 52 32 34 33 49 41 42 36 50 40 43 38 44 27 31 26 49 50 48 51 46 47 45 52 42 43 40 41 39 44 36 37 35 38 33 34 32 53 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3 13 12 22 17 21 19
result:
ok 106 numbers
Test #85:
score: 0
Accepted
time: 4ms
memory: 8676kb
input:
53 765719606203021589 92847517441122979
output:
1 2 4 3 8 5 7 6 21 9 10 12 11 20 13 15 14 19 16 18 17 53 22 24 23 36 30 33 27 51 29 42 28 48 32 43 35 52 44 45 38 46 37 41 25 50 39 47 34 49 26 40 31 49 50 48 51 46 47 45 52 42 43 40 41 39 44 36 37 35 38 33 34 32 53 27 28 26 29 20 21 16 30 3 10 1 25 6 22 4 31 2 11 7 23 12 17 13 24 14 15 8 19 9 18 5
result:
ok 106 numbers
Test #86:
score: 0
Accepted
time: 8ms
memory: 8664kb
input:
54 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 22 9 10 13 11 12 21 14 16 15 20 17 19 18 54 23 25 24 38 29 31 30 52 26 46 40 49 36 48 47 53 33 35 34 50 42 43 37 51 41 44 39 45 28 32 27 50 51 49 52 47 48 46 53 43 42 44 40 41 39 45 36 37 35 38 33 34 32 54 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3 13 12 22 17...
result:
ok 108 numbers
Test #87:
score: 0
Accepted
time: 8ms
memory: 8616kb
input:
54 38798322752363880 928459975808099115
output:
1 2 4 3 8 5 7 6 22 9 10 13 11 12 21 14 16 15 20 17 19 18 54 23 25 24 32 27 30 29 46 31 37 35 43 28 38 33 53 36 40 26 51 41 48 42 52 39 49 47 50 44 45 34 50 51 49 52 47 48 46 53 43 42 44 40 41 39 45 36 37 35 38 33 34 32 54 27 28 26 29 6 19 7 30 14 17 16 20 2 11 9 31 15 22 12 23 8 13 3 25 1 10 5 24 1...
result:
ok 108 numbers
Test #88:
score: 0
Accepted
time: 8ms
memory: 8676kb
input:
55 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 23 9 10 14 11 13 12 22 15 17 16 21 18 20 19 55 24 26 25 39 30 32 31 53 27 47 41 50 37 49 48 54 34 36 35 51 43 44 38 52 42 45 40 46 29 33 28 51 52 50 53 48 49 47 54 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 55 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3 13 12...
result:
ok 110 numbers
Test #89:
score: 0
Accepted
time: 4ms
memory: 8616kb
input:
55 311877043596673467 764072438470042548
output:
1 2 4 3 8 5 7 6 23 9 10 14 11 13 12 22 15 17 16 21 18 20 19 55 24 26 25 36 31 32 28 53 46 50 45 52 44 48 42 54 34 37 30 49 40 43 33 51 29 39 27 47 35 41 38 51 52 50 53 48 49 47 54 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 55 27 28 26 29 8 21 4 30 6 15 13 19 7 18 17 31 10 16 5 22 14 20 3 25 1 23 ...
result:
ok 110 numbers
Test #90:
score: 0
Accepted
time: 4ms
memory: 8700kb
input:
56 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 24 9 11 10 15 12 14 13 23 16 18 17 22 19 21 20 56 25 27 26 40 31 33 32 54 28 48 42 51 38 50 49 55 35 37 36 52 44 45 39 53 43 46 41 47 30 34 29 52 53 51 54 49 50 48 47 55 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 56 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 2 25 3...
result:
ok 112 numbers
Test #91:
score: 0
Accepted
time: 4ms
memory: 8664kb
input:
56 808327801295758862 599684896837018684
output:
1 2 4 3 8 5 7 6 24 9 11 10 15 12 14 13 23 16 18 17 22 19 21 20 56 25 27 26 39 34 38 36 51 33 40 30 45 31 43 29 55 35 48 46 53 28 52 50 54 42 44 37 49 41 47 32 52 53 51 54 49 50 48 47 55 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 56 27 28 26 29 10 24 4 30 16 20 17 23 6 22 21 31 13 14 3 19 12 18 5 ...
result:
ok 112 numbers
Test #92:
score: 0
Accepted
time: 5ms
memory: 8624kb
input:
57 1000000000000000000 1000000000000000000
output:
1 2 4 3 9 5 6 8 7 25 10 12 11 16 13 15 14 24 17 19 18 23 20 22 21 57 26 28 27 41 32 34 33 55 29 49 43 52 39 51 50 56 36 38 37 53 45 46 40 54 44 47 42 48 31 35 30 53 54 52 55 50 51 48 49 47 56 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 57 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 14 4 6 ...
result:
ok 114 numbers
Test #93:
score: 0
Accepted
time: 4ms
memory: 8736kb
input:
57 81406513550133857 435297359498962116
output:
1 2 4 3 9 5 6 8 7 25 10 12 11 16 13 15 14 24 17 19 18 23 20 22 21 57 26 28 27 36 30 34 33 54 35 47 38 52 48 50 45 56 29 49 43 53 39 46 41 55 31 44 40 51 32 42 37 53 54 52 55 50 51 48 49 47 56 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 57 27 28 26 29 13 18 2 30 7 20 11 22 4 15 12 31 9 19 10 24 3 1...
result:
ok 114 numbers
Test #94:
score: 0
Accepted
time: 8ms
memory: 8660kb
input:
58 1000000000000000000 1000000000000000000
output:
1 2 4 3 10 5 6 9 7 8 26 11 13 12 17 14 16 15 25 18 20 19 24 21 23 22 58 27 29 28 42 33 35 34 56 30 50 44 53 40 52 51 57 37 39 38 54 46 47 41 55 45 48 43 49 32 36 31 54 55 53 56 51 50 52 48 49 47 57 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 58 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 10 7 1...
result:
ok 116 numbers
Test #95:
score: 0
Accepted
time: 4ms
memory: 8616kb
input:
58 354485234394443444 270909817865938253
output:
1 2 4 3 10 5 6 9 7 8 26 11 13 12 17 14 16 15 25 18 20 19 24 21 23 22 58 27 29 28 39 36 38 35 55 31 43 41 49 37 46 32 57 34 52 51 54 40 47 42 56 30 45 33 53 48 50 44 54 55 53 56 51 50 52 48 49 47 57 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 58 27 28 26 29 16 17 11 30 22 23 15 25 8 14 9 31 13 19 7...
result:
ok 116 numbers
Test #96:
score: 0
Accepted
time: 8ms
memory: 8676kb
input:
59 1000000000000000000 1000000000000000000
output:
1 2 4 3 11 5 6 10 7 9 8 27 12 14 13 18 15 17 16 26 19 21 20 25 22 24 23 59 28 30 29 43 34 36 35 57 31 51 45 54 41 53 52 58 38 40 39 55 47 48 42 56 46 49 44 50 33 37 32 55 56 54 57 51 52 50 53 48 49 47 58 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 59 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11 31 9 ...
result:
ok 118 numbers
Test #97:
score: 0
Accepted
time: 4ms
memory: 8668kb
input:
59 850935992093528839 106522280527881685
output:
1 2 4 3 11 5 6 10 7 9 8 27 12 14 13 18 15 17 16 26 19 21 20 25 22 24 23 59 28 30 29 42 40 41 37 57 31 39 35 55 48 52 36 58 33 47 43 54 32 38 34 56 45 51 50 53 44 49 46 55 56 54 57 51 52 50 53 48 49 47 58 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 59 27 28 26 29 19 24 15 30 8 10 5 17 14 16 7 31 9 ...
result:
ok 118 numbers
Test #98:
score: 0
Accepted
time: 5ms
memory: 8700kb
input:
60 1000000000000000000 1000000000000000000
output:
1 2 4 3 12 5 7 6 11 8 10 9 28 13 15 14 19 16 18 17 27 20 22 21 26 23 25 24 60 29 31 30 44 35 37 36 58 32 52 46 55 42 54 53 59 39 41 40 56 48 49 43 57 47 50 45 51 34 38 33 56 57 55 54 58 51 52 50 53 48 49 47 59 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 60 27 28 26 29 5 20 18 30 1 23 15 24 8 16 11...
result:
ok 120 numbers
Test #99:
score: 0
Accepted
time: 4ms
memory: 8616kb
input:
60 11511523963207914 413772697853102051
output:
1 2 4 3 12 5 7 6 11 8 10 9 28 13 15 14 19 16 18 17 27 20 22 21 26 23 25 24 60 29 31 30 37 32 36 33 56 44 45 38 52 35 47 43 59 46 51 40 57 39 50 42 58 53 54 34 55 48 49 41 56 57 55 54 58 51 52 50 53 48 49 47 59 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 60 27 28 26 29 13 22 4 30 5 15 11 24 10 20 3...
result:
ok 120 numbers
Test #100:
score: 0
Accepted
time: 4ms
memory: 8624kb
input:
61 1000000000000000000 1000000000000000000
output:
1 2 5 3 4 13 6 8 7 12 9 11 10 29 14 16 15 20 17 19 18 28 21 23 22 27 24 26 25 61 30 32 31 45 36 38 37 59 33 53 47 56 43 55 54 60 40 42 41 57 49 50 44 58 48 51 46 52 35 39 34 57 58 55 56 54 59 51 52 50 53 48 49 47 60 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 61 27 28 26 29 5 20 18 30 1 23 15 24 8...
result:
ok 122 numbers
Test #101:
score: 0
Accepted
time: 5ms
memory: 8616kb
input:
61 507962281662293309 249385160515045483
output:
1 2 5 3 4 13 6 8 7 12 9 11 10 29 14 16 15 20 17 19 18 28 21 23 22 27 24 26 25 61 30 32 31 43 37 42 41 58 45 53 48 54 33 50 34 60 39 55 38 57 46 56 35 59 40 49 44 52 36 51 47 57 58 55 56 54 59 51 52 50 53 48 49 47 60 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 61 27 28 26 29 16 21 18 30 12 22 7 24 ...
result:
ok 122 numbers
Test #102:
score: 0
Accepted
time: 8ms
memory: 8616kb
input:
62 1000000000000000000 1000000000000000000
output:
1 2 6 3 5 4 14 7 9 8 13 10 12 11 30 15 17 16 21 18 20 19 29 22 24 23 28 25 27 26 62 31 33 32 46 37 39 38 60 34 54 48 57 44 56 55 61 41 43 42 58 50 51 45 59 49 52 47 53 36 40 35 58 57 59 55 56 54 60 51 52 50 53 48 49 47 61 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 62 27 28 26 29 5 20 18 30 1 23 1...
result:
ok 124 numbers
Test #103:
score: 0
Accepted
time: 8ms
memory: 8620kb
input:
62 781040998211635600 84997618882021619
output:
1 2 6 3 5 4 14 7 9 8 13 10 12 11 30 15 17 16 21 18 20 19 29 22 24 23 28 25 27 26 62 31 33 32 45 39 44 40 59 42 43 35 57 50 51 47 61 36 52 38 58 48 56 41 60 53 54 49 55 37 46 34 58 57 59 55 56 54 60 51 52 50 53 48 49 47 61 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 62 27 28 26 29 20 23 3 30 6 18 4...
result:
ok 124 numbers
Test #104:
score: 0
Accepted
time: 6ms
memory: 8676kb
input:
63 1000000000000000000 1000000000000000000
output:
1 3 2 7 4 6 5 15 8 10 9 14 11 13 12 31 16 18 17 22 19 21 20 30 23 25 24 29 26 28 27 63 32 34 33 47 38 40 39 61 35 55 49 58 45 57 56 62 42 44 43 59 51 52 46 60 50 53 48 54 37 41 36 58 59 57 60 55 56 54 61 51 52 50 53 48 49 47 62 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 63 27 28 26 29 5 20 18 30 ...
result:
ok 126 numbers
Test #105:
score: 0
Accepted
time: 4ms
memory: 8668kb
input:
63 54119719055945188 920610081543965052
output:
1 3 2 7 4 6 5 15 8 10 9 14 11 13 12 31 16 18 17 22 19 21 20 30 23 25 24 29 26 28 27 63 32 34 33 41 38 40 35 61 45 46 43 57 37 54 44 62 36 51 47 59 52 58 55 60 49 53 42 56 48 50 39 58 59 57 60 55 56 54 61 51 52 50 53 48 49 47 62 43 44 42 45 40 41 39 46 36 37 35 38 33 34 32 63 27 28 26 29 6 20 16 30 ...
result:
ok 126 numbers
Test #106:
score: 0
Accepted
time: 5ms
memory: 8660kb
input:
64 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 48 39 41 40 62 36 56 50 59 46 58 57 63 43 45 44 60 52 53 47 61 51 54 49 55 38 42 37 59 60 58 61 56 57 55 62 52 53 51 54 49 50 48 63 44 45 43 46 41 42 40 47 37 38 36 39 34 35 33 64 28 29 27 30 25 26 8 ...
result:
ok 128 numbers
Test #107:
score: 0
Accepted
time: 4ms
memory: 8732kb
input:
64 550570468165095991 756222544205908484
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 46 43 44 38 56 37 50 41 52 36 51 48 63 53 60 54 61 40 59 55 62 47 57 49 58 39 45 42 59 60 58 61 56 57 55 62 52 53 51 54 49 50 48 63 44 45 43 46 41 42 40 47 37 38 36 39 34 35 33 64 28 29 27 30 25 26 12...
result:
ok 128 numbers
Test #108:
score: 0
Accepted
time: 8ms
memory: 8676kb
input:
65 1000000000000000000 1000000000000000000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 65 33 34 36 35 49 40 42 41 63 37 57 51 60 47 59 58 64 44 46 45 61 53 54 48 62 52 55 50 56 39 43 38 60 61 59 62 57 58 56 63 53 54 52 55 50 51 49 64 45 46 44 47 42 43 41 48 38 39 37 40 35 36 34 65 29 30 28 31 26 27...
result:
ok 130 numbers
Test #109:
score: 0
Accepted
time: 10ms
memory: 8620kb
input:
65 823649189009405578 591835006867851916
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 65 33 34 36 35 48 44 47 37 63 56 59 58 60 51 54 39 64 38 49 40 57 43 55 42 62 46 53 52 61 45 50 41 60 61 59 62 57 58 56 63 53 54 52 55 50 51 49 64 45 46 44 47 42 43 41 48 38 39 37 40 35 36 34 65 29 30 28 31 26 27...
result:
ok 130 numbers
Test #110:
score: 0
Accepted
time: 3ms
memory: 8660kb
input:
4 3 4
output:
1 4 2 3 3 1 4 2
result:
ok 8 numbers
Test #111:
score: 0
Accepted
time: 3ms
memory: 8616kb
input:
4 12 12
output:
3 4 2 1 1 2 4 3
result:
ok 8 numbers
Test #112:
score: 0
Accepted
time: 7ms
memory: 8672kb
input:
5 6 33
output:
1 4 2 5 3 1 4 5 2 3
result:
ok 10 numbers
Test #113:
score: 0
Accepted
time: 3ms
memory: 8696kb
input:
5 38 37
output:
4 3 5 2 1 1 3 5 2 4
result:
ok 10 numbers
Test #114:
score: 0
Accepted
time: 3ms
memory: 8616kb
input:
6 21 12
output:
2 1 6 3 5 4 4 5 3 6 1 2
result:
ok 12 numbers
Test #115:
score: 0
Accepted
time: 7ms
memory: 8620kb
input:
6 81 78
output:
-1 1 3 2 6 4 5
result:
ok 7 numbers
Test #116:
score: 0
Accepted
time: 7ms
memory: 8624kb
input:
7 44 67
output:
3 4 2 7 5 6 1 1 6 2 7 4 5 3
result:
ok 14 numbers
Test #117:
score: 0
Accepted
time: 0ms
memory: 8672kb
input:
7 77 81
output:
5 6 3 7 1 4 2 -1
result:
ok 8 numbers
Test #118:
score: 0
Accepted
time: 3ms
memory: 8616kb
input:
8 742 1483
output:
3 4 2 8 5 6 7 1 1 6 4 2 8 5 7 3
result:
ok 16 numbers
Test #119:
score: 0
Accepted
time: 7ms
memory: 8632kb
input:
8 1680 1679
output:
6 7 5 8 3 4 2 1 1 2 4 3 8 6 7 5
result:
ok 16 numbers
Test #120:
score: 0
Accepted
time: 0ms
memory: 8664kb
input:
9 7823 23407
output:
3 5 7 2 9 6 1 8 4 -1
result:
ok 10 numbers
Test #121:
score: 0
Accepted
time: 7ms
memory: 8656kb
input:
9 19038 19039
output:
7 8 6 9 4 3 5 2 1 1 2 4 3 9 5 7 8 6
result:
ok 18 numbers
Test #122:
score: 0
Accepted
time: 7ms
memory: 8696kb
input:
10 88137 71300
output:
4 9 6 2 10 5 3 8 1 7 4 6 2 5 10 1 7 9 8 3
result:
ok 20 numbers
Test #123:
score: 0
Accepted
time: 3ms
memory: 8732kb
input:
10 147838 147840
output:
8 9 7 10 5 3 6 2 4 1 1 2 4 3 10 5 6 9 7 8
result:
ok 20 numbers
Test #124:
score: 0
Accepted
time: 0ms
memory: 8616kb
input:
11 500999 976865
output:
5 6 1 10 2 8 3 11 4 9 7 -1
result:
ok 12 numbers
Test #125:
score: 0
Accepted
time: 7ms
memory: 8628kb
input:
11 844799 844802
output:
9 10 8 11 5 6 4 7 1 3 2 -1
result:
ok 12 numbers
Test #126:
score: 0
Accepted
time: 0ms
memory: 8672kb
input:
12 1481085 4208914
output:
4 3 10 2 5 1 12 6 8 11 9 7 -1
result:
ok 13 numbers
Test #127:
score: 0
Accepted
time: 7ms
memory: 8636kb
input:
12 3590397 3590402
output:
10 11 9 8 12 5 6 3 7 1 4 2 -1
result:
ok 13 numbers
Test #128:
score: 0
Accepted
time: 7ms
memory: 8612kb
input:
13 13128300 7093900
output:
-1 3 10 2 12 1 11 9 13 5 8 4 7 6
result:
ok 14 numbers
Test #129:
score: 0
Accepted
time: 7ms
memory: 8736kb
input:
13 10982400 10982399
output:
11 12 9 10 8 13 5 6 4 7 2 3 1 1 2 5 3 4 13 6 8 7 12 10 11 9
result:
ok 26 numbers
Test #130:
score: 0
Accepted
time: 7ms
memory: 8692kb
input:
14 21649632 23249635
output:
11 12 6 13 5 1 14 3 8 7 10 4 9 2 -1
result:
ok 15 numbers
Test #131:
score: 0
Accepted
time: 3ms
memory: 8664kb
input:
14 21964798 21964801
output:
12 11 13 9 10 8 14 5 6 3 7 2 4 1 -1
result:
ok 15 numbers
Test #132:
score: 0
Accepted
time: 7ms
memory: 8620kb
input:
15 13637410 16693144
output:
6 8 4 12 9 10 3 15 5 11 7 14 2 13 1 2 12 11 14 5 13 6 15 4 9 8 10 1 7 3
result:
ok 30 numbers
Test #133:
score: 0
Accepted
time: 8ms
memory: 8664kb
input:
15 21964800 21964800
output:
12 13 11 14 9 10 8 15 5 6 4 7 2 3 1 1 3 2 7 4 6 5 15 8 10 9 14 11 13 12
result:
ok 30 numbers
Test #134:
score: 0
Accepted
time: 7ms
memory: 8672kb
input:
16 2116113626 480332813
output:
-1 7 13 10 14 2 6 12 8 16 5 11 3 15 4 9 1
result:
ok 17 numbers
Test #135:
score: 0
Accepted
time: 3ms
memory: 8676kb
input:
16 1729728000 1729727998
output:
13 14 12 15 10 11 9 16 6 7 5 8 3 4 2 1 1 2 4 3 8 5 7 6 16 9 12 10 15 11 14 13
result:
ok 32 numbers
Test #136:
score: 0
Accepted
time: 3ms
memory: 8696kb
input:
17 61448680459 63697469831
output:
10 12 13 2 16 6 11 4 7 17 8 9 1 15 3 14 5 2 3 1 15 6 9 5 17 10 7 12 4 11 16 13 14 8
result:
ok 34 numbers
Test #137:
score: 0
Accepted
time: 7ms
memory: 8612kb
input:
17 71175103999 71175104001
output:
14 15 13 16 11 12 10 17 7 8 6 9 4 5 1 3 2 -1
result:
ok 18 numbers
Test #138:
score: 0
Accepted
time: 3ms
memory: 8676kb
input:
18 1800888941091 1301439923651
output:
11 15 10 8 17 4 16 9 18 1 7 13 2 3 14 5 12 6 4 14 1 16 12 8 15 2 13 11 18 5 9 6 17 7 10 3
result:
ok 36 numbers
Test #139:
score: 0
Accepted
time: 3ms
memory: 8620kb
input:
18 2015248435198 2015248435201
output:
15 16 14 17 12 13 11 18 8 9 7 10 5 3 6 2 4 1 -1
result:
ok 19 numbers
Test #140:
score: 0
Accepted
time: 7ms
memory: 8660kb
input:
19 11794830056134 17670348826098
output:
4 3 15 11 7 17 1 8 6 19 12 16 13 18 10 2 14 9 5 8 1 11 5 18 3 10 12 9 7 19 2 14 13 17 15 4 16 6
result:
ok 38 numbers
Test #141:
score: 0
Accepted
time: 4ms
memory: 8612kb
input:
19 43663840563202 43663840563199
output:
-1 1 2 4 3 8 5 7 6 19 9 10 12 11 18 13 14 17 16 15
result:
ok 20 numbers
Test #142:
score: 0
Accepted
time: 7ms
memory: 8696kb
input:
20 410635252089580 51822920104791
output:
7 14 5 19 15 8 18 11 13 10 20 3 12 2 1 17 4 9 16 6 14 11 16 9 18 3 12 8 15 1 20 13 6 17 4 19 2 7 10 5
result:
ok 40 numbers
Test #143:
score: 0
Accepted
time: 7ms
memory: 8564kb
input:
20 763552502169602 763552502169602
output:
-1 -1
result:
ok 2 number(s): "-1 -1"
Test #144:
score: 0
Accepted
time: 8ms
memory: 8616kb
input:
21 5853385131713636 10455056956103738
output:
7 18 5 13 6 20 15 11 19 17 16 21 8 12 3 10 14 4 2 9 1 1 15 4 18 10 12 11 16 6 21 3 17 2 14 8 20 9 5 19 7 13
result:
ok 42 numbers
Test #145:
score: 0
Accepted
time: 4ms
memory: 8676kb
input:
21 11097307357593598 11097307357593599
output:
18 19 17 20 15 16 14 21 11 12 9 10 8 13 5 6 3 7 2 4 1 1 2 4 3 8 5 7 6 21 9 10 12 11 20 13 15 14 19 17 18 16
result:
ok 42 numbers
Test #146:
score: 0
Accepted
time: 4ms
memory: 8624kb
input:
22 56829646874130118 15004223689160141
output:
6 15 3 13 21 7 8 4 19 12 10 22 1 17 14 18 11 20 9 5 16 2 14 17 4 20 2 12 13 11 9 22 6 10 8 18 15 3 21 7 16 5 19 1
result:
ok 44 numbers
Test #147:
score: 0
Accepted
time: 8ms
memory: 8624kb
input:
22 136209525264384001 136209525264384000
output:
-1 1 2 4 3 8 5 7 6 22 9 10 13 11 12 21 14 16 15 20 17 19 18
result:
ok 23 numbers
Test #148:
score: 0
Accepted
time: 3ms
memory: 8628kb
input:
40 993786706455628800 1
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 40 27 28 37 36 38 34 35 33 39 30 29 31 25 26 24 32 21 22 20 23 18 19 17 36 37 35 38 33 34 32 39 29 30 28 31 26 27 25 40 21 22 20 23 18 19 17 16 24 12 13 11 14 9 10 8 15 5 6 4 7 2 3 1
result:
ok 80 numbers
Test #149:
score: 0
Accepted
time: 4ms
memory: 8676kb
input:
40 993786706455628800 967203704529920000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 40 27 28 37 36 38 34 35 33 39 30 29 31 25 26 24 32 21 22 20 23 18 19 17 36 37 35 38 33 34 32 39 29 30 28 31 26 27 25 40 17 1 18 2 3 19 4 5 7 6 24 8 9 12 10 11 23 13 15 14 22 16 21 20
result:
ok 80 numbers
Test #150:
score: 0
Accepted
time: 7ms
memory: 10068kb
input:
40 993786706455628801 967203704529920001
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 40 27 29 17 18 30 19 20 22 21 39 23 24 28 25 26 38 31 33 32 37 34 36 35 36 37 35 38 33 34 32 39 29 30 28 31 26 27 25 40 16 22 21 23 19 20 18 17 24 12 13 11 14 9 10 8 15 5 6 4 7 2 3 1
result:
ok 80 numbers
Test #151:
score: 0
Accepted
time: 12ms
memory: 10532kb
input:
65544 993786706455628800 967203704529920000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 131088 numbers
Test #152:
score: 0
Accepted
time: 15ms
memory: 9212kb
input:
65540 993786706455628800 967203704529920000
output:
1 2 4 3 8 5 7 6 16 9 11 10 15 12 14 13 32 17 19 18 23 20 22 21 31 24 26 25 30 27 29 28 64 33 35 34 39 36 38 37 47 40 42 41 46 43 45 44 63 48 50 49 54 51 53 52 62 55 57 56 61 58 60 59 128 65 67 66 71 68 70 69 79 72 74 73 78 75 77 76 95 80 82 81 86 83 85 84 94 87 89 88 93 90 92 91 127 96 98 97 102 99 ...
result:
ok 131080 numbers