#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/2.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>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