#include typedef long long ll; ll gi(){ ll x=0,f=1; char ch=getchar(); while(!isdigit(ch))f^=ch=='-',ch=getchar(); while(isdigit(ch))x=x*10+ch-'0',ch=getchar(); return f?x:-x; } std::mt19937 rnd(time(NULL)); #define rand rnd #define pr std::pair #define all(x) (x).begin(),(x).end() #define fi first #define se second templatevoid cxk(T&a,T b){a=a>b?a:b;} templatevoid cnk(T&a,T b){a=a>=1; } return ret; } templatevoid inc(Ta&a,Tb b){a=a+b>=mod?a+b-mod:a+b;} templatevoid dec(Ta&a,Tb b){a=a>=b?a-b:a+mod-b;} #endif char str[10]; bool solve(int&S,double&score){ static char s[11]; int i,st,lst,len; for(i=0,st=0,lst=-1,len=0;i<9;++i){ s[i]=S>>i&1; if(!st){ if(s[i])st=1; }else if(s[i]==lst){ ++len; }else{ if(len>=3){ score+=len*len; S=((S<=3){ score+=len*len; S=(S<>i&1){ if(!s)s=1; else putchar('1'); }else if(s)putchar('0'); } } int main(){ #ifdef LOCAL freopen("in.in","r",stdin); //freopen("out.out","w",stdout); #endif for(int i=1;i<1<<9;++i){ to[i]=i;while(solve(to[i],score[i])); } int N=1<<8; for(int i=0;i1)for(int j=0;j>1)|(j*N/c)]-=1./c; //output(i,1);putchar(' ');output(((t/c)>>1)|(j*c),1);putchar('\n'); } } for(int i=0;i1e-8){std::swap(A[i],A[j]);break;} for(int j=i+1;ji;--k) A[j][k]-=A[i][k]*(A[j][i]/A[i][i]); } for(int i=N-1;~i;--i){ for(int j=i+1;j