Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>


using namespace std;

vector<string> s;
int h,w;
int fukasa=0;

vector<vector<bool>> seached;
vector<vector<int>> tate;
vector<vector<int>> yoko;


int flush(int x,int y,int depth,int muki);

int main() {
    int i,j,k,ans=0;
    string temps;
    cin>>h>>w;
    for(i=0;i<h;i++){
        cin>>temps;
        s.push_back(temps);
        seached.push_back(vector<bool>(w,false));
        tate.push_back(vector<int>(w));
        yoko.push_back(vector<int>(w));

    }

    //cout <<s[0][5]<< endl;
    for(i=0;i<h;i++){
        for(j=0;j<w;j++){
            if(s[i][j]=='.'){

                fukasa=0;
                flush(j,i,0,5);
                tate[i][j]=fukasa+1;
                fukasa=0;
                flush(j,i,0,6);
                yoko[i][j]=fukasa+1;
                ans=max(tate[i][j]+yoko[i][j]-1,ans);
               // cout <<i <<"." << j<<"." << fukasa+1 <<endl;

            }
        }
    }


    std::cout << ans << std::endl;
    return 0;
}

int flush(int x,int y,int depth,int muki){
    if(y>=h||x>=w||y<=-1||x<=-1){
        fukasa+=depth-1;
        return depth;
    }
    seached[y][x]=true;
    if(s[y][x]=='#'){
        fukasa+=depth-1;
        return depth;
    }
    if(muki==1||muki==5)flush(x,y+1,depth+1,1);
    if(muki==2||muki==5)flush(x,y-1,depth+1,2);
    if(muki==3||muki==6)flush(x+1,y,depth+1,3);
    if(muki==4||muki==6)flush(x-1,y,depth+1,4);


}#include <iostream>
#include <vector>
#include <string>
#include <algorithm>


using namespace std;

vector<string> s;
int h,w;
int fukasa=0;

vector<vector<bool>> seached;
vector<vector<int>> tate;
vector<vector<int>> yoko;


int flush(int x,int y,int depth,int muki);

int main() {
    int i,j,k,ans=0;
    string temps;
    cin>>h>>w;
    for(i=0;i<h;i++){
        cin>>temps;
        s.push_back(temps);
        seached.push_back(vector<bool>(w,false));
        tate.push_back(vector<int>(w));
        yoko.push_back(vector<int>(w));

    }

    //cout <<s[0][5]<< endl;
    for(i=0;i<h;i++){
        for(j=0;j<w;j++){
            if(s[i][j]=='.'){

                fukasa=0;
                flush(j,i,0,5);
                tate[i][j]=fukasa+1;
                fukasa=0;
                flush(j,i,0,6);
                yoko[i][j]=fukasa+1;
                ans=max(tate[i][j]+yoko[i][j]-1,ans);
               // cout <<i <<"." << j<<"." << fukasa+1 <<endl;

            }
        }
    }


    std::cout << ans << std::endl;
    return 0;
}

int flush(int x,int y,int depth,int muki){
    if(y>=h||x>=w||y<=-1||x<=-1){
        fukasa+=depth-1;
        return depth;
    }
    seached[y][x]=true;
    if(s[y][x]=='#'){
        fukasa+=depth-1;
        return depth;
    }
    if(muki==1||muki==5)flush(x,y+1,depth+1,1);
    if(muki==2||muki==5)flush(x,y-1,depth+1,2);
    if(muki==3||muki==6)flush(x+1,y,depth+1,3);
    if(muki==4||muki==6)flush(x-1,y,depth+1,4);


}

Compiler output:
a.cc:72:2: error: stray '#' in program
   72 | }#include <iostream>
      |  ^
a.cc:72:3: error: 'include' does not name a type
   72 | }#include <iostream>
      |   ^~~~~~~
a.cc:80:16: error: redefinition of 'std::vector<std::__cxx11::basic_string<char> > s'
   80 | vector<string> s;
      |                ^
a.cc:9:16: note: 'std::vector<std::__cxx11::basic_string<char> > s' previously declared here
    9 | vector<string> s;
      |                ^
a.cc:81:5: error: redefinition of 'int h'
   81 | int h,w;
      |     ^
a.cc:10:5: note: 'int h' previously declared here
   10 | int h,w;
      |     ^
a.cc:81:7: error: redefinition of 'int w'
   81 | int h,w;
      |       ^
a.cc:10:7: note: 'int w' previously declared here
   10 | int h,w;
      |       ^
a.cc:82:5: error: redefinition of 'int fukasa'
   82 | int fukasa=0;
      |     ^~~~~~
a.cc:11:5: note: 'int fukasa' previously defined here
   11 | int fukasa=0;
      |     ^~~~~~
a.cc:84:22: error: redefinition of 'std::vector<std::vector<bool> > seached'
   84 | vector<vector<bool>> seached;
      |                      ^~~~~~~
a.cc:13:22: note: 'std::vector<std::vector<bool> > seached' previously declared here
   13 | vector<vector<bool>> seached;
      |                      ^~~~~~~
a.cc:85:21: error: redefinition of 'std::vector<std::vector<int> > tate'
   85 | vector<vector<int>> tate;
      |                     ^~~~
a.cc:14:21: note: 'std::vector<std::vector<int> > tate' previously declared here
   14 | vector<vector<int>> tate;
      |                     ^~~~
a.cc:86:21: error: redefinition of 'std::vector<std::vector<int> > yoko'
   86 | vector<vector<int>> yoko;
      |                     ^~~~
a.cc:15:21: note: 'std::vector<std::vector<int> > yoko' previously declared here
   15 | vector<vector<int>> yoko;
      |                     ^~~~
a.cc:91:5: error: redefinition of 'int main()'
   91 | int main() {
      |     ^~~~
a.cc:20:5: note: 'int main()' previously defined here
   20 | int main() {
      |     ^~~~
a.cc:127:5: error: redefinition of 'int flush(int, int, int, int)'
  127 | int flush(int x,int y,int depth,int muki){
      |     ^~~~~
a.cc:56:5: note: 'int flush(int, int, int, int)' previously defined here
   56 | int flush(int x,int y,int depth,int muki){
      |     ^~~~~
a.cc: In function 'int flush(int, int, int, int)':
a.cc:72:1: warning: control reaches end of non-void function [-Wreturn-type]
   72 | }#include <iostream>
      | ^
a.cc: In function 'int flush(int, int, int, int)':
a.cc:143:1: warning: control reaches end of non-void function [-Wreturn-type]
  143 | }
      | ^