Language: C++

#define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;

int main(){
    string s;
    cin >> s;
    int res = 1;
    int res_m = 1;
    string ans = "";
    string test = "";
    rep(i,s.size()){
        if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T'){
            ans.push_back('.');
        }
        else ans.push_back('#');
    }
    rep(i,s.size()){
        test += '#';
    }
    if(ans == test){
        cout << 0 << endl;
        return 0;
    }
    else{
        rep(i,res.size()){
            if(ans[i] == '.'){
                if(ans[i] == ans[i+1]) res_m++;
                else if(ans[i] != ans[i+1]){
                    res = max(res_m,res);
                }
            }
        }
    }
  	cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string s;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #define rep(i,n) for(int i = 0;i < (n);i++)
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> s;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define rep(i,n) for(int i = 0;i < (n);i++)
a.cc:6:12: error: 's' was not declared in this scope
    6 |     cin >> s;
      |            ^
a.cc:9:11: error: expected ';' before 'ans'
    9 |     string ans = "";
      |           ^~~~
      |           ;
a.cc:10:11: error: expected ';' before 'test'
   10 |     string test = "";
      |           ^~~~~
      |           ;
a.cc:13:13: error: 'ans' was not declared in this scope
   13 |             ans.push_back('.');
      |             ^~~
a.cc:15:14: error: 'ans' was not declared in this scope
   15 |         else ans.push_back('#');
      |              ^~~
a.cc:18:9: error: 'test' was not declared in this scope
   18 |         test += '#';
      |         ^~~~
a.cc:20:8: error: 'ans' was not declared in this scope
   20 |     if(ans == test){
      |        ^~~
a.cc:20:15: error: 'test' was not declared in this scope
   20 |     if(ans == test){
      |               ^~~~
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout << 0 << endl;
      |         ^~~~
a.cc:21:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:22: error: 'endl' was not declared in this scope
   21 |         cout << 0 << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define rep(i,n) for(int i = 0;i < (n);i++)
a.cc:25:19: error: request for member 'size' in 'res', which is of non-class type 'int'
   25 |         rep(i,res.size()){
      |                   ^~~~
a.cc:1:37: note: in definition of macro 'rep'
    1 | #define rep(i,n) for(int i = 0;i < (n);i++)
      |                                     ^
a.cc:29:27: error: 'max' was not declared in this scope
   29 |                     res = max(res_m,res);
      |                           ^~~
a.cc:34:9: error: 'cout' was not declared in this scope
   34 |         cout << res << endl;
      |         ^~~~
a.cc:34:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:24: error: 'endl' was not declared in this scope
   34 |         cout << res << endl;
      |                        ^~~~
a.cc:34:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'