criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>

using namespace std;

/*  テンプレここから */
typedef long long ll;

#define rep(i, n) for(int i = 0; i < n; ++i)
#define repi(i, start, end) for(int i = start; i < end; ++i)
#define all(x) (x).begin(), (x).end()
#define INF (1e9)
#define INFL (1e18)
#define add_mod(a, b, x) ( (ll)(a) + (ll)(b) ) % (ll)(x)
#define mul_mod(a, b, x) ( ((ll)(a) % (ll)(x)) * ((ll)(b) % (ll)(x)) ) % (ll)(x)
#define out(x) cout << (x) << endl;
#define outyes(bool_val) cout << (bool_val ? "yes" : "no") << endl;
#define outYes(bool_val) cout << (bool_val ? "Yes" : "No") << endl;
#define outYES(bool_val) cout << (bool_val ? "YES" : "NO") << endl;
#define outPossible(bool_val) cout << (bool_val ? "Possible" : "Impossible") << endl;
#define outPOSSIBLE(bool_val) cout << (bool_val ? "POSSIBLE" : "IMPOSSIBLE") << endl;

template<typename A, size_t N, typename T>
void array_fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

ll sub_mod(ll a, ll b, ll x){
    ll tmp = (a - b) % x;
    if(tmp < 0) tmp += x;
    return tmp;
}
ll gcd(ll a, ll b){
    if(b == 0) return a;
    else return gcd(b, a % b);
}

int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
/*  テンプレここまで */

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    string s;
    cin >> s;

    if(s == "A") cout << "T" << endl;
    else if(s == "T") cout << "A" << endl;
    else if(s == "C") cout << "G << endl;
    else cout << "C" << endl;
}

Compiler output:
a.cc:50:31: warning: missing terminating " character
   50 |     else if(s == "C") cout << "G << endl;
      |                               ^
a.cc:50:31: error: missing terminating " character
   50 |     else if(s == "C") cout << "G << endl;
      |                               ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:51:5: error: expected primary-expression before 'else'
   51 |     else cout << "C" << endl;
      |     ^~~~
Language: C++

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;

