#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef long double ld; template 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)+powl(3.0/4.0,(ld)n/(ld)(n-1)); vector svp(n); vector > Basis_=GS(Basis); while(true){ /* for(int i=0;i=0;j--){ ll c_ij=roundl(IP(Basis,i,Basis,j)/IP(Basis,j,Basis,j)); for(int k=0;kp2){ for(int j=0;j > mat(3,vector(3)); mat[0][0]=4; mat[1][0]=1; mat[2][0]=2; mat[0][1]=4; mat[1][1]=7; mat[2][1]=2; mat[0][2]=3; mat[1][2]=1; mat[2][2]=7; LLL(mat); */ ll p,b; cin>>p>>b; swap(p,b); //No.3015 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