#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long double ld; ld IP(vector > &B1, int x, vector > &B2, int y){ ld res=0; for(int i=0;i > GS(vector > &Basis){ //vector > Basis_=Basis; const int n=Basis.size(); vector > Basis_(n,vector(n)); for(int i=0;i > &Basis,int x,vector > &Basis_,int y){ return IP(Basis,x,Basis_,y)/IP(Basis_,y,Basis_,y); } ld PI2(vector > &Basis,vector > &Basis_,int i,int x){ const int n=Basis.size(); vector pi(n,0); for(int j=i;j LLL(vector > Basis){ const int n=Basis.size(); const ld delta=1.0/4.0; vector svp(n); vector > Basis_=GS(Basis); while(true){ /* for(int i=0;i=0;j--){ ld c_ij=(ld)roundl(IP(Basis,i,Basis_,j)/IP(Basis_,j,Basis_,j)); for(int k=0;kp2){ for(int j=0;j > mat(4,vector(4)); mat[0][0]=105; mat[1][0]=821; mat[2][0]=404; mat[3][0]=328; mat[0][1]=881; mat[1][1]=667; mat[2][1]=644; mat[3][1]=927; mat[0][2]=181; mat[1][2]=483; mat[2][2]=87; mat[3][2]=500; mat[0][3]=893; mat[1][3]=834; mat[2][3]=732; mat[3][3]=441; LLL(mat); */ ld p,b; cin>>p>>b; swap(p,b); vector tmp; vector coe; int n; for(n=4;;n+=4){ //cout< > Basis(n,vector(n,0)); for(int i=0;i > st; for(int i=-25;i<=25;i++){ bool ok=false; for(char s='a';s<='z' && !ok;s++){ for(char t='a';t<='z' && !ok;t++){ if(s-t==i){ st[i]=make_pair(s,t); ok=true; } } } } string s,t; for(int i=0;i