QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#743734 | #9603. String Master | TheZone | AC ✓ | 171ms | 4072kb | C++20 | 4.9kb | 2024-11-13 19:53:56 | 2024-11-13 19:54:03 |
Judging History
answer
#include<bits/stdc++.h>
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
#define pii pair<ll,ll>
#define rep(i,a,b) for(ll i=(a);i<=(b);++i)
#define per(i,a,b) for(ll i=(a);i>=(b);--i)
using namespace std;
bool Mbe;
ll read(){
ll x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
void write(ll x){
if(x<0)putchar('-'),x=-x;
if(x>9)write(x/10);
putchar(x%10+'0');
}
const ll N=1e6+9;
ll T,n,L,R;
ll Getnum(ll n){
ll i=1;
while(n){
ll s=(1ll<<i);
if(i>1)s-=(1ll<<(i-1));
if(n>s*i)n-=s*i,i++;
else break;
}
ll st=(i==1?0ll:(1ll<<(i-1)));
ll cnt=(n-1)/i;
st=st+cnt;
return st;
}
bool Get(ll n){
ll i=1;
while(n){
ll s=(1ll<<i);
if(i>1)s-=(1ll<<(i-1));
if(n>s*i)n-=s*i,i++;
else break;
}
ll st=(i==1?0ll:(1ll<<(i-1)));
ll cnt=(n-1)/i;
st=st+cnt;
n-=cnt*i;
return (st>>(i-n))&1;
}
ll Getstart(ll n){
ll i=1,pos=0;
while(n){
ll s=(1ll<<i);
if(i>1)s-=(1ll<<(i-1));
if(n>s)n-=s,pos+=s*i,i++;
else break;
}
return pos+n*i+1;
}
ll Mg(ll x,ll y){
ll rx=x,ry=y;
rep(i,0,n-1){
bool px=Get(x),py=Get(y);
if(px>py)return rx;
if(px<py)return ry;
x++,y++;
}
return rx;
}
bool Intersect(ll l,ll r,ll ql,ll qr){
if(l>qr||r<ql)return 0;
return 1;
}
bool Intersect2(ll l,ll r,ll u,ll a,ll b){
l=max(l,u),r=min(r,u+(1ll<<b)*((1ll<<(a-b+1))-1));
if(l>r)return 0;
l-=u,r-=u;
l=(l+(1ll<<b)-1)>>b;
r>>=b;
return l<=r;
}
bool Intersect3(ll l,ll r,ll u,ll a,ll b,ll c){
l=max(l,u),r=min(r,u+(1ll<<b)*((1ll<<(a-b+1))-1)+(1ll<<c)-1);
if(l>r)return 0;
l-=u,r-=u;
ll tl=l>>b;
ll tr=r>>b;
if(tl<tr)return 1;
return (l&((1ll<<b)-1))<=(1ll<<c)-1;
}
void solve(){
L=read(),R=read(),n=read();
if(R-n+1-L+1<=60){
ll bst=L;
rep(i,L+1,R-n+1)bst=Mg(bst,i);
rep(i,0,n-1)write(Get(bst+i));
putchar('\n');
return ;
}
ll pl=Getnum(L);
vector<ll>valid;
rep(i,L,min(R-n+1,L+56))valid.push_back(i);
rep(i,max(L,R-n+1-56),R-n+1)valid.push_back(i);
ll pr=Getnum(R-n+1);
if(Getstart(pr+1)-1>R-n+1)pr--;
rep(i,2,55){
ll cur=0;
per(k,i-1,0){
ll ncur=((cur<<1ll)|1ll)<<k;
if(Intersect(pl,pr,ncur,ncur+(1ll<<k)-1))cur=(cur<<1ll)|1ll;
else cur=(cur<<1ll);
}
ll st=Getstart(cur);
if(st>=L&&st<=R-n+1)valid.push_back(st);
rep(j,0,i-3){
ll cur=0;
per(k,j,0){
ll ncur=((cur<<1ll)|1ll)<<k;
if(Intersect3(pl,pr,(1ll<<(i-1))+ncur,i-2,j+2,k))cur=(cur<<1ll)|1ll;
else cur=(cur<<1ll);
}
cur|=(1ll<<(i-1));
per(k,i-2,j+2){
ll ncur=cur|(1ll<<k);
if(k==j+2){
if(Intersect(pl,pr,ncur,ncur))cur|=(1ll<<k);
}
else {
if(Intersect2(pl,pr,ncur,k-1,j+2))cur|=(1ll<<k);
}
}
ll st=Getstart(cur)+(i-j-1);
if(st>=L&&st<=R-n+1)valid.push_back(st);
}
}
sort(valid.begin(),valid.end());
valid.resize(unique(valid.begin(),valid.end())-valid.begin());
ll bst=valid[0];
rep(i,1,(ll)valid.size()-1)bst=Mg(bst,valid[i]);
rep(i,0,n-1)write(Get(bst+i));
putchar('\n');
}
bool Med;
int main(){
cerr<<fabs(&Med-&Mbe)/1048576.0<<"MB\n";
T=read();
while(T--)solve();
cerr<<"\n"<<clock()*1.0/CLOCKS_PER_SEC*1000<<"ms\n";
return 0;
}
/*#include<bits/stdc++.h>
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
#define pii pair<ll,ll>
#define rep(i,a,b) for(ll i=(a);i<=(b);++i)
#define per(i,a,b) for(ll i=(a);i>=(b);--i)
using namespace std;
bool Mbe;
ll read(){
ll x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
void write(ll x){
if(x<0)putchar('-'),x=-x;
if(x>9)write(x/10);
putchar(x%10+'0');
}
const ll N=1e6+9;
ll T,n,L,R;
ll Getnum(ll n){
ll i=1;
while(n){
ll s=(1ll<<i);
if(i>1)s-=(1ll<<(i-1));
if(n>s*i)n-=s*i,i++;
else break;
}
ll st=(i==1?0ll:(1ll<<(i-1)));
ll cnt=(n-1)/i;
st=st+cnt;
return st;
}
bool Get(ll n){
ll i=1;
while(n){
ll s=(1ll<<i);
if(i>1)s-=(1ll<<(i-1));
if(n>s*i)n-=s*i,i++;
else break;
}
ll st=(i==1?0ll:(1ll<<(i-1)));
ll cnt=(n-1)/i;
st=st+cnt;
n-=cnt*i;
return (st>>(i-n))&1;
}
ll Getstart(ll n){
ll i=1,pos=0;
while(n){*/
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 4000kb
input:
6 6 13 3 1 9 9 1 1451419198 10 987 6543 21 1123 581321 34 1000010 1000030 18
output:
110 011011100 1111111111 111111111100000000010 1111111111111111000000000000000100 000111110011010000
result:
ok 6 lines
Test #2:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
100 55 80 12 28 88 49 68 81 10 20 96 7 58 68 9 29 41 12 37 81 25 28 28 1 32 55 12 30 42 10 49 75 19 13 80 30 19 66 13 59 97 30 89 99 9 27 40 6 29 79 41 23 45 20 15 82 25 23 46 5 51 89 19 8 31 2 79 79 1 75 75 1 32 53 5 19 58 14 17 32 12 26 79 19 23 26 1 81 91 1 52 61 8 53 93 5 5 90 43 20 85 56 25 49 ...
output:
111010010101 1111001101111011111000010001100101001110100101011 1110100101 1111100 110010100 101011110011 1111100001000110010100111 0 111101111100 1111001101 1110000100011001010 111110000100011001010011101001 1111100001000 110010100111010010101101101011 111100011 111100 111100110111101111100001000110...
result:
ok 100 lines
Test #3:
score: 0
Accepted
time: 1ms
memory: 3900kb
input:
100 5 93 76 21 85 5 11 34 18 7 9 3 14 52 17 49 65 11 60 91 25 73 87 9 66 79 2 11 21 5 23 56 19 21 22 2 62 98 23 17 53 27 5 46 22 4 76 4 84 95 8 81 91 6 13 54 5 12 20 2 9 90 10 74 99 18 68 88 16 4 75 30 18 55 37 17 24 6 39 91 48 9 27 7 7 44 13 13 41 3 9 28 18 60 95 3 5 98 41 75 82 4 12 49 1 31 81 4 2...
output:
1111000100110101011110011011110111110000100011001010011101001010110110101111 11111 111100010011010101 100 11110011011110111 11100001000 1100101001110100101011011 101101101 11 11110 1111001101111011111 00 11101001010110110101111 111000100110101011110011011 1111000100110101011110 1111 11111000 110101 ...
result:
ok 100 lines
Test #4:
score: 0
Accepted
time: 1ms
memory: 3960kb
input:
100 62 88 14 58 84 8 6 67 24 52 77 11 4 19 3 27 98 9 63 92 25 8 35 23 63 97 9 37 50 2 10 33 1 85 91 3 8 73 55 31 76 9 15 41 19 40 42 3 30 83 26 42 91 30 50 70 5 17 37 11 36 83 16 5 77 8 27 66 30 9 43 8 52 81 11 29 79 19 1 46 12 79 93 4 53 56 1 11 12 2 13 59 39 32 35 3 10 63 15 70 76 7 15 94 51 55 76...
output:
11101001010110 11101001 111101111100001000110010 11001010011 111 111110001 1010011101001010110110101 11101111000100110101011 111110001 11 1 111 1111000100110101011110011011110111110000100011001010011 111110000 1111000100110101011 101 11111000010001100101001110 111110000100011001010011101001 11001 11...
result:
ok 100 lines
Test #5:
score: 0
Accepted
time: 2ms
memory: 3864kb
input:
100 20 66 29 41 97 8 58 75 6 31 75 39 10 27 5 60 81 15 36 64 13 50 97 15 54 71 18 50 98 44 6 24 17 82 96 6 8 88 61 55 100 9 46 50 3 22 98 41 1 10 8 40 44 5 57 82 25 29 56 25 45 49 4 51 69 8 66 66 1 12 79 50 32 51 1 2 65 54 18 59 28 15 100 39 1 6 3 61 75 11 9 35 8 12 63 31 22 79 21 3 88 4 12 98 18 23...
output:
11110011011110111110000100011 11111000 111010 111100110111101111100001000110010100111 11110 110010100111010 1111100001000 111010010101101 001000110010100111 11000010001100101001110100101011011010111110 11001011101111000 111110 1111000100110101011110011011110111110000100011001010011101001 111110001 1...
result:
ok 100 lines
Test #6:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
100 16 50 8 6 17 2 11 85 24 12 45 5 5 56 43 3 90 81 5 61 4 67 91 4 3 43 15 37 39 2 88 97 1 22 80 37 75 85 11 39 91 7 7 65 6 51 77 3 15 75 9 51 99 12 2 87 49 34 80 7 86 99 12 30 38 2 23 96 16 19 37 6 42 49 1 75 96 10 33 43 2 33 77 19 28 41 1 37 41 1 33 40 2 10 66 45 4 20 1 24 82 42 4 51 3 6 10 4 68 7...
output:
11110111 11 111110000100011001010011 11110 1110111100010011010101111001101111011111000 111001011101111000100110101011110011011110111110000100011001010011101001010110110 1111 1111 111100010011010 01 1 1111011111000010001100101001110100101 01010110110 1111100 111110 111 111110000 111110001100 11110011...
result:
ok 100 lines
Test #7:
score: 0
Accepted
time: 1ms
memory: 3932kb
input:
100 41 89 1 31 40 10 27 88 24 26 75 9 12 72 7 59 82 9 39 100 33 4 48 9 15 99 19 46 72 11 26 60 21 1 30 6 30 87 1 60 85 17 21 29 1 18 44 3 62 98 16 63 69 5 21 39 9 72 84 6 24 41 16 11 55 20 3 20 10 38 41 2 11 57 4 44 90 15 15 25 2 2 93 7 6 64 13 12 97 8 13 47 33 66 84 7 40 49 3 25 98 40 11 46 27 55 8...
output:
1 1011110011 111110000100011001010011 111110000 1111100 111010010 111110000100011001010011101001010 111100110 1111100001000110010 11111000010 111100110111101111100 111100 1 11101001010110110 1 111 1110100101011011 10100 110101011 101101 1101010111100110 11110011011110111110 1110010111 11 1111 111110...
result:
ok 100 lines
Test #8:
score: 0
Accepted
time: 1ms
memory: 3832kb
input:
100 58 70 12 74 82 8 39 85 31 43 98 35 47 89 19 47 99 43 25 26 1 44 44 1 58 89 4 45 81 31 15 36 7 29 79 30 53 77 18 19 97 28 30 80 1 35 97 48 36 73 12 76 88 7 22 28 5 36 82 7 14 74 37 60 78 8 22 66 10 35 49 3 55 98 5 28 73 6 2 21 20 20 48 26 48 99 33 8 27 16 9 62 8 24 50 3 23 95 4 41 50 8 10 81 27 2...
output:
011001010011 01010110 1111100001000110010100111010010 11111000010001100101001110100101011 1111100001000110010 1111100001000110010100111010010101101101011 1 1 1110 1111100001000110010100111010010 1111000 111110000100011001010011101001 110010100111010010 1111100001000110010100111010 1 1111100001000110...
result:
ok 100 lines
Test #9:
score: 0
Accepted
time: 2ms
memory: 3776kb
input:
100 14 38 8 39 86 2 75 88 10 50 86 33 47 73 23 53 94 21 42 46 5 60 68 9 69 99 12 13 79 53 67 79 11 37 85 10 1 100 93 10 38 27 25 47 15 6 54 48 48 49 2 6 9 2 42 79 9 62 97 29 2 97 16 55 69 5 29 98 30 19 96 18 1 48 41 47 52 4 4 60 13 25 74 29 18 41 9 63 96 4 21 70 48 45 63 7 1 33 12 2 87 4 67 92 17 66...
output:
11110001 11 1011011010 110000100011001010011101001010110 11111000010001100101001 111010010101101101011 11110 110010100 111110001100 11110001001101010111100110111101111100001000110010100 11101001010 1111100001 1110010111011110001001101010111100110111101111100001000110010100111010010101101101011111000...
result:
ok 100 lines
Test #10:
score: 0
Accepted
time: 1ms
memory: 4016kb
input:
100 62 92 6 66 68 2 18 59 24 67 93 21 36 96 7 1 21 21 18 83 25 6 25 19 32 78 8 69 70 2 68 70 1 49 62 10 44 45 1 37 83 10 26 68 9 19 86 8 26 86 9 41 49 8 3 42 1 17 72 53 1 10 4 49 75 20 53 76 22 51 66 6 7 79 56 56 58 1 64 65 2 29 56 3 31 89 13 46 91 10 8 90 15 22 40 7 38 54 1 5 19 8 58 95 1 34 51 10 ...
output:
111010 10 111100110111101111100001 111010010101101101011 1111100 011011100101110111100 1111100001000110010100111 1100101110111100010 11111000 11 1 1110000100 1 1111100001 111110000 11111000 111110000 11110111 1 11100010011010101111001101111011111000010001100101001 1110 11100001000110010100 010001100...
result:
ok 100 lines
Test #11:
score: 0
Accepted
time: 22ms
memory: 3884kb
input:
100 6447 8251 563 2115 4786 2098 3622 3801 114 1260 8359 3259 1421 2501 151 2039 3537 456 5470 7445 593 1248 8144 4401 2162 3988 639 1589 6249 1365 768 9813 7555 1450 2812 1219 4042 8413 229 2069 3993 1568 2715 7641 3961 8133 9464 1164 243 9973 4456 3358 5654 221 3329 6752 2713 7231 8635 788 1898 53...
output:
111111111100000000110000000111000000101100000011110000010011000001011100000110110000011111000010001100001001110000101011000010111100001100110000110111000011101100001111110001000011000100011100010010110001001111000101001100010101110001011011000101111100011000110001100111000110101100011011110001110011...
result:
ok 100 lines
Test #12:
score: 0
Accepted
time: 22ms
memory: 4068kb
input:
100 475 1293 428 7594 9945 50 6114 6982 265 825 3154 1399 3103 8979 3956 469 3725 1440 6465 7985 1204 1516 3355 479 5795 8270 432 4811 8093 1661 278 3229 721 9684 9714 10 2042 4436 1128 6923 8219 169 59 1722 308 384 3814 1902 2260 8721 4310 152 8321 3820 424 9273 1391 7716 7847 5 3193 6504 2464 9003...
output:
111111110000000100000011000001010000011100001001000010110000110100001111000100010001001100010101000101110001100100011011000111010001111100100001001000110010010100100111001010010010101100101101001011110011000100110011001101010011011100111001001110110011110100111111010000010100001101000101010001110100...
result:
ok 100 lines
Test #13:
score: 0
Accepted
time: 21ms
memory: 3900kb
input:
100 2684 5841 1018 6107 9609 336 8566 9074 321 1331 9018 3227 1094 3062 1791 1774 7744 994 3227 7583 1786 3504 9158 3189 5469 9597 2224 4784 6167 366 4396 7261 2145 932 7331 1366 1481 3450 1363 3702 9676 3668 4545 9602 1504 7165 8823 951 4819 8172 1448 4371 5394 274 3422 8726 401 1132 7270 515 6010 ...
output:
111111111100000000010000000011000000010100000001110000001001000000101100000011010000001111000001000100000100110000010101000001011100000110010000011011000001110100000111110000100001000010001100001001010000100111000010100100001010110000101101000010111100001100010000110011000011010100001101110000111001...
result:
ok 100 lines
Test #14:
score: 0
Accepted
time: 22ms
memory: 3884kb
input:
100 997 5740 2576 952 9380 2602 760 6196 4609 656 7878 933 6917 9737 1603 5235 6534 1273 2159 2550 129 2060 8939 6399 6447 7161 604 6493 8428 654 4945 5882 441 3175 4285 832 1059 8580 2823 932 1969 93 694 4064 1841 5930 9488 2042 162 8468 1214 3608 8929 1598 5174 7079 183 1871 4853 653 6088 6664 550...
output:
111111111000000011000000111000001011000001111000010011000010111000011011000011111000100011000100111000101011000101111000110011000110111000111011000111111001000011001000111001001011001001111001010011001010111001011011001011111001100011001100111001101011001101111001110011001110111001111011001111111010...
result:
ok 100 lines
Test #15:
score: 0
Accepted
time: 22ms
memory: 3960kb
input:
100 3215 5222 744 1539 3059 1214 3106 4769 474 1878 6140 3087 2477 6324 2331 5891 9069 2204 5274 5926 609 2755 6309 2259 8095 9490 1200 5211 5320 60 1224 5118 1746 3038 7256 2070 179 5285 1660 3155 6079 693 3419 4467 183 51 151 5 8041 8104 24 2502 4468 1062 301 2440 1001 3035 6638 2501 549 6744 1692...
output:
111111111100000000010000000011000000010100000001110000001001000000101100000011010000001111000001000100000100110000010101000001011100000110010000011011000001110100000111110000100001000010001100001001010000100111000010100100001010110000101101000010111100001100010000110011000011010100001101110000111001...
result:
ok 100 lines
Test #16:
score: 0
Accepted
time: 33ms
memory: 3776kb
input:
100 458780 614681 6808 127673 305967 5250 114639 185367 74 514660 732144 3659 741866 803540 8931 190532 603402 1273 687643 728264 7545 171731 902553 879 778611 888449 7924 36853 607177 7710 312982 750821 4441 34192 204208 8166 198210 858171 4493 239637 571931 3043 158786 314678 7988 112543 667504 25...
output:
111111111111110100000000000001010000000000001101000000000001010100000000000111010000000000100101000000000010110100000000001101010000000000111101000000000100010100000000010011010000000001010101000000000101110100000000011001010000000001101101000000000111010100000000011111010000000010000101000000001000...
result:
ok 100 lines
Test #17:
score: 0
Accepted
time: 33ms
memory: 3772kb
input:
100 193329 980869 6808 309918 885528 5250 593136 936390 74 775788 792083 3659 890776 970006 8931 94758 379319 1273 222026 512513 7545 795521 994158 879 940402 955787 7924 412121 515552 7710 453909 466589 4441 139451 320550 8166 84372 413425 4493 619668 933798 3043 318586 974249 7988 300454 366306 25...
output:
111111111111111100000000001111110000000001111111000000001011111100000000111111110000000100111111000000010111111100000001101111110000000111111111000000100011111100000010011111110000001010111111000000101111111100000011001111110000001101111111000000111011111100000011111111110000010000111111000001000111...
result:
ok 100 lines
Test #18:
score: 0
Accepted
time: 42ms
memory: 3928kb
input:
100 293776614 784634619 7451 364574095 638274072 9278 470741356 813369470 2646 308016559 959109654 111 187453596 369247532 3372 615348686 919145405 4410 373688891 450911529 7025 129951483 440453872 5817 392375856 642772537 9965 358137643 592838500 7050 484997884 498123731 2204 232837116 642988137 93...
output:
111111111111111111111111100000000000000000000111110000000000000000000111111000000000000000000101111100000000000000000011111110000000000000000010011111000000000000000001011111100000000000000000110111110000000000000000011111111000000000000000010001111100000000000000001001111110000000000000000101011111...
result:
ok 100 lines
Test #19:
score: 0
Accepted
time: 44ms
memory: 3848kb
input:
100 283955431 921835740 4667 252328031 432193009 1699 425298713 536666639 1604 249793880 318454847 3503 814412736 920812391 328 56627324 693553877 8624 248454890 315682327 2762 625108823 642741184 8284 331258351 710539118 773 61193891 520864073 7062 458403951 885002509 9587 181678361 963259759 9754 ...
output:
111111111111111111111111110000000000000000000000000100000000000000000000000011000000000000000000000001010000000000000000000000011100000000000000000000001001000000000000000000000010110000000000000000000000110100000000000000000000001111000000000000000000000100010000000000000000000001001100000000000000...
result:
ok 100 lines
Test #20:
score: 0
Accepted
time: 42ms
memory: 3848kb
input:
100 291754003 601919112 6999 163873896 695276292 19 519269119 639733146 1495 253033943 578847605 9198 121845553 634670582 5214 797964996 994090398 3184 633013623 655951710 1548 473317236 867206075 7652 564216311 866765359 7753 362900359 513692983 1009 121475576 137770976 5887 634666238 937419329 901...
output:
111111111111111111111111100000000000000000000000110000000000000000000000111000000000000000000000101100000000000000000000011110000000000000000000010011000000000000000000001011100000000000000000000110110000000000000000000011111000000000000000000010001100000000000000000001001110000000000000000000101011...
result:
ok 100 lines
Test #21:
score: 0
Accepted
time: 58ms
memory: 3936kb
input:
100 159763900 726556256 10000 722097847 942243840 10000 814626256 915315768 10000 317333600 774494429 10000 988241349 999412212 10000 153435210 282269517 10000 60187972 150972969 10000 280466126 632877926 10000 414920775 540576489 10000 596089911 927717744 10000 126834844 252890198 10000 374128807 7...
output:
111111111111111111111111100000000000000000000001110000000000000000000001111000000000000000000001011100000000000000000000111110000000000000000000100111000000000000000000010111100000000000000000001101110000000000000000000111111000000000000000000100011100000000000000000010011110000000000000000001010111...
result:
ok 100 lines
Test #22:
score: 0
Accepted
time: 54ms
memory: 3776kb
input:
100 43139564 713266590 10000 516209024 974184765 10000 447273461 538700694 10000 187440388 543527074 10000 9621787 567143820 10000 333472274 857978244 10000 244031879 521365991 10000 187164193 530813814 10000 383723314 752042640 10000 902777846 986711781 10000 158495894 550987616 10000 166464187 588...
output:
111111111111111111111111100000000000000000000001110000000000000000000001111000000000000000000001011100000000000000000000111110000000000000000000100111000000000000000000010111100000000000000000001101110000000000000000000111111000000000000000000100011100000000000000000010011110000000000000000001010111...
result:
ok 100 lines
Test #23:
score: 0
Accepted
time: 54ms
memory: 3896kb
input:
100 81096200 695769249 10000 239028260 426612620 10000 103717887 828472318 10000 626551568 846653767 10000 73484315 93360857 10000 945175675 997986667 10000 360345307 599756249 10000 64931010 727723880 10000 100254811 791671087 10000 56759486 223007354 10000 92971916 235245299 10000 267350650 915331...
output:
111111111111111111111111100000000000000000000000110000000000000000000000111000000000000000000000101100000000000000000000011110000000000000000000010011000000000000000000001011100000000000000000000110110000000000000000000011111000000000000000000010001100000000000000000001001110000000000000000000101011...
result:
ok 100 lines
Test #24:
score: 0
Accepted
time: 58ms
memory: 3928kb
input:
100 552384985 697662945 10000 739968307 857162085 10000 265174779 856811381 10000 415263659 770984736 10000 649113224 662732482 10000 251579017 304237244 10000 95170269 643390342 10000 316930261 368425391 10000 484226052 820786317 10000 294963532 693312689 10000 274880233 764777015 10000 556475198 7...
output:
111111111111111111111111100000000000000000000000110000000000000000000000111000000000000000000000101100000000000000000000011110000000000000000000010011000000000000000000001011100000000000000000000110110000000000000000000011111000000000000000000010001100000000000000000001001110000000000000000000101011...
result:
ok 100 lines
Test #25:
score: 0
Accepted
time: 53ms
memory: 3904kb
input:
100 505060029 704021957 10000 76103009 838314073 10000 46529309 348564366 10000 153253440 770834065 10000 155508402 880453470 10000 659934993 749492698 10000 196181602 871475078 10000 207175604 692777640 10000 708030514 843653922 10000 8354888 795238200 10000 382943705 635653783 10000 459171721 6870...
output:
111111111111111111111111100000000000000000000001110000000000000000000001111000000000000000000001011100000000000000000000111110000000000000000000100111000000000000000000010111100000000000000000001101110000000000000000000111111000000000000000000100011100000000000000000010011110000000000000000001010111...
result:
ok 100 lines
Test #26:
score: 0
Accepted
time: 143ms
memory: 3916kb
input:
100 275658760659721026 862687304067272406 5025 400915134538129406 879234939528132711 3767 27165979666760712 666904394648958905 8319 25978224015275970 249805043108983009 2731 9039090318990056 910774273379486881 3446 347349417733578839 579813253382737352 525 60156502406252485 519547399376626773 4411 8...
output:
111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000111000000000000000000000000000000000000000000000000001111000000000000000000000000000000000000000000000000010111000000000000000000000000000000000000000000000000011111000000000000000000000000000000...
result:
ok 100 lines
Test #27:
score: 0
Accepted
time: 141ms
memory: 3860kb
input:
100 3075166339279925 75086219407136536 3851 774576453834305803 797324211915046497 9630 144756207254404150 446254178023299750 9888 377664768633234705 617749735107027334 2612 34422273590182538 283996938197971593 6085 352094108866258127 420365561483625500 6689 105052894748752480 292948907803349503 9368...
output:
111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000111000000000000000000000000000000000000000000000...
result:
ok 100 lines
Test #28:
score: 0
Accepted
time: 141ms
memory: 3860kb
input:
100 397902941465311106 474887127049735681 1495 7188613898335483 81002805628672649 1072 54357132715201804 126406458293162956 4826 21826058235898973 809400423129074039 1437 84012652431885126 976862629327141097 1319 240042360826013392 398483289262199609 618 91381692606749809 107930425681540400 8918 271...
output:
111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000111000000000000000000000000000000...
result:
ok 100 lines
Test #29:
score: 0
Accepted
time: 171ms
memory: 3904kb
input:
100 90140095629588271 458885505447306363 10000 5815840483683500 620668251405277709 10000 658352634306821575 697514087054758605 10000 642164127420707647 838109932468076182 10000 760031741026332898 797646764745973515 10000 251040418673925152 485181747258017327 10000 170808533410209421 8264555885685597...
output:
111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000001111100000000000000000000000000000000000000000000000111111000000000000000000000000000000000000000000000010111110000000000000000000000000000000000000000000000111111100000000000000000000000000000000000...
result:
ok 100 lines
Test #30:
score: 0
Accepted
time: 162ms
memory: 3896kb
input:
100 438682181700551605 490669177507763785 10000 96928709039036560 413374148963462846 10000 126199941606206606 217722502247925536 10000 262428799570259766 888147226840476334 10000 34798696876753819 62179912045719054 10000 27334078120209496 148995855043059931 10000 641806199981600035 73862558080090280...
output:
111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000111000000000000000000000000000000...
result:
ok 100 lines
Test #31:
score: 0
Accepted
time: 72ms
memory: 3780kb
input:
100 794715523713266381 794715523713313387 10000 980629715613779199 980629715613813987 10000 654840906428146837 654840906428166533 10000 842527005613745621 842527005613756000 10000 605339016916661445 605339016916691775 10000 25678883275688403 25678883275722996 10000 34500717442313204 3450071744232458...
output:
111111111110101011110000110011000110011101101100010001000000000110101011110000110011000110011101101100010001000000001110101011110000110011000110011101101100010001000000010110101011110000110011000110011101101100010001000000011110101011110000110011000110011101101100010001000000100110101011110000110011...
result:
ok 100 lines
Test #32:
score: 0
Accepted
time: 73ms
memory: 3772kb
input:
100 303590216677076828 303590216677116862 10000 838478839118935263 838478839118960855 10000 94641069899015683 94641069899058935 10000 821370885756395291 821370885756435523 10000 207843986823360310 207843986823386119 10000 863543686098591909 863543686098650394 10000 866918613725678489 866918613725752...
output:
111111111110100111101000100001000100100011111110010010000000000101001111010001000010001001000111111100100100000000011010011110100010000100010010001111111001001000000001010100111101000100001000100100011111110010010000000011101001111010001000010001001000111111100100100000001001010011110100010000100010...
result:
ok 100 lines
Test #33:
score: 0
Accepted
time: 80ms
memory: 3896kb
input:
100 417403053412301004 417403053412370642 10000 819168198999967217 819168199000013597 10000 480499674396166752 480499674396239776 10000 76574449366523892 76574449366553633 10000 600813081244200799 600813081244284890 10000 283011466088406216 283011466088579347 10000 841263305809664429 841263305809704...
output:
111111111111110010010101010100010111011011000101000110000000000011100100101010101000101110110110001010001100000000001111001001010101010001011101101100010100011000000000101110010010101010100010111011011000101000110000000001111100100101010101000101110110110001010001100000000100111001001010101010001011...
result:
ok 100 lines
Test #34:
score: 0
Accepted
time: 78ms
memory: 3888kb
input:
100 34539309385929587 34539309386012141 10000 382193329053197297 382193329053300266 10000 890627575829433364 890627575829461752 10000 240128037858400038 240128037858615761 10000 486310018339507075 486310018339921675 10000 77354014270564277 77354014270844286 10000 227435281239654842 22743528124003883...
output:
111111111111110100010001011111100010010100111010110000000000000101000100010111111000100101001110101100000000000011010001000101111110001001010011101011000000000001010100010001011111100010010100111010110000000000011101000100010111111000100101001110101100000000001001010001000101111110001001010011101011...
result:
ok 100 lines
Test #35:
score: 0
Accepted
time: 82ms
memory: 3860kb
input:
100 402137471868025241 402137471868976171 10000 189596134977498927 189596134977680211 10000 105224595846559291 105224595846714839 10000 5559731438769576 5559731438923516 10000 917633993376922562 917633993377031000 10000 268026521817030233 268026521817329475 10000 769536353482684340 76953635348277984...
output:
111111111111111111101110001111010110110100101001110010000000000000000011011100011110101101101001010011100100000000000000001110111000111101011011010010100111001000000000000000101101110001111010110110100101001110010000000000000001111011100011110101101101001010011100100000000000000100110111000111101011...
result:
ok 100 lines
Test #36:
score: 0
Accepted
time: 55ms
memory: 4072kb
input:
10 402939381663972467 402939381664050472 78006 738434937731355743 738434937731849602 100000 665736961230230895 665736961230251078 20184 626771170989926069 626771170990346557 100000 504280151848471298 504280151848775911 100000 321671389598094778 321671389598508545 100000 989492608417373804 9894926084...
output:
101110100010111100111101110011101000111100001101011111011101000101111010011011100111010001111000011010111110111010001011110101110111001110100011110000110101111101110100010111101101101110011101000111100001101011111011101000101111011111011100111010001111000011010111110111010001011111000110111001110100...
result:
ok 10 lines
Test #37:
score: 0
Accepted
time: 60ms
memory: 3964kb
input:
10 68262844195465764 68262844196447342 100000 573048541122714379 573048541122870817 100000 979298167325676819 979298167325991900 100000 706688860081497866 706688860081863810 100000 99238916139039034 99238916139915136 100000 683569137498329887 683569137499328063 100000 26816332375645944 2681633237608...
output:
111111111111111110011101001100000001111101010111101000000000000000010011101001100000001111101010111101000000000000000110011101001100000001111101010111101000000000000001010011101001100000001111101010111101000000000000001110011101001100000001111101010111101000000000000010010011101001100000001111101010...
result:
ok 10 lines
Test #38:
score: 0
Accepted
time: 59ms
memory: 3932kb
input:
10 962595366302018801 962595366302987006 100000 488826251029429416 488826251031278427 100000 338436298700201990 338436298700593520 100000 58566591184018120 58566591185198976 100000 751025584973930944 751025584975428254 100000 173997755959360819 173997755961240957 100000 499888843237445191 4998888432...
output:
111111111111111000000100000011000010000011111010000001100000000000000100000010000001100001000001111101000000110000000000000110000001000000110000100000111110100000011000000000000101000000100000011000010000011111010000001100000000000011100000010000001100001000001111101000000110000000000010010000001000...
result:
ok 10 lines
Test #39:
score: 0
Accepted
time: 61ms
memory: 4072kb
input:
10 87692304091412033 87692304092360667 100000 980224608335615546 980224608336302119 100000 684422716384238422 684422716386502399 100000 776017564125731771 776017564126703578 100000 276203661520443542 276203661521741294 100000 97668163743903610 97668163746206852 100000 116143515825538695 116143515829...
output:
111111111111111111001000011111111100110110001110011000000000000000011001000011111111100110110001110011000000000000000111001000011111111100110110001110011000000000000001011001000011111111100110110001110011000000000000001111001000011111111100110110001110011000000000000010011001000011111111100110110001...
result:
ok 10 lines
Test #40:
score: 0
Accepted
time: 62ms
memory: 3896kb
input:
10 305270820567347603 305270820567613252 100000 482530630101169811 482530630108078368 100000 916516459803502530 916516459806770369 100000 534090557332896138 534090557341475630 100000 46595801749113278 46595801753752242 100000 604765105233893745 604765105234817839 100000 121639759922078031 1216397599...
output:
111111111111101010001000100011001000101100110101101010000000000001010100010001000110010001011001101011010100000000000110101000100010001100100010110011010110101000000000010101010001000100011001000101100110101101010000000000111010100010001000110010001011001101011010100000000010010101000100010001100100...
result:
ok 10 lines
Test #41:
score: 0
Accepted
time: 56ms
memory: 3872kb
input:
1 429521396460476462 429521396461461511 985050
output:
101011001010100010110111000100001001001111010100101111010110010101000101101110001000010010011110101001101110101100101010001011011100010000100100111101010011111101011001010100010110111000100001001001111010101000111010110010101000101101110001000010010011110101010011110101100101010001011011100010000100...
result:
ok single line: '101011001010100010110111000100...0010110111000100001001110011100'
Test #42:
score: 0
Accepted
time: 59ms
memory: 4064kb
input:
1 730021325472889605 730021325474555839 1000000
output:
111111111111111100010011011011001001100111001110000001000000000000001100010011011011001001100111001110000001000000000000011100010011011011001001100111001110000001000000000000101100010011011011001001100111001110000001000000000000111100010011011011001001100111001110000001000000000001001100010011011011...
result:
ok single line: '111111111111111100010011011011...0100010000101010111000100110110'
Test #43:
score: 0
Accepted
time: 60ms
memory: 3896kb
input:
1 969817558420421489 969817558429524637 1000000
output:
111111111111111111000000111110001111000110110111001011100000000000000000100000011111000111100011011011100101110000000000000000110000001111100011110001101101110010111000000000000000101000000111110001111000110110111001011100000000000000011100000011111000111100011011011100101110000000000000010010000001...
result:
ok single line: '111111111111111111000000111110...1001000000111110001111000110110'
Test #44:
score: 0
Accepted
time: 59ms
memory: 3776kb
input:
1 864473155324197912 864473155373851819 1000000
output:
111111111111111111111111101000001111010010101011000001000000000000000000000011101000001111010010101011000001000000000000000000000111101000001111010010101011000001000000000000000000001011101000001111010010101011000001000000000000000000001111101000001111010010101011000001000000000000000000010011101000...
result:
ok single line: '111111111111111111111111101000...0010000000100100001010101111010'
Test #45:
score: 0
Accepted
time: 62ms
memory: 3856kb
input:
1 247548131611605131 247548131626424074 1000000
output:
111111111111111111111100010011001010001111100001100110000000000000000000001000100110010100011111000011001100000000000000000000110001001100101000111110000110011000000000000000000010100010011001010001111100001100110000000000000000000111000100110010100011111000011001100000000000000000010010001001100101...
result:
ok single line: '111111111111111111111100010011...0101000100110010100011111000011'
Extra Test:
score: 0
Extra Test Passed