namespace AtCoderABC122
{
    class Program
    {
        public static void Main(string[] args)
        {
            string b = Console.ReadLine();
            if (b == "A") Console.WriteLine("T");
            if (b == "T") Console.WriteLine("A");
            if (b == "G") Console.WriteLine("C");
            if (b == "C") Console.WriteLine("G");
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Collections;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:10:15: error: expected ':' before 'static'
   10 |         public static void Main(string[] args)
      |               ^~~~~~~
      |               :
a.cc:10:33: error: 'string' has not been declared
   10 |         public static void Main(string[] args)
      |                                 ^~~~~~
a.cc:10:42: error: expected ',' or '...' before 'args'
   10 |         public static void Main(string[] args)
      |                                          ^~~~
a.cc:18:6: error: expected ';' after class definition
   18 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void AtCoderABC122::Program::Main(int*)':
a.cc:12:13: error: 'string' was not declared in this scope
   12 |             string b = Console.ReadLine();
      |             ^~~~~~
a.cc:13:17: error: 'b' was not declared in this scope
   13 |             if (b == "A") Console.WriteLine("T");
      |                 ^
a.cc:13:27: error: 'Console' was not declared in this scope
   13 |             if (b == "A") Console.WriteLine("T");
      |                           ^~~~~~~
a.cc:14:17: error: 'b' was not declared in this scope
   14 |             if (b == "T") Console.WriteLine("A");
      |                 ^
a.cc:14:27: error: 'Console' was not declared in this scope
   14 |             if (b == "T") Console.WriteLine("A");
      |                           ^~~~~~~
a.cc:15:17: error: 'b' was not declared in this scope
   15 |             if (b == "G") Console.WriteLine("C");
      |                 ^
a.cc:15:27: error: 'Console' was not declared in this scope
   15 |             if (b == "G") Console.WriteLine("C");
      |                           ^~~~~~~
a.cc:16:17: error: 'b' was not declared in this scope
   16 |             if (b == "C") Console.WriteLine("G");
      |                 ^
a.cc:16:27: error: 'Console' was not declared in this scope
   16 |             if (b == "C") Console.WriteLine("G");
      |                           ^~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;

int main(void){
  char a,temp;
  cin >> a;
  if(a == 'A')temp = 'T';
  if(a == 'T')temp = 'A';
  if(a == 'G')temp = 'C';
  else temp = 'C'
  cout << temp << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: expected ';' before 'cout'
   13 |   else temp = 'C'
      |                  ^
      |                  ;
   14 |   cout << temp << endl;
      |   ~~~~
Language: C++

#include "bits/stdc++.h"

#define REP(i, n, N) for(ll i=(n); i<(N); i++)
#define RREP(i, n, N) for(ll i=(N-1); i>=(n); i--)
#define LREP(lst,itr) for(auto itr = lst.begin(); itr != lst.end(); ++itr)
#define CK(n, a, b) ((a)<=(n)&&(n)<(b))
#define ALL(v) (v).begin(),(v).end()
#define MCP(a, b) memcpy(b,a,sizeof(b))
#define P(s) cout<<(s)<<endl
#define P2(a, b) cout<<(a)<<" "<<(b)<<endl
#define P3(a, b, c) cout<<(a)<<" "<<(b)<<" "<<(c)<<endl
#define V2(T) vector<vector<T>>
typedef long long ll;
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;

string acgt="ACGT";

bool judge(char c){
    REP(i, 0, 4){
        if(acgt[i]==c) return true;
    }
    return false;
}

int main(){
    int ans=0, tmp=0;
    string S;
    cin >> S;
    REP(i, 0, S.size){
        if(judge(S[i])){
            tmp++;
        }else{
            ans = max(ans, tmp);
            tmp=0;
        }
    }
    ans = max(ans, tmp);
    P(ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   31 |     REP(i, 0, S.size){
      |                 ^
a.cc:3:39: note: in definition of macro 'REP'
    3 | #define REP(i, n, N) for(ll i=(n); i<(N); i++)
      |                                       ^
Language: C++

#include "bits/stdc++.h"

#define REP(i, n, N) for(ll i=(n); i<(N); i++)
#define RREP(i, n, N) for(ll i=(N-1); i>=(n); i--)
#define LREP(lst,itr) for(auto itr = lst.begin(); itr != lst.end(); ++itr)
#define CK(n, a, b) ((a)<=(n)&&(n)<(b))
#define ALL(v) (v).begin(),(v).end()
#define MCP(a, b) memcpy(b,a,sizeof(b))
#define P(s) cout<<(s)<<endl
#define P2(a, b) cout<<(a)<<" "<<(b)<<endl
#define P3(a, b, c) cout<<(a)<<" "<<(b)<<" "<<(c)<<endl
#define V2(T) vector<vector<T>>
typedef long long ll;
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;

string acgt={"A", "C", "G", "T"};

bool judge(char c){
    REP(i, 0, 4){
        if(acgt[i]==c) return true;
    }
    return false;
}

int main(){
    int ans=0, tmp=0;
    string S;
    cin >> S;
    REP(i, 0, S.size){
        if(judge(S[i])){
            tmp++;
        }else{
            ans = max(ans, tmp);
            tmp=0;
        }
    }
    ans = max(ans, tmp);
    P(ans);
    return 0;
}

Compiler output:
a.cc:18:32: error: could not convert '{"A", "C", "G", "T"}' from '<brace-enclosed initializer list>' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   18 | string acgt={"A", "C", "G", "T"};
      |                                ^
      |                                |
      |                                <brace-enclosed initializer list>
a.cc: In function 'int main()':
a.cc:31:17: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   31 |     REP(i, 0, S.size){
      |                 ^
a.cc:3:39: note: in definition of macro 'REP'
    3 | #define REP(i, n, N) for(ll i=(n); i<(N); i++)
      |                                       ^
Language: C++

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



int main() {
    string s;
    cin>>s;
    i
    int  i,ans=0,count=0;
    for(i=0;i<s.size();i++){
       if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
      	else count ;
      ans=max(ans,count );
      }
     	cout << ans << endl;
     

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'i' was not declared in this scope
    9 |     i
      |     ^
a.cc:12:60: error: no post-increment operator for type
   12 |        if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C') count++;
      |                                                            ^~
a.cc:13:20: error: statement cannot resolve address of overloaded function
   13 |         else count ;
      |                    ^
a.cc:14:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |       ans=max(ans,count );
      |       ^~~
      |       abs
a.cc:16:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C

/******************************************
* AUTHOR : GURUTEJA *
******************************************/
#include <bits/stdc++.h>
using namespace std;

void debug(){
	#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif 

}

  int main() {
    debug();
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int x=0,count=0;
    string s;
    unordered_map<int,int> mp;
    cin>>s;
    mp['A']=1,mp['C']=1,mp['T']=1,mp['G']=1;
    for (int i = 0; i <s.length(); ++i)
    {
    	   if(mp.find(s[i])!=mp.end()){
    	   	  count++;
    	   }else{
    	   	  x=max(x,count);
    	   	  count=0;
    	   }
    }
    x=max(x,count);
    cout<<x<<endl;

    return 0;
  }

Compiler output:
main.c:4:10: fatal error: bits/stdc++.h: No such file or directory
    4 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class B122 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		sc.close();

		int maxLength = 0;
		int counter = 0;

		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) == 'A' || s.charAt(i) == 'C' || s.charAt(i) == 'T' || s.charAt(i) == 'G') {
				counter++;
			} else {
				maxLength=Math.max(maxLength, counter);
				counter = 0;
			}
		}

		System.out.println(maxLength);

	}

}


Compiler output:
Main.java:3: error: class B122 is public, should be declared in a file named B122.java
public class B122 {
       ^
1 error
Language: C++

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

int main(){
 string N;
 cin >> N;
   int s = 0;
    vector<int>a(N.size());
    int max;
for (int i = 0; i < (int)N.size(); i++){
  char n = N[i];
  char m = N[i + 1];

  if ((n == 'A')||(n == 'C')||(n == 'G')||(n == 'T')){
    s++;
     if ((m != 'A')||(m != 'C')||(m != 'G')||(m != 'T')){
   break;
 }
  }
 
  a.at(i) = s;
}
max = max_element(a.begin(),a.end())
cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:18: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in assignment
   24 | max = max_element(a.begin(),a.end())
      |       ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                  |
      |                  __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C++

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

int main(){
 string N;
 cin >> N;
   int s = 0;
    vector<int>a(N.size());
    int max;
for (int i = 0; i < (int)N.size(); i++){
  char n = N[i];
  char m = N[i + 1];

  if ((n == 'A')||(n == 'C')||(n == 'G')||(n == 'T')){
    s++;
     if ((m != 'A')||(m != 'C')||(m != 'G')||(m != 'T')){
   break;
 }
  }
 
  a.at(i) = s;
}
max = max_element(a.begin(),a.end())
cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in assignment
   23 | max = max_element(a.begin(),a.end())
      |       ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                  |
      |                  __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C++

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

int main(){
 string N;
 cin >> N;
   int s = 0;
    vector<int>a(N.size());
    int max;
for (int i = 0; i < (int)N.size(); i++){
  char n = N[i];
  char m = N[i + 1];

  if ((n == 'A')||(n == 'C')||(n == 'G')||(n == 'T')){
    s++;
     if ((m != 'A')||(m != 'C')||(m != 'G')||(m != 'T')){
   break;
 }
  }
 
  a.at(i) = s;
}
max = max_element(a.bigin(),a.end())
cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: 'class std::vector<int>' has no member named 'bigin'; did you mean 'begin'?
   23 | max = max_element(a.bigin(),a.end())
      |                     ^~~~~
      |                     begin
Language: C++

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

int main(){
 string N;
 cin >> N;
for (int i = 0; i < (int)N.size(); i++){
  char n = N[i];
  int s = N.size();
  if ((n == 'A')||(n == 'C')||(n == 'G')||(n == 'T')){
    s--;
  }
}
cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 's' was not declared in this scope
   14 | cout << s << endl;
      |         ^
Language: C++

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

int main(){
 string N;
 cin >> N;
for (int i = 0; i < (int)N.size(); i++){
  char n = N[i];
  int s = N.size();
  if ((n == "A")&&(n == "C")&&(n == "G")&&(n == "T")){
    s--;
  }
}
cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if ((n == "A")&&(n == "C")&&(n == "G")&&(n == "T")){
      |        ~~^~~~~~
a.cc:10:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if ((n == "A")&&(n == "C")&&(n == "G")&&(n == "T")){
      |                    ~~^~~~~~
a.cc:10:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if ((n == "A")&&(n == "C")&&(n == "G")&&(n == "T")){
      |                                ~~^~~~~~
a.cc:10:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if ((n == "A")&&(n == "C")&&(n == "G")&&(n == "T")){
      |                                            ~~^~~~~~
a.cc:14:9: error: 's' was not declared in this scope
   14 | cout << s << endl;
      |         ^
Language: C++

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

int main(){
 string N;
 cin >> N;
for (int i = 0; i < (int)N.size(); i++){
  char n = N[i];
  int s = N.size();
  if ((n = A)&&(n = C)&&(n = G)&&(n = T)){
    s--;
  }
}
cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'A' was not declared in this scope
   10 |   if ((n = A)&&(n = C)&&(n = G)&&(n = T)){
      |            ^
a.cc:10:21: error: 'C' was not declared in this scope
   10 |   if ((n = A)&&(n = C)&&(n = G)&&(n = T)){
      |                     ^
a.cc:10:30: error: 'G' was not declared in this scope
   10 |   if ((n = A)&&(n = C)&&(n = G)&&(n = T)){
      |                              ^
a.cc:10:39: error: 'T' was not declared in this scope
   10 |   if ((n = A)&&(n = C)&&(n = G)&&(n = T)){
      |                                       ^
a.cc:14:9: error: 's' was not declared in this scope
   14 | cout << s << endl;
      |         ^
Language: C++

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

int main() {
  string s;
  cin >> s;
  int ans = 0, now = 0;
  for(int i=0; i<s.size(); i++) {
    if(s.at(i) == 'A' || s.at(i) == 'C' || s.at(i) == 'G' || s.at(i) == 'T') {
      now++;
    } else {
      now = 0
    }
    ans = max(ans, now);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before '}' token
   12 |       now = 0
      |              ^
      |              ;
   13 |     }
      |     ~
Language: C++

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

int main( void )
{
  string S;
  cin >> S;
  int max = 0;
  int count = 0;
  
  for( int i = 0; i < S.size(); i++ ) {
    if( S.at( i ) == 'A' || S.at( i ) == 'C' || S.at( i ) == 'G' || S.at( i ) == 'T' ) {
      count++;
    }
    else {    
      max = max( max, count );
      count = 0;
    }
  }
  
  cout << max << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'max' cannot be used as a function
   16 |       max = max( max, count );
      |             ~~~^~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main(void){
  string S;
  cin >> S;
  int ans = 0;
  int cnt = 0;
  for(int i = 0; i < S.size(); i++){
       if( S[i] == 'A' ||
           S[i] == 'C' ||
           S[i] == 'G' ||
           S[i] == 'T' ){
           cnt++;
       }else{
         if( ans < cnt ) ans = cnt;
         cnt=0;
       }
     }
  }
  if( ans < cnt ) ans = cnt;
  cout << ans << endl;
}

Compiler output:
a.cc:22:3: error: expected unqualified-id before 'if'
   22 |   if( ans < cnt ) ans = cnt;
      |   ^~
a.cc:23:3: error: 'cout' does not name a type
   23 |   cout << ans << endl;
      |   ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int check(char x){
  if(x=='A' || x=='T' || x=='C' || x=='G'){
    return 1;
  else{
  return 0;
  }
}

int main(){
  string S;
  cin>>S;
  int count_inside=0,count_outside=0,j=0;
  for(int i=0;i<S.size();i++){
    while(check(j)==1){
      count_inside++;
      j++;
    }
    count_outsede=max(count_inside,count_outside)
  }
  cout<<count_outside<<endl;
}

Compiler output:
a.cc: In function 'int check(char)':
a.cc:6:3: error: expected '}' before 'else'
    6 |   else{
      |   ^~~~
a.cc:4:43: note: to match this '{'
    4 |   if(x=='A' || x=='T' || x=='C' || x=='G'){
      |                                           ^
a.cc: In function 'int main()':
a.cc:20:5: error: 'count_outsede' was not declared in this scope; did you mean 'count_outside'?
   20 |     count_outsede=max(count_inside,count_outside)
      |     ^~~~~~~~~~~~~
      |     count_outside
Language: C++

using namespace std;
int main(){
  int ans = 0, len = 0;
  string input;
  cin >> input;
  for (int i = 0; i < input.size(); i++)
  {
    if (input[i] == 'A' || input[i] == 'C' || input[i] == 'G' || input[i] == 'T')
    {
      len++;
    }
    else
    {
      	if (ans < len) ans = len;
        len = 0;
    }
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string input;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> input;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:5:10: error: 'input' was not declared in this scope; did you mean 'int'?
    5 |   cin >> input;
      |          ^~~~~
      |          int
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout << ans;
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
 
int main() {
  // input
  string s; cin >> s;
 
  // compute
  int counter = 0;
  int max = 0;
  int ssize =s.size();
  
  for(int i =0; i < ssize; i++){
     bool a,c,g,t;
      a = (s.at(i) == 'A');
      c = (s.at(i) == 'C');
      g = (s.at(i) == 'G');
      t = (s.at(i) == 'T');
    
    if (a || c || g || t) {
        counter++;
         if(counter > max){
             max = counter;
         }
     }else{
         counter = 0;
     }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:32:4: error: expected '}' at end of input
   32 |   }
      |    ^
a.cc:8:12: note: to match this '{'
    8 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
using namespace std; //std::の省略のため
using ll = long long;

ll MOD = 1000000007;

ll m;
string s;

int solve(ll n)
{
    ll count = 0;
    for (ll i = n; i < m; i++)
    {
        if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T')
        {
            count++;
        }
        else
        {
            break;
        }
    }

    return count;
}

int main()
{

    cin >> s;

    m = s.size();

    ll ans = 0, tmp = 0;

    for (ll i = 0; i <= size; i++)
    {
        tmp = solve(i);
        if (tmp > ans)
        {
            ans = tmp;
        }
    }

    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:22: error: invalid operands of types 'll' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator<='
   39 |     for (ll i = 0; i <= size; i++)
      |                    ~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <algorithm>
using namespace std; //std::の省略のため
using ll = long long;

ll MOD = 1000000007;

ll size;
string s;

int solve(ll n)
{
    ll count = 0;
    for (ll i = n; i < size; i++)
    {
        if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T')
        {
            count++;
        }
        else
        {
            break;
        }
    }

    return count;
}

int main()
{

    cin >> s;

    size = s.size();

    ll ans = 0, tmp = 0;

    for (ll i = 0; i <= size; i++)
    {
        tmp = solve(i);
        if (tmp > ans)
        {
            ans = tmp;
        }
    }

    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int solve(ll)':
a.cc:15:24: error: reference to 'size' is ambiguous
   15 |     for (ll i = n; i < size; i++)
      |                        ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:9:4: note:                 'll size'
    9 | ll size;
      |    ^~~~
a.cc: In function 'int main()':
a.cc:35:5: error: reference to 'size' is ambiguous
   35 |     size = s.size();
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:9:4: note:                 'll size'
    9 | ll size;
      |    ^~~~
a.cc:39:25: error: reference to 'size' is ambiguous
   39 |     for (ll i = 0; i <= size; i++)
      |                         ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:9:4: note:                 'll size'
    9 | ll size;
      |    ^~~~
Language: C++

#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < n; ++i)
#include <bits/stdc++.h>
using namespace std;
//~ using ll = long long;
//~ using P = pair<int, int>;

int main(){
  string s;
  int cnt=0;
  int ans=0;
  cin >> s;
  rep(i, n){
    if(s[i]=='A' || s[i]=='C' || s[i]=='G' || s[i]=='T') cnt++
    else{
      ans = max(ans, cnt);
      cnt=0;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'n' was not declared in this scope
   13 |   rep(i, n){
      |          ^
a.cc:2:39: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (int i = 0; i < n; ++i)
      |                                       ^
a.cc:14:63: error: expected ';' before 'else'
   14 |     if(s[i]=='A' || s[i]=='C' || s[i]=='G' || s[i]=='T') cnt++
      |                                                               ^
      |                                                               ;
   15 |     else{
      |     ~~~~
Language: C++

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using vl = vector<ll>;
using vc = vector<char>;
using vvl = vector<vector<ll>>;
using vvc = vector<vector<char>>;

#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define repd(i, n) for (ll i = n - 1; i >= 0; i--)
#define all(x) x.begin(), x.end()

ll n, k, m, M = 1e9 + 7;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    string s;
    cin >> s;

    int n = s. size();

    vector<int> pos;
    rep(i, n) {
        if(x != 'A' && x != 'C' && x != 'G' && x != 'T') {
            pos.push_back(i);
        }
    }

    n = pos.size();
    int max = pos[0];
    rep(i, n - 1) {
        if(pos[i + 1] - pos[i] - 1 > max) {
            max = pos[i + 1] - pos[i] - 1;
        }
    }

    cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: 'x' was not declared in this scope
   28 |         if(x != 'A' && x != 'C' && x != 'G' && x != 'T') {
      |            ^
Language: C++

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

int main() {
  string s;
  cin >> s;
  int count = 0, idx=0;
  vector<int> v;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] != 'A' && s[i] != 'T' && s[i] != 'G' && s[i] != 'C') {
      v[idx] = i;
      idx++;
    }
    for (int i = 0; i < idx; i++) {
        if(v[i+1]-v[i]>count) count = v[i+1]-v[i];
    }
    cout << count << endl;
    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:19:4: error: expected '}' at end of input
   19 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

void chmax(int& a, int b) {
  if (a < b) a = b;
}

int main() {
  string S;
  cin >> S;
  
  int ans = 0;
  // i スタートとしてカウント
  for (int i = 0; i < S.size(); i++) {
    if (S[i] != 'A' && S[i] != 'C' 
        && S[i] != 'G' && S[i] != 'T') continue;
    
    int count = 1;
    for (j = i+1; j < S.size(); j++) {
      if (S[i] == 'A' || S[i] == 'C' 
        || S[i] == 'G' || S[i] != 'T') {
        count++;
      } else {
        chamx(ans, count);
        break;
      }
    }
    
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: 'j' was not declared in this scope
   19 |     for (j = i+1; j < S.size(); j++) {
      |          ^
a.cc:24:9: error: 'chamx' was not declared in this scope; did you mean 'chmax'?
   24 |         chamx(ans, count);
      |         ^~~~~
      |         chmax
Language: C++

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

#ifndef ONLINE_JUDGE
#  define LOG(x) (cerr <<">>>>>>"<< #x << " = " << (x) << endl)
#else
#  define LOG(x) ((void)0)
#endif

int main()
{
	
string s;
int c=0,an=0;
cin>>s;
for(int i=0;i<(int)s.size();i++)
if(s[i]=='A'||s[i]=='T'||s[i]=='C'||s[i]=='G'){c++;an=max(an,c);
else{an=max(an,c);c=0;}
cout<<an<<endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:1: error: expected '}' before 'else'
   18 | else{an=max(an,c);c=0;}
      | ^~~~
a.cc:17:47: note: to match this '{'
   17 | if(s[i]=='A'||s[i]=='T'||s[i]=='C'||s[i]=='G'){c++;an=max(an,c);
      |                                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s;
  cin >> s;
  string model = " ATGC" ;
  int now = 0;
  for ( int i=0 ; i < s.size() ; i++){
    bool is = false ;
    for ( int j = 0 ; j<4 ; j++){
      if ( model.at(j) == s.at(i)){
        is = true;
      }
    }
    if ( ! is ) {
      now = 0 ;
  }else  now++;
        ans = max ( ans , now) ;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |         ans = max ( ans , now) ;
      |         ^~~
      |         abs
a.cc:21:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s;
  cin >> s;
  string model = " ATGC" ;
  int now = 0;
  for ( int i=0 ; i< s.size() ; i++){
    bool is = false ;
    for ( int j = 0 ; j<4 ; j++){
      if ( model.at(j) == s.at(i)){
        is = true;
      }
    }
    if ( ! is ) {
      now = 0 ;
  }else  now++;
        ans = max ( ans , now) ;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |         ans = max ( ans , now) ;
      |         ^~~
      |         abs
a.cc:21:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

bool isAGCT(char c) {
  return (c == 'A' || c == 'G' || c == 'C' || c == 'T');
}

int main() {
  string S;
  cin >> S;
  int N = S.size();
  int res = 0;
  for (int i = 0; i < N; ++i) {
    if (!isAGCT(S[i])) {
      int j = i+1;
      while (j < N && isAGCD(S[j])) ++j;
      res = max(res, j - i - 1);
    }
  }
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: 'isAGCD' was not declared in this scope; did you mean 'isAGCT'?
   16 |       while (j < N && isAGCD(S[j])) ++j;
      |                       ^~~~~~
      |                       isAGCT
Language: Java

import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;
 
public class Solution {
 
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String B = sc.nextLine();
    int max = 0;
    int count = 0;
    for(int i=0; i<B.length(); i++) {
      if(B.charAt(i) == 'A' || B.charAt(i) == 'C' || B.charAt(i) == 'G' || B.charAt(i) == 'T') {
        count++;
      } else {
        
        max = Math.max(max, count);
        count = 0;
      }
    }
    max = Math.max(max, count);
    System.out.println(max);
  }
}


Compiler output:
Main.java:5: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Qabc122batcoder 
{
	static boolean Valid(String S)
	{
		for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		}
		return true;
	}
	
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		String S = BR.readLine();
		int Best = 0;
		for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = 1; j <= substr.length(); j++)
			{
				String result = substr.substring(0, j);
				//System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		}
		System.out.println(Best);
	}
}


Compiler output:
Main.java:5: error: class Qabc122batcoder is public, should be declared in a file named Qabc122batcoder.java
public class Qabc122batcoder 
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Qabc122batcoder 
{
	static boolean Valid(String S)
	{
		for (char C : S.toCharArray())
		{
			if (C != 'A' && C != 'C' && C != 'T' && C != 'G') return false;
		}
		return true;
	}
	
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
		String S = BR.readLine();
		int Best = 0;
		for (int i = 0; i < S.length(); i++)
		{
			String substr = S.substring(i);
			for (int j = substr.length() - 1; j >= 0; j--)
			{
				String result = substr.substring(0, j);
				System.out.println(result);
				if (Valid(result)) Best = Math.max(Best, result.length());
			}
		}
		System.out.println(Best);
	}
}


Compiler output:
Main.java:5: error: class Qabc122batcoder is public, should be declared in a file named Qabc122batcoder.java
public class Qabc122batcoder 
       ^
1 error
Language: C++

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

int main () {
    string S;
    cin >> S;
    
    int count=0;

    for (int i=0; i<S.size(); i++) {
        for (int j=1; j<S.size()-i
        if (S[i]=='A' || S[i]=='C' || S[i]=='G' || S[i]=='T') {
            count++;
        }
        else {
            break;
        }

        

Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: expected ';' before 'if'
   11 |         for (int j=1; j<S.size()-i
      |                                   ^
      |                                   ;
   12 |         if (S[i]=='A' || S[i]=='C' || S[i]=='G' || S[i]=='T') {
      |         ~~                         
a.cc:12:9: error: expected primary-expression before 'if'
   12 |         if (S[i]=='A' || S[i]=='C' || S[i]=='G' || S[i]=='T') {
      |         ^~
a.cc:11:35: error: expected ')' before 'if'
   11 |         for (int j=1; j<S.size()-i
      |             ~                     ^
      |                                   )
   12 |         if (S[i]=='A' || S[i]=='C' || S[i]=='G' || S[i]=='T') {
      |         ~~                         
a.cc:17:10: error: expected '}' at end of input
   17 |         }
      |          ^
a.cc:10:36: note: to match this '{'
   10 |     for (int i=0; i<S.size(); i++) {
      |                                    ^
a.cc:17:10: error: expected '}' at end of input
   17 |         }
      |          ^
a.cc:4:13: note: to match this '{'
    4 | int main () {
      |             ^
Language: C++

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

int main(){
    string S;
    cin >> S;
    vector<int> count(10);
    int ans = 0;
    for(int i = 0; i < S.size(); i++){
        int pre = 0;
        if(S[i] == 'A' || S[i] == 'T' || S[i] == 'G' || S[i] == 'C'){
            pre++;
        
            for(int j = 1; j < S.size(); j++){
                if(S[i+j] == 'A' || S[i+j] == 'T' || S[i+j] == 'G' || S[i+j] == 'C'){
                    pre++;
                }
                else{
                    break;
                }
           }
      }
       ans = max(ans, pre);
       cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

using str = string;
using ss = stringstream;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);

    str s;
    cin>>s;

    int ans=0:
    int cnt=0;

    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T')cnt++;
        else
        {
            ans=max(ans,cnt);
            cnt=0;
        }
        
    }

    cout<<ans<<"\n";

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: expected ',' or ';' before ':' token
   15 |     int ans=0:
      |              ^
a.cc:20:55: error: 'cnt' was not declared in this scope; did you mean 'int'?
   20 |         if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T')cnt++;
      |                                                       ^~~
      |                                                       int
a.cc:23:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
   23 |             ans=max(ans,cnt);
      |                         ^~~
      |                         int
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
#define all(x) x.begin(), x.end()

signed main() {
	string s;
	cin >> s;
	int cou = 0, ans = 0;
	for(int i = 0; i < s.size(); i++){
		if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T') {
			cou++;
			ans = (ans, cou);
		else {
			cou = 0;
		}
	}
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected '}' before 'else'
   15 |                 else {
      |                 ^~~~
a.cc:12:64: note: to match this '{'
   12 |                 if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T') {
      |                                                                ^
Language: C++

include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
#define MOD 1e9+7;
using namespace std;
using ll = long long;

int main() {
	string str;
	int ans = 0;
	cin >> str;
	int n = str.size();
	vector<int> s(n);
	rep(i,n) {
		if (str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] == 'T') s[i] = 1;
		else s[i] = 0;
	}
	if (n == 1) {
		if (s[0]) cout << 1;
		else cout << 0;
		return 0;
	}
	int count = 0;
	rep(i,n-1) {
		if (s[i] ==1&& s[i+1])==1 count++;
		if (s[i] ==1&& s[i+1]==0) {
			count++;
			if (ans < count) ans = count;
			count = 0;
		}
		if (i == n - 2 && s[i+1]==1) {
			count++;
			if (ans < count) ans = count;
		}
	}
	cout << ans;
	return 0;
}


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:8:9: error: 'string' was not declared in this scope
    8 |         string str;
      |         ^~~~~~
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> str;
      |         ^~~
a.cc:10:16: error: 'str' was not declared in this scope; did you mean 'std'?
   10 |         cin >> str;
      |                ^~~
      |                std
a.cc:12:9: error: 'vector' was not declared in this scope
   12 |         vector<int> s(n);
      |         ^~~~~~
a.cc:12:16: error: expected primary-expression before 'int'
   12 |         vector<int> s(n);
      |                ^~~
a.cc:14:87: error: 's' was not declared in this scope
   14 |                 if (str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] == 'T') s[i] = 1;
      |                                                                                       ^
a.cc:15:22: error: 's' was not declared in this scope
   15 |                 else s[i] = 0;
      |                      ^
a.cc:18:21: error: 's' was not declared in this scope
   18 |                 if (s[0]) cout << 1;
      |                     ^
a.cc:18:27: error: 'cout' was not declared in this scope
   18 |                 if (s[0]) cout << 1;
      |                           ^~~~
a.cc:19:22: error: 'cout' was not declared in this scope
   19 |                 else cout << 0;
      |                      ^~~~
a.cc:24:21: error: 's' was not declared in this scope
   24 |                 if (s[i] ==1&& s[i+1])==1 count++;
      |                     ^
a.cc:24:39: error: expected primary-expression before '==' token
   24 |                 if (s[i] ==1&& s[i+1])==1 count++;
      |                                       ^~
a.cc:25:21: error: 's' was not declared in this scope
   25 |                 if (s[i] ==1&& s[i+1]==0) {
      |                     ^
a.cc:30:35: error: 's' was not declared in this scope
   30 |                 if (i == n - 2 && s[i+1]==1) {
      |                                   ^
a.cc:35:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   35 |         cout << ans;
      |         ^~~~
      |         count
Language: C++

include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
#define MOD 1e9+7;
using namespace std;
using ll = long long;

int main() {
	string str;
	int ans = 0;
	cin >> str;
	int n = str.size();
	vector<int> s(n);
	rep(i,n) {
		if (str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] == 'T') s[i] = 1;
		else s[i] = 0;
	}
	if (n == 1) {
		if (s[0]) cout << 1;
		else cout << 0;
		return 0;
	}
	int count = 0;
	rep(i,n-1) {
		if (s[i] && s[i+1]) count++;
		if (s[i] && !s[i+1]) {
			count++;
			if (ans < count) ans = count;
			count = 0;
		}
		if (i == n - 2 && s[i+1]) {
			count++;
			if (ans < count) ans = count;
		}
	}
	cout << ans;
	return 0;
}

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:8:9: error: 'string' was not declared in this scope
    8 |         string str;
      |         ^~~~~~
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> str;
      |         ^~~
a.cc:10:16: error: 'str' was not declared in this scope; did you mean 'std'?
   10 |         cin >> str;
      |                ^~~
      |                std
a.cc:12:9: error: 'vector' was not declared in this scope
   12 |         vector<int> s(n);
      |         ^~~~~~
a.cc:12:16: error: expected primary-expression before 'int'
   12 |         vector<int> s(n);
      |                ^~~
a.cc:14:87: error: 's' was not declared in this scope
   14 |                 if (str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] == 'T') s[i] = 1;
      |                                                                                       ^
a.cc:15:22: error: 's' was not declared in this scope
   15 |                 else s[i] = 0;
      |                      ^
a.cc:18:21: error: 's' was not declared in this scope
   18 |                 if (s[0]) cout << 1;
      |                     ^
a.cc:18:27: error: 'cout' was not declared in this scope
   18 |                 if (s[0]) cout << 1;
      |                           ^~~~
a.cc:19:22: error: 'cout' was not declared in this scope
   19 |                 else cout << 0;
      |                      ^~~~
a.cc:24:21: error: 's' was not declared in this scope
   24 |                 if (s[i] && s[i+1]) count++;
      |                     ^
a.cc:25:21: error: 's' was not declared in this scope
   25 |                 if (s[i] && !s[i+1]) {
      |                     ^
a.cc:30:35: error: 's' was not declared in this scope
   30 |                 if (i == n - 2 && s[i+1]) {
      |                                   ^
a.cc:35:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   35 |         cout << ans;
      |         ^~~~
      |         count
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
#define MOD 1e9+7;
using namespace std;
using ll = long long;

int main() {
	string str;
	int ans = 0;
	cin >> str;
	int n = str.size();
	vector<int> s(n);
	rep(i,n) {
		if (str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] == 'T') s[i] = 1;
		else s[i] = 0;
	}
	int count = 0;
	rep(i,n-1) {
		if (s[i] == 1 && s[i+1] == 1) {
			count++;
			if (i == n - 2) {
				count++;
				if (ans < count) ans = count;
			}
		}
		if (s[i] == 1 && s[i+1] == 0) {
			count++;
			if (ans < count) ans = count;
			count = 0;
		}
	}
	cout << ans;
	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:33:18: error: expected '}' at end of input
   33 |         return 0;
      |                  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  char n;
    int count=0,maxnum=0;
  while(cin >> n){
    if(n=='A' || n=='G' || n=='C' || n== 'T')count++;
      else{
        if(Max<count)maxnum=count;
        count=0;
      }
  }
  cout << maxnum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'Max' was not declared in this scope
    9 |         if(Max<count)maxnum=count;
      |            ^~~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i = 0; i < (ll)(n); i++)
#define inf 1000000000000000000
#define mod 1000000007
#define mod2 998244353
#define pi acos(-1)
#define all(x) (x).begin(),(x).end()
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main {
  string s;
  cin >> s;
  ll n = s.size()
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n + 1; j++) {
      ll res = j - i;
      for (k = i; k < j; k++) {
        if (s[k] != 'A' && s[k] != 'C' && s[k] != 'G' && s[k] != 'T') res = 0
      }
      chmax(ans, res)
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc:14:5: error: cannot declare '::main' to be a global variable
   14 | int main {
      |     ^~~~
a.cc:15:10: error: expected primary-expression before 's'
   15 |   string s;
      |          ^
a.cc:15:10: error: expected '}' before 's'
a.cc:14:10: note: to match this '{'
   14 | int main {
      |          ^
a.cc:16:3: error: 'cin' does not name a type
   16 |   cin >> s;
      |   ^~~
a.cc:17:10: error: 's' was not declared in this scope
   17 |   ll n = s.size()
      |          ^
a.cc:18:15: error: 'i' does not name a type; did you mean 'pi'?
   18 |   for (i = 0; i < n; i++) {
      |               ^
      |               pi
a.cc:18:22: error: 'i' does not name a type; did you mean 'pi'?
   18 |   for (i = 0; i < n; i++) {
      |                      ^
      |                      pi
a.cc:27:3: error: 'cout' does not name a type
   27 |   cout << ans << endl;
      |   ^~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next(); //入力された文字列
    char st //文字を入れる場所;
    char ch[] = {'A','C','G','T'}; //比較対象の文字列
    int count = 0; //カウント
    int count_max = 0; //カウントの最大地
    boolean con; //ループを中断させる為の論理型変数
    
    for(int i = 0; i < s.length();i++){ //全ての文字を参照するようにループ
    	st = s.charAt(i); //文字列
      	con = true; //続行条件を正に
      	count++; //カウント加算
      	for(int j = 0; j < 4 && con;j++){ //conがtrueもしくは比較対象の文字列全てを比較しおえるまでループ
          if(st == ch[j]) con = false; //比較対象の文字列と一致していればconをfalseにしてループ終了
        }
      	if(con) count = 0; //conがtrueのまま終了した場合カウントを0に
      	if(count > count_max) count_max = count; //カウントが最大値を上回っていれば更新
    }
    
    System.out.println(count_max); //最大値を出力
  }
}


Compiler output:
Main.java:7: error: ';' expected
    char st //????????;
           ^
1 error