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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(s,i, n) for (int i = (int)s; i < (int)(n); i++)
#define pb push_back
typedef long long ll;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:34: error: expected ')' before 's'
   14 |         if(s[i]=='A' || s[i]=='T' s[i]=='G' || s[i]=='C'){
      |           ~                      ^~
      |                                  )
Language: C++

#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<string.h>
#include<algorithm>
#include<climits>
using namespace std;
  
int main() {
  string s;
  cin >> s;

  int N = s.size();
  int tmp = 0;
  int ans = 0;
  for(int i = 1; i<N; i++){
    if((s[i-1] == 'A'
        || s[i-1] == 'T'
        || s[i-1] == 'G'
        || s[i-1] == 'C'
        ) && ( 
          s[i] == 'A'
          s[i] == 'C'
          s[i] == 'G'
          s[i] == 'T'
        )){
          tmp++;
        }
      else{
        ans = max(tmp, ans);
        ans = 0;
      }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:22: error: expected ')' before 's'
   23 |           s[i] == 'A'
      |                      ^
      |                      )
   24 |           s[i] == 'C'
      |           ~           
a.cc:22:14: note: to match this '('
   22 |         ) && (
      |              ^
a.cc:29:10: error: expected ')' before 'else'
   29 |         }
      |          ^
      |          )
   30 |       else{
      |       ~~~~
a.cc:18:7: note: to match this '('
   18 |     if((s[i-1] == 'A'
      |       ^
a.cc:34:3: error: expected primary-expression before '}' token
   34 |   }
      |   ^
Language: C++

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


int main(){
  string S;
  cin >> S;
  vector<string> T = {'A','T','G','C'};
 
 int ans = 0;
 int sum = 0;
 int hantei = 0;
  for(int i = 0; i < S.size(); i++){
    if(S[i] == 'A' || S[i] == 'T' || S[i] == 'G' || S[i] == 'C'){ sum += 1; }
    else{ sum = 0; }

    if(sum > ans){ ans = sum; }
    
  }

  cout << ans << endl;
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:38: error: could not convert '{'A', 'T', 'G', 'C'}' from '<brace-enclosed initializer list>' to 'std::vector<std::__cxx11::basic_string<char> >'
    8 |   vector<string> T = {'A','T','G','C'};
      |                                      ^
      |                                      |
      |                                      <brace-enclosed initializer list>
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  string s;
  cin>>s;
  int count=0;
  rep(i,10){
    if(s[i]=='A' || s[i]=='T' || s[i]=='G' || s[i]=='C'){
      c++;
    }
    else{
      c=0;
    }
    if(c>count)
      count=c;
  }
  cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'c' was not declared in this scope
   14 |       c++;
      |       ^
a.cc:17:7: error: 'c' was not declared in this scope
   17 |       c=0;
      |       ^
a.cc:19:8: error: 'c' was not declared in this scope
   19 |     if(c>count)
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  string s;
  cin>>s;
  int c=0;
  rep(i,n){
    if(s[i]=='A' || s[i]=='T' || s[i]=='G' || s[i]=='C'){
      c++;
    }
    else
      c=0;
  }
  cout<<c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'n' was not declared in this scope
   12 |   rep(i,n){
      |         ^
a.cc:3:38: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
      |                                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int ans = 0;
  int N = 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'){
      ans = max(ans , N);
    }
    else{
      N = 0
    }
  }
  cout << ans << endl;
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int ans = 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'){
      ans = max(ans , N);
    }
    else{
      N = 0
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'N' was not declared in this scope
    9 |       ans = max(ans , N);
      |                       ^
a.cc:12:7: error: 'N' was not declared in this scope
   12 |       N = 0
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str;
  cin>>str;
  int n,k,ans;
  n=str.size();
  vector<int> vec(n);
  for(int i=0; i<n; i++){
    if(str.at(i)=='A'||str.at(i)=='T'||str.at(i)=='C'||str.at(i)=='G'){
      vec.at(i)=1;
      
    }
    else{
      vec.at(i)=0;
    }
  }
  ans=0;
  k=0;
  for(int i=0; i<n; i++){
    if(vec.at(i)==1){
      k=k+1;
    }
    else{
      ans=max(k,ans);
      k=0;
    }
  }
  ans=max(k,ans)
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: expected ';' before 'cout'
   30 |   ans=max(k,ans)
      |                 ^
      |                 ;
   31 |   cout<<ans;
      |   ~~~~
Language: C++

using namespace std;
#define int long long

// typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<PII> VP;

// rep
//------------------------------------------
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) (x).begin(), (x).end()
#define DEBUG(x) cerr << #x << ": " << x << '\n'

string s;

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

signed main()
{
    cin >> s;
    int res = 0;

    REP(i, s.size()){
        if (!check(s[i])) continue;
        FOR(j, i+1, s.size()){
            if (!check(s[j])) break;
            res = max(res, j - i + 1);
        }
    }

    cout << res << endl;
    return 0;
}

Compiler output:
a.cc:6:9: error: 'pair' does not name a type
    6 | typedef pair<int, int> PII;
      |         ^~~~
a.cc:7:9: error: 'vector' does not name a type
    7 | typedef vector<int> VI;
      |         ^~~~~~
a.cc:8:9: error: 'vector' does not name a type
    8 | typedef vector<VI> VVI;
      |         ^~~~~~
a.cc:9:9: error: 'vector' does not name a type
    9 | typedef vector<string> VS;
      |         ^~~~~~
a.cc:10:9: error: 'vector' does not name a type
   10 | typedef vector<PII> VP;
      |         ^~~~~~
a.cc:19:1: error: 'string' does not name a type
   19 | string s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:27:5: error: 'cin' was not declared in this scope
   27 |     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 | using namespace std;
a.cc:27:12: error: 's' was not declared in this scope
   27 |     cin >> s;
      |            ^
a.cc:34:19: error: 'max' was not declared in this scope
   34 |             res = max(res, j - i + 1);
      |                   ^~~
a.cc:38:5: error: 'cout' was not declared in this scope
   38 |     cout << res << endl;
      |     ^~~~
a.cc:38:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:38:20: error: 'endl' was not declared in this scope
   38 |     cout << res << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int ans=0;
string s;
cin>>s;
for(int i=0;i<s.size();i++){
  if(s.at(i)=='A'||s.at(i)=='T'||s.at(i)=='G'||s.at(i)=='C'){

Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin>>s;
      | ^~~
a.cc:6:1: error: expected unqualified-id before 'for'
    6 | for(int i=0;i<s.size();i++){
      | ^~~
a.cc:6:13: error: 'i' does not name a type
    6 | for(int i=0;i<s.size();i++){
      |             ^
a.cc:6:24: error: 'i' does not name a type
    6 | for(int i=0;i<s.size();i++){
      |                        ^
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] T = sc.next().split("");
    int ans = 0;
    int now = 0;
    String[] atcg = {"A", "T", "C","G"};
    for(int i = 0; i < T.length(); i++){
      boolean isATCG = false;
      for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      }
      if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      }
    }
    System.out.println(ans);
  }
}
        
        

Compiler output:
Main.java:9: error: cannot find symbol
    for(int i = 0; i < T.length(); i++){
                        ^
  symbol:   method length()
  location: variable T of type String[]
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s;
  cin >> s;
  
  string acgt = "ACGT";
  
  int max = 0;
  int count = 0;
  
  for(int i = 0; i < s.length(); ++i){
    int j;
    bool hit = false;
    for(j = 0; j < acgt.length(); ++j){
      if(s[i] == acgt[j]){
        ++count;
        hit = true;
      }
    }
    if(!hit){
      if(count > max){
        max = count;
      }
      count = 0;
    }
  }
  
  if(count > max) max = count;
  
  cout << max << endl;

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s;
  cin >> s;
  
  char hit[] = {'A', 'C', 'G', 'T'};
  
  int max = 0;
  int count = 0;
  
  for(int i = 0; i < s.length; ++i){
    int j;
    for(j = 0; j < 4; ++j){
      if(s[i] == hit[j]){
        ++count;
        break;
      }
    }
    if(j == 4){
      if(count > max){
        max = count;
      }
      count = 0;
    }
  }
  
  cout << max << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   13 |   for(int i = 0; i < s.length; ++i){
      |                      ~~^~~~~~
      |                              ()
Language: C++

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

int main(){
  int S;
  cin >> S;
  bool Sub = false;
  int Length = 0;
  for (int i = S.size(); i >= 0; i--){
    for (int j = 0; j < S.size() - i; j++){
      string A = S.substr(j,i);
       for(int k = 0; k < i; k++){
         if (A[k] == 'A'|| A[k] == 'T'|| A[k] == 'G'||A[k] == 'C'){
           Sub = true;
         }
       }
    }
    if(Sub){
      Length = i;
      break;
    }
  }
  cout << Length << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: request for member 'size' in 'S', which is of non-class type 'int'
   11 |   for (int i = S.size(); i >= 0; i--){
      |                  ^~~~
a.cc:12:27: error: request for member 'size' in 'S', which is of non-class type 'int'
   12 |     for (int j = 0; j < S.size() - i; j++){
      |                           ^~~~
a.cc:13:20: error: request for member 'substr' in 'S', which is of non-class type 'int'
   13 |       string A = S.substr(j,i);
      |                    ^~~~~~
Language: C++

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

int main(){
  string s;
  cin >> s;
  int count = 0;
  for(int i = 0; i < s.size(); i++){
    for(int j = i; j < s.size(); j++){
      string s1 = substr(i, j);
      int count1 = 0;
      for(int k = i; k <= j; k++){
        if (s1.at(k) == 'A' || s1.at(k) == 'C' || s1.at(k) == 'G' || s1.at(k) == 'T'){
          count1++;
        }
        else break;
      }
      if(count < count1) count = count1;
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   11 |       string s1 = substr(i, j);
      |                   ^~~~~~
      |                   strstr
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 = i; j < s.size(); j++){
      string s1 = substr(i, j);
      int count1 = 0;
      for(int k = i; k <= j; k++){
        if (s1.at(k) == 'A' || s1.at(k) == 'C' || s1.at(k) == 'G' || s1.at(k) == 'T'){
          count1++;
        }
        else break;
      }
      if(count < count1) count = count1;
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   10 |       string s1 = substr(i, j);
      |                   ^~~~~~
      |                   strstr
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 > i; j < s.size(); j++){
      string s1 = substr(i, j);
      int count1 = 0;
      for(int k >= i; k <= j; k++){
        if (s1.at(k) == 'A' || s1.at(k) == 'C' || s1.at(k) == 'G' || s1.at(k) == 'T'){
          count1++;
        }
        else break;
      }
      if(count < count1) count = count1;
    }
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before '>' token
    9 |     for(int j > i; j < s.size(); j++){
      |              ^~
      |              ;
a.cc:9:15: error: expected primary-expression before '>' token
    9 |     for(int j > i; j < s.size(); j++){
      |               ^
a.cc:9:32: error: expected ')' before ';' token
    9 |     for(int j > i; j < s.size(); j++){
      |        ~                       ^
      |                                )
a.cc:9:34: error: 'j' was not declared in this scope
    9 |     for(int j > i; j < s.size(); j++){
      |                                  ^
Language: C++

	#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for( int i = 0 ; i < n ; i++ )
typedef long long ll ;
int main() {
  string S;
  cin >> S ;
  int ans =  0 ;
  int count = 0 ;
  rep(i,ans.size()){
	if(S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'T' ||  S.at(i) == 'G' )count++ ;
    else{
      ans = max(ans,count) ;
      count = 0 ;
    }
  }
  ans = max(ans,count) ;
  cout << ans << endl  ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: request for member 'size' in 'ans', which is of non-class type 'int'
   10 |   rep(i,ans.size()){
      |             ^~~~
a.cc:3:39: note: in definition of macro 'rep'
    3 | #define rep(i,n) for( int i = 0 ; i < n ; i++ )
      |                                       ^
Language: C++

/#include <bits/stdc++.h>
using namespace std;
int main() {
	int l = 0,r=0,maxi=0;
	string S;
	cin >> S;
	for (size_t i = 0; i < S.size(); i++)
	{
		if (S.at(i)=='A'|| S.at(i) == 'T'|| S.at(i) == 'G'|| S.at(i) == 'C')
		{
			r++;
		}
		else {
			maxi = max(r-l, maxi);
			l = i;
			r = i;
		}
	}
	maxi = max(r - l, maxi);
	cout << maxi;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | /#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: expected unqualified-id before '/' token
    1 | /#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string S;
      |         ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> S;
      |         ^~~
a.cc:6:16: error: 'S' was not declared in this scope
    6 |         cin >> S;
      |                ^
a.cc:7:14: error: 'size_t' was not declared in this scope
    7 |         for (size_t i = 0; i < S.size(); i++)
      |              ^~~~~~
a.cc:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | /#include <bits/stdc++.h>
a.cc:7:28: error: 'i' was not declared in this scope
    7 |         for (size_t i = 0; i < S.size(); i++)
      |                            ^
a.cc:14:32: error: 'max' was not declared in this scope; did you mean 'maxi'?
   14 |                         maxi = max(r-l, maxi);
      |                                ^~~
      |                                maxi
a.cc:19:16: error: 'max' was not declared in this scope; did you mean 'maxi'?
   19 |         maxi = max(r - l, maxi);
      |                ^~~
      |                maxi
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout << maxi;
      |         ^~~~
Language: C++

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

int main() {
    string s;
    cin >> s;
    int count=0;
    int ans=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{
            ans=max(ans,count);
            count=0;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:61: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s.at(i)=='A'||s.at(i)=='C'||s.at(i)=='G'||s.at(i)=="T"){
      |                                                      ~~~~~~~^~~~~
Language: C++

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

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

Compiler output:
a.cc:23:5: error: 'cout' does not name a type
   23 |     cout << M << endl;
      |     ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: expected primary-expression before ',' token
   24 |   cout  << max <, endl;
      |                 ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[i] == "A" || s[i] == "T" || s[i] == "C" || s[i] == "G"){
a.cc:10:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[i] == "A" || s[i] == "T" || s[i] == "C" || s[i] == "G"){
a.cc:10:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[i] == "A" || s[i] == "T" || s[i] == "C" || s[i] == "G"){
a.cc:10:62: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[i] == "A" || s[i] == "T" || s[i] == "C" || s[i] == "G"){
a.cc:18:23: error: expected ';' before 'cout'
   18 |     ans = max(ans,cnt)
      |                       ^
      |                       ;
   19 |     cout << ans << endl;
      |     ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int y;
  y=s.size();
  string s;
  cin >> s;
  for(int i=0;i<y;i++){
    if(s.at(i)!='A'||s.at(i)!='T'||s.at(i)!='C'||s.at(i)!='G'){
      cout << i << endl;
      break;
    }else{
    ;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 's' was not declared in this scope
    5 |   y=s.size();
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int ans = 0;

bool acgt(string s) {
  for (char c : s) if (c != 'A' && c != 'C' && c != 'G' && c != 'T') return false;
  return true;
}

int main() {
  string s; cin >> s;
  for (int i = 0; i < s.length(); i++)
    for (int j = 0; j < s.length(); j++)
      if (acgt(s.substr(i, j)))
        ans = max(ans, s.substr(i, j).size());
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)'
   15 |         ans = max(ans, s.substr(i, j).size());
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:15:18: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   15 |         ans = max(ans, s.substr(i, j).size());
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:15:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   15 |         ans = max(ans, s.substr(i, j).size());
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
int main(){
  string s;
  cin>>s
    s.pb('u');
  int cu=0;
  int ans=0;
  rep(i,s.size()){
    if(s[i]=='A'||s[i]=='T'||s[i]=='C'||s[i]=='G'){
      cu++;
    }
    else {
      ans=max(ans,cu);
    }
  }
  COUT(ans);
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: expected ';' before 's'
   30 |   cin>>s
      |         ^
      |         ;
   31 |     s.pb('u');
      |     ~
Language: C++

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

int main(){
    string s;
    cin>>s;
    int sz=s.size(),cnt=0,ans=0;

    for(int i=0; i<sz; i++){
        if(s.at(i)=='A'||s.at(i)=='C'||s.at(i)=='G'||s.at(i)=='T') cnt++;
        else{
            ans=max(cnt,ans);
            cnt=0;
        }
        if(i==n-1) ans=max(cnt,ans);
    }

    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'n' was not declared in this scope
   15 |         if(i==n-1) ans=max(cnt,ans);
      |               ^
Language: C++

#include<bits/stdc++.h>
#include<iomanip>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
typedef long  l;
typedef pair<int,int> P;
const ll INF=100000000000000001;
const double PI=3.141592653589;


int main(){
  string s; cin>>s;
  int length=0;
  int index=0;
  rep(i,s.size()-1){
    if(s[i]!='A'&&s[i]!='T'&&s[i]!='G'&&s[i]!='C')
    continue;
    int end=0;
    for(int j=i+1;j<s.size();j++){
      if(s[j]!='A'&&s[j]!='T'&&s[j]!='G'&&s[j]!='C')
      break;
      end=j;
    }
      // cout<<i<<" "<<end<<endl;
    if(length<end-i){
      length=end-i+1;
      index=i;
    }
  }
  if(s.size()==1&&(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C'))
  length=1;
  cout<<length<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:22: error: 'i' was not declared in this scope
   31 |   if(s.size()==1&&(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C'))
      |                      ^
Language: C++

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

bool judge(char a){
    if(a=='A'){return true;}
    if(a=='C'){return true;}
    if(a=='T'){return true;}
    if(a=='G'){return true;}
    return false;
}

int main(){
    string s;
    int cou=0,sum=0;
    for(int i=0;i<s.size();i++){
        if(judge(s.at(i))){
            cou++
        }else{
            sum=max(sum,cou);
            cou=0;
        }
    }

    cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: expected ';' before '}' token
   17 |             cou++
      |                  ^
      |                  ;
   18 |         }else{
      |         ~
Language: C++

s = input()
ans = 0
for i in range(len(s)):
    for j in range(i, len(s) + 1):
        if s[i:j].count('A') + s[i:j].count('C') + s[i:j].count('G') + s[i:j].count('T') == len(s[i:j]):
            ans = max(ans, len(s[i:j]))
print(ans)

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int count = 0;
  string s; cin >> s;
  int ans=0;
  for(int i=0;i<n;i++){
    if(s[i]!='A' || s[i]!='G' || s[i]!='C' || s[i]!='T') count=0;
    count++;
    ans=max(ans,count);
  }
	cout << ans << endl;
  	return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'n' was not declared in this scope
    7 |   for(int i=0;i<n;i++){
      |                 ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before '}' token
   11 |       ans++
      |            ^
      |            ;
   12 |     }
      |     ~
Language: C

    char b[11];
    int cnt,max;
    max=cnt=0;
    scanf("%s",b);
    for(int i=0;i<10;i++){
        if(b[i]=='A'||b[i]=='C'||b[i]=='G'||b[i]=='T'){
            cnt++;
        }
        else{
            if(max<cnt)max=cnt;
            cnt=0;
        }
    }
    printf("%d\n",max);
    return 0;
}

Compiler output:
main.c:3:5: warning: data definition has no type or storage class
    3 |     max=cnt=0;
      |     ^~~
main.c:3:5: error: type defaults to 'int' in declaration of 'max' [-Wimplicit-int]
main.c:3:9: error: initializer element is not constant
    3 |     max=cnt=0;
      |         ^~~
main.c:4:11: error: expected declaration specifiers or '...' before string constant
    4 |     scanf("%s",b);
      |           ^~~~
main.c:4:16: error: expected declaration specifiers or '...' before 'b'
    4 |     scanf("%s",b);
      |                ^
main.c:5:5: error: expected identifier or '(' before 'for'
    5 |     for(int i=0;i<10;i++){
      |     ^~~
main.c:5:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    5 |     for(int i=0;i<10;i++){
      |                  ^
main.c:5:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    5 |     for(int i=0;i<10;i++){
      |                       ^~
main.c:14:12: error: expected declaration specifiers or '...' before string constant
   14 |     printf("%d\n",max);
      |            ^~~~~~
main.c:14:19: error: expected declaration specifiers or '...' before 'max'
   14 |     printf("%d\n",max);
      |                   ^~~
main.c:15:5: error: expected identifier or '(' before 'return'
   15 |     return 0;
      |     ^~~~~~
main.c:16:1: error: expected identifier or '(' before '}' token
   16 | }
      | ^
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  string s ;
  cin >> s ;
  
  int cnt = 0 ; 
  int prev = 0 ;
  for(int i=0;i<s.length();i++){
    if(s[i] == 'A' || 
       s[i] == 'T' || 
       s[i] == 'G' || 
       s[i] == 'C'){
      cnt++ ;
    }else{
      if(prev<cnt){
        prev = cnt ;
      }
      cnt = 0 ; 
    }
  }
  
  cout << prev <<  ;
  
  return 0 ;
  
  
}







Compiler output:
a.cc: In function 'int main()':
a.cc:26:20: error: expected primary-expression before ';' token
   26 |   cout << prev <<  ;
      |                    ^
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  string s ;
  cin >> s ;
  
  int cnt = 0 ; 
  int prev = 0 ;
  for(int i=0;i<s.length();i++){
    if(s[i] == 'A' || 
       s[i] == 'T' || 
       s[i] == 'G' || 
       s[i] == 'C' ||){
      cnt++ ;
    }else{
      if(prev<cnt){
        prev = cnt ;
      }
      cnt = 0 ; 
    }
  }
  
  cout << prev <<  ;
  
  return 0 ;
  
  
}







Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: expected primary-expression before ')' token
   16 |        s[i] == 'C' ||){
      |                      ^
a.cc:26:20: error: expected primary-expression before ';' token
   26 |   cout << prev <<  ;
      |                    ^
Language: C++

#include <algorithm>
#include <functional>
#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'j' was not declared in this scope
   12 |     if(s[j]=='A' | s[j]=='G' | s[j]=='C' | s[j]=='T' ){
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {

string s;
  cin >> s;
  int a =0,c=0;
  int b,d;
  for(int i=0;i<s.size();i++){
    
    if(s[i] == 'A'||s[i] =='G'||s[i] =='C' ||s[i] =='T'){
      a++;
    }
    if( s[i] != 'A'||s[i] !='G'||s[i] !='C' ||s[i] !='T'){
      b =i;
      break;
    }
  }
    for(int j =b;j<s.size() ;j++) {
       if(s[j] == 'A'||s[j] =='G'||s[j] =='C' ||s[j] =='T'){
      c++;
    }
    if( s[j] != 'A'||s[j] !='G'||s[j] !='C' ||s[j] !='T'){
      d =i;
      break;
    }
    }
      cout << max(a,c) << endl;
    }
      


Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: 'i' was not declared in this scope
   24 |       d =i;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {

string s;
  cin >> s;
  int a =0,c=0;
  int b,d;
  for(int i=0;i<s.size;i++){
    
    if(s[i] == 'A'||s[i] =='G'||s[i] =='C' ||s[i] =='T'){
      a++;
    }
    if( s[i] != 'A'||s[i] !='G'||s[i] !='C' ||s[i] !='T'){
      b =i;
      break;
    }
    
    for(int j =b;j<s.size() ;j++) {
       if(s[j] == 'A'||s[j] =='G'||s[j] =='C' ||s[j] =='T'){
      c++;
    }
    if( s[j] != 'A'||s[j] !='G'||s[j] !='C' ||s[j] !='T'){
      d =i;
      break;
    }
    }
      cout << max(a,c) << endl;
    }
      


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: 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 '()' ?)
    9 |   for(int i=0;i<s.size;i++){
      |                 ~~^~~~
      |                       ()
a.cc:29:6: error: expected '}' at end of input
   29 |     }
      |      ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {

string s;
  cin >> s;
  int a =0;
  int b;
  for(int i=0;i<s.size;i++){
    
    if(s[i] == 'A'||s[i] =='G'||s[i] =='C' ||s[i] =='T'){
      a++;
    }
    if( s[i] != 'A'||s[i] !='G'||s[i] !='C' ||s[i] !='T'){
      b =i;
      break;
    }
    
    for(int j =b;j<s.size() ;j++) 

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: 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 '()' ?)
    9 |   for(int i=0;i<s.size;i++){
      |                 ~~^~~~
      |                       ()
a.cc:19:34: error: expected statement at end of input
   19 |     for(int j =b;j<s.size() ;j++)
      |                                  ^
a.cc:19:34: error: expected '}' at end of input
a.cc:9:28: note: to match this '{'
    9 |   for(int i=0;i<s.size;i++){
      |                            ^
a.cc:19:34: error: expected '}' at end of input
   19 |     for(int j =b;j<s.size() ;j++)
      |                                  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(){ 
    string S;
    cin >>S;
    int N = S.size();
   int ans = 0;
   for(int i = 0;i < N;i++){
       if(S[i] == 'A' || S[i] == 'G' || S[i] == 'C' || S[i] == 'T'){
           int longa = 0;
           for(int j = i;j < N;j++){
               if(S[j] == 'A' || S[j] == 'G' || S[j] == 'C' || S[j] == 'T' ){
                   longa++;B
               }
               else break;
           }
           ans = max(ans,longa);
       }
   }
   cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: 'B' was not declared in this scope
   14 |                    longa++;B
      |                            ^
Language: C++

int main()
{
	string s;
	cin >> s;
	int count = 0;
	int ans = 0;
	for (int i = 0; i < s.size(); i++) {
		count = 0;
		for(int j=i; j<s.size(); j++){
			if (s.at(j) == 'A' || s.at(j) == 'C' || s.at(j) == 'T' || s.at(j) == 'G') {
				count += 1;
			}
			else {
				break;
			}
		}
		if (count > ans) {
			ans = count;
		}
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'string' was not declared in this scope
    3 |         string s;
      |         ^~~~~~
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> s;
      |         ^~~
a.cc:4:16: error: 's' was not declared in this scope
    4 |         cin >> s;
      |                ^
a.cc:21:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   21 |         cout << ans << endl;
      |         ^~~~
      |         count
a.cc:21:24: error: 'endl' was not declared in this scope
   21 |         cout << ans << endl;
      |                        ^~~~
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    int n=0;
    int max=0;
    for(int i=0;i<str.length();i++){
     if(str.charAt(i)=='A'||'G'||'C'||'T'){
          n++;
     }else{
          n=0;
     }
     max=n>max?n:max;
     }
     System.out.println(num);
     }
    }

Compiler output:
Main.java:10: error: bad operand types for binary operator '||'
     if(str.charAt(i)=='A'||'G'||'C'||'T'){
                          ^
  first type:  boolean
  second type: char
Main.java:17: error: cannot find symbol
     System.out.println(num);
                        ^
  symbol:   variable num
  location: class Main
2 errors
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)
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
const ll mod2 = 998244353;

int main() {
  string s;
  cin >> s;
  n = s.size();
  int ans = 0;
  rep(i, n) {
    int len = 0;
    FOR(j, i, n) {
      if (s[j] == 'A' || s[j] == 'C' || s[j] == 'G' || s[j] == 'T') len++;
      else {
        ans = max(ans, len);
        break;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'n' was not declared in this scope
   14 |   n = s.size();
      |   ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <list>
#include <numeric>
#include <stack>
#include <queue>
#include <tuple>
#include <bitset>
#include <map>
#include <math.h>
//　ceil(a/b)   (a + (b - 1))/ b
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
typedef pair<int,int> P;
const int inf = 1012345678;
int dx[] = {1,-1,0,0};
int dy[] = {0,0,1,-1};

int gcd(int a, int b)
{
  if (a%b==0){
    return(b);
  }
  else{
    return(gcd(b,a%b));
  }
}




int main(){
  string b;
  cin >> b;
  int val = 0;
  int ans = 0;
  rep(i,b.size()){
    int j = i;
    while(1){
      if(j == b.size() || (b[j] != 'A' && b[j] != 'T' && b[j] != 'G' &&A b[j] != 'C')) break;
      val++;
      j++;
    }
    ans = max(val,ans);
    val = 0;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:72: error: 'A' was not declared in this scope
   45 |       if(j == b.size() || (b[j] != 'A' && b[j] != 'T' && b[j] != 'G' &&A b[j] != 'C')) break;
      |                                                                        ^
a.cc:45:73: error: expected ')' before 'b'
   45 |       if(j == b.size() || (b[j] != 'A' && b[j] != 'T' && b[j] != 'G' &&A b[j] != 'C')) break;
      |                           ~                                             ^~
      |                                                                         )
a.cc:45:93: error: expected ')' before ';' token
   45 |       if(j == b.size() || (b[j] != 'A' && b[j] != 'T' && b[j] != 'G' &&A b[j] != 'C')) break;
      |         ~                                                                                   ^
      |                                                                                             )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
  	cin >> s;
  	int ans = 0;
  	for(int i = 0 ; i < s.size() ; i++){
      	ans = max(ans , cnt);
		if(s[i] != 'A' && s[i] != 'C' && s[i] != 'G' && s[i] != 'T')
          cnt = 0;
      	else
          cnt++;
    }

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
    9 |         ans = max(ans , cnt);
      |                         ^~~
      |                         int
Language: Java

import java.util.Scanner;
import java.util.ArrayList

public class ATCorder{

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String[] array ;
    array = sc.next().split("");
    int a = calc(array);
    System.out.println(a);
  }


  static int calc(String[] s){
    int count =0;
    int max = 0;
    for(int i=0; i<s.length;i++){
      if(s[i].equals("A") || s[i].equals("C")){
        count += 1;
      }else if(s[i].equals("T") || s[i].equals("G")){
        count += 1;
      }else{
        if(count>max){
          max = count;
        }
        count = 0;
      }
      if(count>max){
        max = count;
      }
    }
    return max;
  }


}

Compiler output:
Main.java:2: error: ';' expected
import java.util.ArrayList
                          ^
1 error
Language: C++

include<bits/stdc++.h>
using namespace std;
int main(){
  string a;
  int b=0,c=0,d[1000]={};
  int q=0;
  cin>>a;
  for(int i=0;i<a.size();i++){
    if(a[i]=='A'&&c==0||a[i]=='C'&&c==0||a[i]=='G'&&c==0||a[i]=='T'&&c==0) d[q]++,b=1;
    else if(b==1) q++,b=0;
 }
  sort(d,d+q,greater<int>());
  cout<<d[0]<<"\n";
}


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:4:3: error: 'string' was not declared in this scope
    4 |   string a;
      |   ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>a;
      |   ^~~
a.cc:7:8: error: 'a' was not declared in this scope
    7 |   cin>>a;
      |        ^
a.cc:12:14: error: 'greater' was not declared in this scope
   12 |   sort(d,d+q,greater<int>());
      |              ^~~~~~~
a.cc:12:22: error: expected primary-expression before 'int'
   12 |   sort(d,d+q,greater<int>());
      |                      ^~~
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |   sort(d,d+q,greater<int>());
      |   ^~~~
      |   short
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout<<d[0]<<"\n";
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string a;
  int b=0;
  cin>>a;
  for(int i=0;i<a.size();i++){
    if(a[i]=="A"||a[i]=="C"||a[i]=="G"||a[i]=="T") b++;
  }
  cout<<b<<"\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(a[i]=="A"||a[i]=="C"||a[i]=="G"||a[i]=="T") b++;
a.cc:8:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(a[i]=="A"||a[i]=="C"||a[i]=="G"||a[i]=="T") b++;
a.cc:8:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(a[i]=="A"||a[i]=="C"||a[i]=="G"||a[i]=="T") b++;
a.cc:8:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(a[i]=="A"||a[i]=="C"||a[i]=="G"||a[i]=="T") b++;
Language: Java

import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
	String sa[] = sc.next().split("");
    int count = 0;
    int max = 0;
    for (Sting s : sa) {
       if ("ACGT".indexOf(s) != -1) {
         count++;
       } else {
         if (count >= max) { 
           max = count;
         }
       }
    }
    System.out.println(ma);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    for (Sting s : sa) {
         ^
  symbol:   class Sting
  location: class Main
Main.java:18: error: cannot find symbol
    System.out.println(ma);
                       ^
  symbol:   variable ma
  location: class Main
2 errors
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:59: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == "T") ans++;
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
using namespace std;

int main() {
	string s;
	cin >> s;
	int ans = 0;
	for (i = 0;i < s.size();++i) {
		int now = 0;
		for (int j = i;j < s.size();++j) {
			bool ok = false;
			if (s[j] != 'A' && s[j] != 'G' && s[j] != 'C' && s[j] != 'T')ok = true;
			if (ok)break;
			else {
				now++;
				ans = max(ans, now);
			}
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'i' was not declared in this scope
   10 |         for (i = 0;i < s.size();++i) {
      |              ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
using namespace std;

int main() {
	string s;
	cin >> s;
	int ans = 0;
	for (i = 0;i < s.size();++i) {
		int now = 0;
		for (int j = i;j < s.size();++j) {
			bool ok = false;
			if (A[j] != 'A' && A[j] != 'G' && A[j] != 'C' && A[j] != 'T')ok = true;
			if (ok)break;
			else {
				now++;
				ans = max(ans, now);
			}
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'i' was not declared in this scope
   10 |         for (i = 0;i < s.size();++i) {
      |              ^
a.cc:14:29: error: 'A' was not declared in this scope
   14 |                         if (A[j] != 'A' && A[j] != 'G' && A[j] != 'C' && A[j] != 'T')ok = true;
      |                             ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
using namespace std;

int main() {
	vector<int>A(n);
	rep(i, n) {
		cin >> A[i];
	}
	int ans = 0;
	rep(i, n) {
		int now = 0;
		for (int j = i;j < n;++j) {
			bool ok = false;
			if (A[j] != 'A' && A[j] != 'G' && A[j] != 'C' && A[j] != 'T')ok = true;
			if (ok)break;
			else {
				now++;
				ans = max(ans, now);
			}
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'n' was not declared in this scope
    7 |         vector<int>A(n);
      |                      ^
Language: Java


import java.util.Scanner;

public class ATCoder {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] c = sc.next().toCharArray();
		int cnt = 0;
		int ans = 0;

		sc.close();

		for (char d : c) {
			if (d != 'A' && d != 'C' && d != 'G' && d != 'T') {
				cnt = 0;
				continue;
			}
			cnt++;
			ans = Math.max(ans, cnt);
		}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:4: error: class ATCoder is public, should be declared in a file named ATCoder.java
public class ATCoder {
       ^
1 error