Language: C++

include <bits/stdc++.h>
using namespace std;

int main(){
  long long h, w; cin >> h >> w;
  vector<string> s(h);
  for(int i = 0; i < h; i++){
    cin >> s.at(i);
  }
  vector<vector<long long>> a(h, vector<long long>(w, 0)), b(w, vector<long long>(h, 0));
  for(int i = 0; i < h; i++){
    long long tmp = 0;
    for(int j = 0; j < w; j++){
      if(s.at(i).at(j) == '.'){
        tmp++;
        if(j == w - 1){
          for(int k = 0; k < tmp; k++) a.at(i).push_back(tmp);
          tmp = 0;
        }
      }else{
        for(int k = 0; k < tmp; k++) a.at(i).push_back(tmp);
        a.at(i).push_back(0);
        tmp = 0;
      }
    }
  }
  for(int i = 0; i < w; i++){
    long long tmp = 0;
    for(int j = 0; j < h; j++){
      if(s.at(j).at(i) == '.'){
        tmp++;
        if(j == h - 1){
          for(int k = 0; k < tmp; k++) a.at(i).push_back(tmp);
          tmp = 0;
        }
      }else{
        for(int k = 0; k < tmp; k++) a.at(i).push_back(tmp);
        a.at(i).push_back(0);
        tmp = 0;
      }
    }
  }
  long long out = 0;
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      long long tmp = a.at(i).at(j) + b.at(j).at(i);
      if(tmp > out) out = tmp;
    }
  }
  cout << tmp - 1;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:19: error: 'cin' was not declared in this scope
    5 |   long long h, w; cin >> h >> w;
      |                   ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<string> s(h);
      |   ^~~~~~
a.cc:6:10: error: 'string' was not declared in this scope
    6 |   vector<string> s(h);
      |          ^~~~~~
a.cc:6:18: error: 's' was not declared in this scope
    6 |   vector<string> s(h);
      |                  ^
a.cc:10:17: error: expected primary-expression before 'long'
   10 |   vector<vector<long long>> a(h, vector<long long>(w, 0)), b(w, vector<long long>(h, 0));
      |                 ^~~~
a.cc:17:40: error: 'a' was not declared in this scope
   17 |           for(int k = 0; k < tmp; k++) a.at(i).push_back(tmp);
      |                                        ^
a.cc:21:38: error: 'a' was not declared in this scope
   21 |         for(int k = 0; k < tmp; k++) a.at(i).push_back(tmp);
      |                                      ^
a.cc:22:9: error: 'a' was not declared in this scope
   22 |         a.at(i).push_back(0);
      |         ^
a.cc:33:40: error: 'a' was not declared in this scope
   33 |           for(int k = 0; k < tmp; k++) a.at(i).push_back(tmp);
      |                                        ^
a.cc:37:38: error: 'a' was not declared in this scope
   37 |         for(int k = 0; k < tmp; k++) a.at(i).push_back(tmp);
      |                                      ^
a.cc:38:9: error: 'a' was not declared in this scope
   38 |         a.at(i).push_back(0);
      |         ^
a.cc:46:23: error: 'a' was not declared in this scope
   46 |       long long tmp = a.at(i).at(j) + b.at(j).at(i);
      |                       ^
a.cc:46:39: error: 'b' was not declared in this scope
   46 |       long long tmp = a.at(i).at(j) + b.at(j).at(i);
      |                                       ^
a.cc:50:3: error: 'cout' was not declared in this scope; did you mean 'out'?
   50 |   cout << tmp - 1;
      |   ^~~~
      |   out
a.cc:50:11: error: 'tmp' was not declared in this scope
   50 |   cout << tmp - 1;
      |           ^~~