Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define ull unsigned long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define ull unsigned long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};

int main()
{
    string s;
    cin >> s;
    int l = 0, m = 0;
    REP(i, s.length())
    {
        if (s[i] == 'A' || s[i] == 'T' || s[i] == 'C' || s[i] == 'G')
        {
            l++;
        }
        else
        {
            m = max(m, l);
            l = 0;
        }
    }
    cout << m << endl;
}

typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};

int main()
{
    string s;
    cin >> s;
    int l = 0, m = 0;#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define ull unsigned long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};

int main()
{
    string s;
    cin >> s;
    int l = 0, m = 0;
    REP(i, s.length())
    {
        if (s[i] == 'A' || s[i] == 'T' || s[i] == 'C' || s[i] == 'G')
            l++;
        else
        {
            m = max(m, l);
            l = 0;
        }
    }

    cout << m << endl;
}

    REP(i, s.length())
    {
        if (s[i] == 'A' || s[i] == 'T' || s[i] == 'C' || s[i] == 'G')
            l++;
        else
            m = max(m, l);
    }
    cout << m << endl;
}


Compiler output:
a.cc:13:26: error: stray '#' in program
   13 | typedef pair<int, int> P;#include <bits/stdc++.h>
      |                          ^
a.cc:64:22: error: stray '#' in program
   64 |     int l = 0, m = 0;#include <bits/stdc++.h>
      |                      ^
a.cc:13:27: error: 'include' does not name a type
   13 | typedef pair<int, int> P;#include <bits/stdc++.h>
      |                           ^~~~~~~
a.cc:57:5: error: redefinition of 'int dy []'
   57 | int dy[] = {0, 0, 1, -1, 0};
      |     ^~
a.cc:30:5: note: 'int dy [5]' previously defined here
   30 | int dy[] = {0, 0, 1, -1, 0};
      |     ^~
a.cc:58:5: error: redefinition of 'int dx []'
   58 | int dx[] = {1, -1, 0, 0, 0};
      |     ^~
a.cc:31:5: note: 'int dx [5]' previously defined here
   31 | int dx[] = {1, -1, 0, 0, 0};
      |     ^~
a.cc:60:5: error: redefinition of 'int main()'
   60 | int main()
      |     ^~~~
a.cc:33:5: note: 'int main()' previously defined here
   33 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:64:23: error: 'include' was not declared in this scope
   64 |     int l = 0, m = 0;#include <bits/stdc++.h>
      |                       ^~~~~~~
a.cc:64:32: error: 'bits' was not declared in this scope
   64 |     int l = 0, m = 0;#include <bits/stdc++.h>
      |                                ^~~~
a.cc:64:37: error: 'stdc' was not declared in this scope; did you mean 'std'?
   64 |     int l = 0, m = 0;#include <bits/stdc++.h>
      |                                     ^~~~
      |                                     std
a.cc:75:1: error: expected primary-expression before 'using'
   75 | using namespace std;
      | ^~~~~
a.cc:84:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   84 | int main()
      |         ^~
a.cc:84:9: note: remove parentheses to default-initialize a variable
   84 | int main()
      |         ^~
      |         --
a.cc:84:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:85:1: error: a function-definition is not allowed here before '{' token
   85 | {
      | ^