QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#100259 | #4920. 挑战分解质因数 | lingchen | 30 | 27ms | 3568kb | C++14 | 7.4kb | 2023-04-25 11:23:54 | 2023-04-25 11:23:58 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define __builtin_ia32_adc(x,y,flag) __asm__("addb %3, %0\n\t" "adcq %2, %1\n\t" "setc %0":"+r"(flag),"+r"(x):"r"(y),"i"(-1):"cc")
struct bigint{// made by dengyaotriangle!
typedef unsigned long long u64;
typedef unsigned __int128 u128;
typedef std::size_t st;
std::vector<u64> data;
bigint(){}
bigint(u64 x):data(x?std::vector<u64>{x}:std::vector<u64>{}){}
bigint(const std::string &s){
st pos=s.length();
int cnt=0;
u64 val=0;
while(pos){
pos--;
if(cnt==64){
data.push_back(val);
val=0;cnt=0;
}
val|=(u64)(s[pos]=='1')<<cnt;
++cnt;
}
if(cnt&&val)data.push_back(val);
}
explicit operator std::string()const{
if(data.empty())return "0";
bool t=0;
std::string ret;
for(int i=63;i>=0;i--){
t|=(data.back()>>i)&1;
if(t)ret+='0'|((data.back()>>i)&1);
}
st i=data.size()-1;
while(i){
i--;
for(int j=63;j>=0;j--)ret+='0'|((data[i]>>j)&1);
}
return ret;
}
explicit operator bool()const{return !data.empty();}
explicit operator u64()const{return data.empty()?0:data[0];}
st digit()const{
if(data.empty())return 0;
return (data.size()<<6)-__builtin_clzll(data.back());
}
bool odd()const{return !data.empty()&&(data[0]&1);}
bool operator==(const bigint &a)const{return a.data==data;}
bool operator!=(const bigint &a)const{return a.data!=data;}
bool operator<(const bigint &a)const{
if(data.size()!=a.data.size())return data.size()<a.data.size();
for(st i=data.size();i;){
i--;
if(data[i]!=a.data[i])return data[i]<a.data[i];
}
return 0;
}
bool operator>(const bigint &a)const{return a<(*this);}
bool operator<=(const bigint &a)const{return !(*this>a);}
bool operator>=(const bigint &a)const{return !(*this<a);}
bigint &operator<<=(st n){
if(data.empty())return *this;
int w=n&63;st z=n>>6;
st i=data.size();
bool flg=0;
if(w&&(data.back()>>(64-w)))data.push_back(0),flg=1;
data.resize(data.size()+z);
while(i){
i--;
if(flg)data[i+z+1]|=data[i]>>(64-w);
data[i+z]=data[i]<<w;
flg|=bool(w);
}
for(st i=0;i<z;i++)data[i]=0;
return *this;
}
bigint &operator>>=(st n){
int w=n&63;st z=n>>6,i=0;
for(;i+z<data.size();i++){
if(w&&i)data[i-1]|=data[i+z]<<(64-w);
data[i]=data[i+z]>>w;
}
while(data.size()>i)data.pop_back();
while(!data.empty()&&data.back()==0)data.pop_back();
return *this;
}
bigint operator<<(st n)const{return bigint(*this)<<=n;}
bigint operator>>(st n)const{return bigint(*this)>>=n;}
bigint &operator+=(const bigint &a){
data.resize(std::max(data.size(),a.data.size()));
bool carry=0;
for(st i=0;i<data.size();i++){
u64 rg=0;
if(i<a.data.size())rg=a.data[i];
__builtin_ia32_adc(data[i],rg,carry);
}
if(carry)data.push_back(1);
return *this;
}
bigint &operator-=(const bigint &a){
bool carry=1;
for(st i=0;i<data.size();i++){
u64 rg=-1;
if(i<a.data.size())rg=~a.data[i];
__builtin_ia32_adc(data[i],rg,carry);
}
while(!data.empty()&&data.back()==0)data.pop_back();
return *this;
}
bigint &operator++(){return *this+=bigint(1);}
bigint &operator--(){return *this-=bigint(1);}
bigint operator++(int){bigint tmp=*this;++*this;return tmp;}
bigint operator--(int){bigint tmp=*this;--*this;return tmp;}
bigint &operator*=(const bigint &a){
std::vector<u64> ret(data.size()+a.data.size());
for(st i=0;i<data.size();i++){
u64 carry=0;bool wcarry=0;
st k=i;
for(st j=0;j<a.data.size();j++,k++){
u128 r=data[i]*(u128)a.data[j]+carry;
u64 cur=r;
carry=r>>64;
__builtin_ia32_adc(ret[k],cur,wcarry);
}
while(carry||wcarry){
__builtin_ia32_adc(ret[k],carry,wcarry);
carry=0;k++;
}
}
while(!ret.empty()&&ret.back()==0)ret.pop_back();
data=ret;
return *this;
}
bigint &operator/=(const bigint &a){
if(a.digit()>digit()){
data.clear();
return *this;
}
st z=digit()-a.digit();
std::vector<u64> ret;
while(1){
bigint tmp=a<<z;
if(tmp<=*this){
*this-=tmp;
st v1=z>>6;
if(ret.size()<=v1)ret.resize(v1+1);
ret[v1]|=(u64)(1)<<(z&63);
}
if(!z)break;
z--;
}
data=ret;
return *this;
}
bigint &operator%=(const bigint &a){
if(a.digit()>digit())return *this;
st z=digit()-a.digit();
while(1){
bigint tmp=a<<z;
if(tmp<=*this)*this-=tmp;
if(!z)break;
z--;
}
return *this;
}
bigint operator+(const bigint &a)const{return bigint(*this)+=a;}
bigint operator-(const bigint &a)const{return bigint(*this)-=a;}
bigint operator*(const bigint &a)const{return bigint(*this)*=a;}
bigint operator/(const bigint &a)const{return bigint(*this)/=a;}
bigint operator%(const bigint &a)const{return bigint(*this)%=a;}
};
std::istream &operator>>(std::istream &st,bigint &a){
std::string s;st>>s;a=bigint(s);return st;
}
std::ostream &operator<<(std::ostream &st,const bigint &a){
return st<<(std::string)(a);
}
vector<bigint> ans;
vector<bigint> v;
mt19937 mt((random_device())());
bigint n,phi;
bigint bp,bc;
int blen;
void setMod(bigint p)
{
if(p==bp) return;
bp=p;
blen=p.digit()*2;
bc=((bigint)1<<blen)/p;
}
bigint reduce(bigint x)
{
x-=((x*bc)>>blen)*bp;
while(x>=bp)
x-=bp;
return x;
}
bigint qpow(bigint a, bigint b)
{
bigint ans=1;
for(; b; b>>=1,a=reduce(a*a))
if(b.odd()) ans=reduce(ans*a);
return ans;
}
void solve(bigint n)
{
setMod(n);
for(int T=0; T<10; T++)
{
bigint a=mt(),g=__gcd(n, a);
a%=n;
if(g==n) continue;
if(g!=1) { solve(g); solve(n/g); return; }
bigint r=phi;
while(!r.odd()) r>>=1;
bigint val=qpow(a, r);
while(1)
{
bigint tmp=reduce(val*val);
if(tmp==1)
{
g=__gcd(val-1, n);
if(g!=1&&g<n) { solve(g); solve(n/g); return; }
break;
}
val=tmp;
}
}
v.push_back(n);
}
int main()
{
cin>>n>>phi;
while(n!=1)
{
bigint tmp=n/__gcd(n, phi);
v.clear(); solve(tmp);
for(bigint& x : v)
{
ans.push_back(x); n/=x; phi/=x-1;
while(n%x==0) ans.push_back(x), n/=x, phi/=x;
}
}
sort(ans.begin(), ans.end());
cout<<ans.size()<<"\n";
for(bigint& x : ans)
cout<<x<<"\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 2ms
memory: 3504kb
input:
1 1
output:
0
result:
ok "0"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
1000001010000010011000000000001 1000001010000000000000000000000
output:
2 100100000000001 1110100000000001
result:
ok 3 tokens
Test #3:
score: 0
Accepted
time: 3ms
memory: 3500kb
input:
100011100111101010100110101011 100011100111011001010101000000
output:
2 10011001001011 1110111000100001
result:
ok 3 tokens
Test #4:
score: 0
Accepted
time: 2ms
memory: 3396kb
input:
10001001101010010000101100001111 10001001101001111001001011011000
output:
2 1011000000011011 1100100000011101
result:
ok 3 tokens
Test #5:
score: 0
Accepted
time: 3ms
memory: 3512kb
input:
11010101110001001000101110100011 10001110011111110101111001100000
output:
4 11 11 100100101110011 101001011001001
result:
ok 5 tokens
Test #6:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
11110110100011100110011001 11110100100110011000000000
output:
3 100010101 101100001 1010010101
result:
ok 4 tokens
Test #7:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
11111101101000100101001011110000 1111110001100110011100011000000
output:
7 10 10 10 10 110111011 1010010011 1110001111
result:
ok 8 tokens
Test #8:
score: 0
Accepted
time: 0ms
memory: 3452kb
input:
10000000000000000000000000000000 1000000000000000000000000000000
output:
31 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
result:
ok 32 tokens
Test #9:
score: 0
Accepted
time: 2ms
memory: 3452kb
input:
10100000001100011011100000000000 100010110011100000000000000000
output:
17 10 10 10 10 10 10 10 10 10 10 10 11 111 1011 1101 10011 10111
result:
ok 18 tokens
Test #10:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
10100010000000000000000000000001 10100010000000000000000000000000
output:
1 10100010000000000000000000000001
result:
ok 2 tokens
Test #11:
score: 0
Accepted
time: 2ms
memory: 3480kb
input:
11011011011011001101111101010000 101101100110000011101000000000
output:
9 10 10 10 10 11 101 111 1011 110000101000100111
result:
ok 10 tokens
Test #12:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
110000101111111000100000001 110000101111100100110000010
output:
2 10011101111111 10011101111111
result:
ok 3 tokens
Test #13:
score: 0
Accepted
time: 0ms
memory: 3488kb
input:
110011010101010011110001 100000011111011111100000
output:
8 101 101 101 111 111 1101 1101 1101
result:
ok 9 tokens
Test #14:
score: 0
Accepted
time: 0ms
memory: 3452kb
input:
100001110101100001111101110111 100000100101110000010111000000
output:
4 11101 11101 1011111001 1101110111
result:
ok 5 tokens
Test #15:
score: 0
Accepted
time: 2ms
memory: 3436kb
input:
110111000001001110000000001111 110100101000000111101101001100
output:
3 10111 10111 110101010000000011111
result:
ok 4 tokens
Subtask #2:
score: 15
Accepted
Dependency #1:
100%
Accepted
Test #16:
score: 15
Accepted
time: 1ms
memory: 3548kb
input:
10100111000100000000000000000011100100000000000000000000000001 10100111000100000000000000000000000000000000000000000000000000
output:
2 1000010000000000000000000000001 10100010000000000000000000000001
result:
ok 3 tokens
Test #17:
score: 0
Accepted
time: 2ms
memory: 3544kb
input:
1000010000111101001111000011011101001000011011101010000010110001 1000010000111101001111000011010111010111011001001101011101100100
output:
2 10101010100101101001100101011111 11000110011100110010111111101111
result:
ok 3 tokens
Test #18:
score: 0
Accepted
time: 3ms
memory: 3548kb
input:
1001011100010111001100011001111111010011001111110111011010111001 1001011100010111001100011001111001000110010111101110000111110100
output:
2 10101100000000010111100000001111 11100000110111110001110010110111
result:
ok 3 tokens
Test #19:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
1100100001100010110111100100101001111000010010100011110010110000 110010000110001011011110010000000010001001010011111110000000000
output:
6 10 10 10 10 10110011011100000011110001011 10001110111100010101110011000001
result:
ok 7 tokens
Test #20:
score: 0
Accepted
time: 3ms
memory: 3504kb
input:
1010101001010100010010001101000111000100010110010111111001100000 101010100101010000011000100110001101001011001011011000000000000
output:
8 10 10 10 10 10 10001010110010000101 10010001100100110111 100010100010000100001
result:
ok 9 tokens
Test #21:
score: 0
Accepted
time: 2ms
memory: 3456kb
input:
1011000100010101011000101010110000001001011100000000000001 1011000100010101000000000000000000000000000000000000000000
output:
3 100100000000000001 100010100000000000001 100100100000000000001
result:
ok 4 tokens
Test #22:
score: 0
Accepted
time: 2ms
memory: 3456kb
input:
101110011111000001101010111000000000111001000000000000001 101110011111000000000000000000000000000000000000000000000
output:
3 101000000000000001 10001000000000000001 100011000000000000001
result:
ok 4 tokens
Test #23:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
1000000000000000000000000000000000000000000000000000000000000000 100000000000000000000000000000000000000000000000000000000000000
output:
63 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
result:
ok 64 tokens
Test #24:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
11110011110101111001001011010001111000011100110110000000001 11110011110101111001001011001100010111000111010001000000010
output:
2 101100001010101100100111111111 101100001010101100100111111111
result:
ok 3 tokens
Test #25:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
100001011001100001110000001100100000000110000000110001 11010001011110111111001000110100010000000000000000000
output:
10 111 111 111 10011 10011 10011 11101 11101 11101 101000000000000001
result:
ok 11 tokens
Test #26:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
110101111011111001001010000111000010010000101101100011010111 110101111011010011000110101000011001001010110111110000000000
output:
4 10010001111111 1001011010011101 1010010111011101 1111100000100001
result:
ok 5 tokens
Test #27:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
1111010001111011110110111110111110010010011100001000000000000000 111000110100111001111001110001101101010110101000000000000000000
output:
24 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11111 11111 11111 101011 101011 101011 111101 111101 111101
result:
ok 25 tokens
Test #28:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
1001000010000000000000000000001000100000000000000000000000000010 100100001000000000000000000000010001000000000000000000000000000
output:
3 10 10001000000000000000000000000001 10001000000000000000000000000001
result:
ok 4 tokens
Test #29:
score: 0
Accepted
time: 3ms
memory: 3444kb
input:
11110011111110001110100010001010000001100000011000111 10100011001000011100000101000000110000000000000000000
output:
10 111 1101 10011 101001 101111 110101 1000111 1001001 1010011 1110001
result:
ok 11 tokens
Test #30:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
100100000100001011001110111001100101010011010110010101 100010110110100001110110011010000010001110111110000000
output:
8 111101 111101 1011001 1011001 1011001 10011101 10011101 10011101
result:
ok 9 tokens
Subtask #3:
score: 10
Accepted
Test #31:
score: 10
Accepted
time: 4ms
memory: 3536kb
input:
100001100011000011110101000011010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010011101101001101100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 10000...
output:
2 1111000011101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 10001110100110000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
result:
ok 3 tokens
Test #32:
score: 0
Accepted
time: 4ms
memory: 3548kb
input:
100011010001011001101110110101100000111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100010000101101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001...
output:
2 100100111000011101110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 111101001101001010010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 3 tokens
Test #33:
score: 0
Accepted
time: 7ms
memory: 3504kb
input:
11111111110101100011000111001011110101010110011000101010110011100101111010010100000001011010101111111001000000000001001110101110000001011111111011000010101011101100111110100000110001110010101101101111110111101001101010010011011100110001101100111111001000100011100000000000110101111101000010011011001 ...
output:
2 100101010001111000101000010010001010011111000110010110101010111101011111001101001100001111011001100001101011001110100011101110100010011111011111100101 110110111001101100000101011101000101110111110101110100011000000001100100100010010001010010111000100110100110110000011011010010011011100110000111100...
result:
ok 3 tokens
Test #34:
score: 0
Accepted
time: 4ms
memory: 3508kb
input:
1011010101010100110010100100011010010000000101001101011001110111011110000101110000000000000000000000000000000000000000000000000000000000000000000001001000011000011001101101110010110011100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 1...
output:
2 1100000000111111011110010110100110011100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 111100010111011010001111011100001101000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
result:
ok 3 tokens
Test #35:
score: 0
Accepted
time: 7ms
memory: 3436kb
input:
1010100011010100011011010000010001100001101110110010001111110100100001111110001010101100000100001101000110010101011110000111100100001111011101001001110000011011000011010001110001001110001111000001000000101000010100111010101010010111101101010101110011010010101111110000000000000000000000000000001 1010...
output:
2 101101100011000010000111110100011100101101011001110110011100100001101000001101000100100000111000000111010111011100011000000000000000000000000000001 1110110100111010010011110001010110100111010001101011110111100101101000010011010100101000100011101101011111011010011011000000000000000000000000000001
result:
ok 3 tokens
Test #36:
score: 0
Accepted
time: 3ms
memory: 3448kb
input:
100011010100100001010111011101110001010010111011001001111100001001001100011110111110001101101111101111000101110000000110110000000011101001101001110101101000000111100010111110110100111011101001100101010110101010100110000110001000010111110111000000011101101010101001111011000010010100100010111010111011...
output:
2 101111000010110010010101110010001011010100100001001000101011001000111000011111011011011010110010001001000100100001100111001100011111100001101111111101 110000000011010011101100110100000010110111111110010101001101111110010101101101001011000100101001111110111110000000011000100110111011001100011100010...
result:
ok 3 tokens
Test #37:
score: 0
Accepted
time: 10ms
memory: 3568kb
input:
11010100011100001010111010011110000000001010100110010101100110100100110100100011101010010001111101111101010101001001010101010100000101000011001000100010001111110100111100011111100101010010001111110100011100101011001001000111011111100011010011000101111010011001011011100110110110100010010011011 110101...
output:
2 10101011000100101001010101101001111110011010011000110000111000101100111010011101100011001100101100110100111000110001100001110100001100110110011011 1001111011110011101110100011110001000001011101010111111000001001001110010100011011100101101111001101110110000011001100100011101100100101010100000001
result:
ok 3 tokens
Test #38:
score: 0
Accepted
time: 7ms
memory: 3504kb
input:
100000110001111100011101111011111000010100000110100001011111011011100101101000011111101000000111000011010001010000111111011001111110010000000001010010001100000111010010100001110010111001011101100011010010001100101000001111101000000111011000000101010101011110100101101100100010101000001101000110010101...
output:
2 1010001001110101010100101011011001110101101101011110011000111101001110100011011000110110100011010101 11001110100111101011001000000011010000110111010010001011101010110101100001000110001101111110110111110011110000010001000011100110000011000010100110010100111101000001100100000000011010000010010111000...
result:
ok 3 tokens
Test #39:
score: 0
Accepted
time: 7ms
memory: 3556kb
input:
110111000011000101001010101000100110010010101000000111010111000010001011001100010010011111010011011110100001101010100001100001100111000011110100010011000100110101000011001111100110000110110101101110010110111110111001111111011101001111011001001010111011010001010010110111000010100011011011010100111 11...
output:
2 11011001001101000101010101110000100010011011100001 10000001110000101100101101101111000100110001100110001100101101100100000111001000100001000101000111101100011000011111101101110110000110111110101000011000010000111010000000011011111111110000111011010000000111111111110011000110111100111111011010000111
result:
ok 3 tokens
Test #40:
score: 0
Accepted
time: 5ms
memory: 3492kb
input:
100011011101111100000001100100010110000001100000111000100100111000010000100000100010001111000111100100101110000100110010101011111000111111010111100100100000000000000000000000000000000000000001011000111110001001100110100101101111000001001110100010101100100110100001001010111001110100101001011 10001101...
output:
2 1011000111110001001100110100101101111000001001110100010101100100110100001001010111001110100101001011 11001100000110110000101111011111101010001101011101100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
result:
ok 3 tokens
Test #41:
score: 0
Accepted
time: 2ms
memory: 3552kb
input:
110100101101111011001100100011111101100111010000110110100000100011111001010011100111000010001100001000111100010111010000000010001001111000100101100001101111011100000110111100111011100000111110011010010100000010000101100000010001000001010101110110011101110101011101100110011111110001010110001010011 11...
output:
2 10100000010000101100000010001000001010101110110011101110101011101100110011111110001010110001010011 10101000011010111111100100111110100100000110001110100011101111110001000010000000100111110111010111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
result:
ok 3 tokens
Test #42:
score: 0
Accepted
time: 6ms
memory: 3476kb
input:
11011001010001000010101111010011111101111100011110010011000010101110100010101001001110110001100011010100111111100000101000100010010001010010110110000011001010111001001101001001000110000011100000001100100001000100101101010000110100111111010111011001100000000000000000000000000000000000000000000000001 ...
output:
2 11100100111000101100010100000110001110000000101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 111100110000000100000110100111111110101011111100010100001000100101101010000110100111111010111011001100000000000000000000000000000000000000000000000001
result:
ok 3 tokens
Test #43:
score: 0
Accepted
time: 9ms
memory: 3508kb
input:
111111101010011000000001011010101011111111100011100011110100000111010001011100110001010111011111110001100101101011101000110001010000111110000001111111001100011000011001001000110010111100111001011011100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010...
output:
2 10 1111111010100110000000010110101010111111111000111000111101000001110100010111001100010101110111111100011001011010111010001100010100001111100000011111110011000110000110010010001100101111001110010110111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 3 tokens
Test #44:
score: 0
Accepted
time: 2ms
memory: 3508kb
input:
110 10
output:
2 10 11
result:
ok 3 tokens
Test #45:
score: 0
Accepted
time: 5ms
memory: 3444kb
input:
11010001110110110000001011100101011000101111010101010011100111100000001110010110001011000011101001011011011000101100110000000000100000100001001101000101001100100110000101010010011100010011000000000001100000001011100010001011000011111001111010000000100111001110100011110001101010000011111010101001110 ...
output:
2 10 1101000111011011000000101110010101100010111101010101001110011110000000111001011000101100001110100101101101100010110011000000000010000010000100110100010100110010011000010101001001110001001100000000000110000000101110001000101100001111100111101000000010011100111010001111000110101000001111101010100...
result:
ok 3 tokens
Subtask #4:
score: 0
Time Limit Exceeded
Test #46:
score: 15
Accepted
time: 8ms
memory: 3440kb
input:
11011110000000000010100100101011111000100001100010011001110111010100101110110011111101111100001110110100010000000001111000110000100110111011000111000111001010000001010111010001111111000111100110011010111001011011010001100010101001001111111101000110011110011101011100000001101110111011000101010101101 ...
output:
2 100001101110001100011100001000111100010010000001111101101111011101000011000110100000110100010101100110100011010011100101000010011000011110110100010011 110100101010101001100011111111100111101100100010110001110000100110110110011100010001110100110010101000001100010101011000111101010100000110000100111...
result:
ok 3 tokens
Test #47:
score: 0
Accepted
time: 7ms
memory: 3440kb
input:
1101010101001110110000101001001111110100001110110101110111001100101000111110001010100000101100111110101010111111001001010101111110111010011111111010000011100001101110001001110110110011000001000100100111000011010001111110101011111101100010111110101011010011111001001010011100101000111011110110101 1101...
output:
2 10000001001100111111011111100001101000011111110110101101010101000001101011100101010101000111100101010011011110100101001011110101111110000110111111 110100110101001001010001111001100010101000000100001000100101011011110010111010010111011010011001111101000000100010100101000011011000100101101110001011
result:
ok 3 tokens
Test #48:
score: 0
Accepted
time: 15ms
memory: 3508kb
input:
11000000010000011101001101110011011010001101101011010011110001100001111011010011111101010000100001101101101001011111110100101010001001010001111001010110111110000001001100111110010110010000010011101100010111110000011000110010001001000110000110110000111011001001111011101001100100010110111000101111 110...
output:
3 11000111011110011001100110110000101110010011101010101011001001001101111000000100010011100010000011 110110001011100011100111100100111000111000110110110100100100100010101010011110100100010011000100111 1001000110111010001000111101101101011011100001011111001111110011011010111110110100111011000100010011
result:
ok 4 tokens
Test #49:
score: 0
Accepted
time: 10ms
memory: 3536kb
input:
10000000100111110100011011010100111111101000101010010000000110101010001111000111111001011100011110101110111001010110111010111001011010000000011000110010011001111001100011000101110101000001011010110100010101111010111111111010001100101111110100101111010101011111000110000110110001000011100100100101 100...
output:
4 10001011111011111010100011011111001111011101111101011011101101011100100111 10100101111101110000100110001011001001000011111100101110100100101010010111 100011110110111110101000110000000011010011010001011001001011010100100111011 101000011111001000110110011010110000111010000001010110110101110111100011...
result:
ok 5 tokens
Test #50:
score: 0
Accepted
time: 13ms
memory: 3552kb
input:
110110100011111110001000010100110110101100101001101001110111100101000011000010101110110111100000011011111001011110100001100001111110110000111001011010111011001010100010010101010011000100110001111101011111000011010000010101110001100100111000111101011011010011110100101100110001000011011101001 11011010...
output:
6 10011101001110010011100010110001101011101011011 110011001100001001101001110000110010001111111111 1001011010001000001100000000101110110000100010111 1111110101010010110011010101000000000111110110111 11011000001110011100011000101001101111010110010111 11100010000000010011100000010111010011110100000011
result:
ok 7 tokens
Test #51:
score: 0
Accepted
time: 9ms
memory: 3560kb
input:
11000010100100010010101111101101001001001011001111011101011100011110111000011110101110010000101111110101001011010100011110110110010110000001011111011110000010111000010111110000100001100100110000110100010100011111001101010101001100100001010010110001010000100101101100110110101010101110011010101 110000...
output:
4 111001111111110101100111001110010100111111010011 1100111001101000001110101101000000100001010011011 11110101100100101011111101001110110110011011010011 100010101100110001100100110010111000100100111001101100110001011101111001011110101111110011110011111001000000101011000110000101111101010010101110111
result:
ok 5 tokens
Test #52:
score: 0
Accepted
time: 5ms
memory: 3452kb
input:
1101011111101000011101101100000110101011101100111011010100011001111011100000000000010011101001100000001000100110010110011010000011011000100110101111001111111101000000111010111001110110010010100001000001011001111011111101111110001101101001001101011110000001010100110110110000110000001100000111100111 1...
output:
1 1101011111101000011101101100000110101011101100111011010100011001111011100000000000010011101001100000001000100110010110011010000011011000100110101111001111111101000000111010111001110110010010100001000001011001111011111101111110001101101001001101011110000001010100110110110000110000001100000111100111
result:
ok 2 tokens
Test #53:
score: 0
Accepted
time: 0ms
memory: 3464kb
input:
11000110101111001100011101111000010010000101010100100000001011000001111101100000101001001001011011110010101001100010111010011111110010000001011010000111010010011111101010010001101001000011010101001110000101111011100001000000110010000000100111010001100000110010011111011100100001110000010011011011 110...
output:
1 11000110101111001100011101111000010010000101010100100000001011000001111101100000101001001001011011110010101001100010111010011111110010000001011010000111010010011111101010010001101001000011010101001110000101111011100001000000110010000000100111010001100000110010011111011100100001110000010011011011
result:
ok 2 tokens
Test #54:
score: 0
Accepted
time: 27ms
memory: 3448kb
input:
110011101001010111100100011110000111011000001111000011111011000001110000101001001011100111100001000001001001011010111101110110000001101010011101111000011100111010110100100010100111001010001001000001011111101001010010110111111100001110111111001000110001001110111011000101101 11001110000111111111011101...
output:
20 11101110011 111100010111 1000010010011 1001010110011 1111101111011 10001101101011 10110101000011 10110111010011 11001001111011 11001101110011 11100100101111 11111111101011 100001110010011 101001001001011 101101100101011 111001000010111 111001101011011 111001111110011 111010100000111 111100100000111
result:
ok 21 tokens
Test #55:
score: 0
Accepted
time: 11ms
memory: 3456kb
input:
10000001010010101010101101001100101110110101110111100010111101000010100111000010101100011101111110011110100001010001000001000100010001001101011000101010100000010110111110110111111010111100010110000011011101010111101011011101010101000011111010101010111000100101111101001101101000010100100000011 100000...
output:
9 101011011001000010111100010011 11010001111001010011000111111111 11111110010010000110101010011011 100111001110010110100111101011011 101010110000010010011110111101011 111001001010010011000110101111011 1011011100100011111111010001100111 1110010110001110110111110100010011 11111001100011000100110110100...
result:
ok 10 tokens
Test #56:
score: -15
Time Limit Exceeded
input:
10110101001000000110010101010110110100001010001110011100110110101010010001100001010100110101011110101001011011101001011111001110011110000100010100110010000000110100101000010101110010100100000011001101100110000100001111100000000101100100100011111001011010000001011101000111101111101100100101 100011000...
output:
result:
Subtask #5:
score: 0
Skipped
Dependency #4:
0%
Subtask #6:
score: 0
Skipped
Dependency #5:
0%
Subtask #7:
score: 0
Skipped
Dependency #6:
0%