criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int max = 0;
      //１文字目始まりから探す
      for(int i=0;i<s.length;i++){
        int count = 0;
        for(int j=i;j<s.length;j++){
          if(s.charAt(j)=='A' || s.charAt(j)=='C' || s.charAt(j)=='G' || s.charAt(j)=='T'){
            count++;
          }else{
            break;
          }
        }
        max = Math.max(max,count);
      }
      System.out.println(max);
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
      for(int i=0;i<s.length;i++){
                     ^
  symbol:   variable length
  location: variable s of type String
Main.java:10: error: cannot find symbol
        for(int j=i;j<s.length;j++){
                       ^
  symbol:   variable length
  location: variable s of type String
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);
      String s = sc.next();
      int max = 0;
      //１文字目始まりから探す
      for(i=0;i<s.length;i++){
        int count = 0;
        for(j=i;j<s.length;j++){
          if(s.charAt(j)=='A' || s.charAt(j)=='C' || s.charAt(j)=='G' || s.charAt(j)=='T'){
            count++;
          }else{
            break;
          }
        }
        max = Math.max(max,count);
      }
      System.out.println(max);
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
      for(i=0;i<s.length;i++){
          ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
      for(i=0;i<s.length;i++){
              ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
      for(i=0;i<s.length;i++){
                 ^
  symbol:   variable length
  location: variable s of type String
Main.java:8: error: cannot find symbol
      for(i=0;i<s.length;i++){
                         ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
        for(j=i;j<s.length;j++){
            ^
  symbol:   variable j
  location: class Main
Main.java:10: error: cannot find symbol
        for(j=i;j<s.length;j++){
              ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
        for(j=i;j<s.length;j++){
                ^
  symbol:   variable j
  location: class Main
Main.java:10: error: cannot find symbol
        for(j=i;j<s.length;j++){
                   ^
  symbol:   variable length
  location: variable s of type String
Main.java:10: error: cannot find symbol
        for(j=i;j<s.length;j++){
                           ^
  symbol:   variable j
  location: class Main
Main.java:11: error: cannot find symbol
          if(s.charAt(j)=='A' || s.charAt(j)=='C' || s.charAt(j)=='G' || s.charAt(j)=='T'){
                      ^
  symbol:   variable j
  location: class Main
Main.java:11: error: cannot find symbol
          if(s.charAt(j)=='A' || s.charAt(j)=='C' || s.charAt(j)=='G' || s.charAt(j)=='T'){
                                          ^
  symbol:   variable j
  location: class Main
Main.java:11: error: cannot find symbol
          if(s.charAt(j)=='A' || s.charAt(j)=='C' || s.charAt(j)=='G' || s.charAt(j)=='T'){
                                                              ^
  symbol:   variable j
  location: class Main
Main.java:11: error: cannot find symbol
          if(s.charAt(j)=='A' || s.charAt(j)=='C' || s.charAt(j)=='G' || s.charAt(j)=='T'){
                                                                                  ^
  symbol:   variable j
  location: class Main
13 errors
Language: Java

import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String[] List = s.split("");
		int count =0;
		int max =0;
		for (int i=0;i<s.length();i++) {
			if (List[i].equal("A")||List[i].equal("C")||List[i].equal("G")||List[i].equal("T") {
				count ++;
				if (max<count) {
					max = count;
				}
			} else {
				count =0;
			}
		}
		System.out.println(max);
	}
}

Compiler output:
Main.java:12: error: ')' expected
			if (List[i].equal("A")||List[i].equal("C")||List[i].equal("G")||List[i].equal("T") {
			                                                                                  ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count =0;
		int max =0;
		for (int i=0;i<s.length();i++) {
			if (s.equal("A")||s.equal("C")||s.equal("G")||s.equal("T") {
				count ++;
				if (max<count) {
					max = count;
				}
			} else {
				count =0;
			}
		}
		System.out.println(max);
	}
}

Compiler output:
Main.java:11: error: ')' expected
			if (s.equal("A")||s.equal("C")||s.equal("G")||s.equal("T") {
			                                                          ^
1 error
Language: C++

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

template <typename T>
void print(const T &v);

int main()
{
    string s;
    cin >> s;
    int maxi = 0;
    int seq = 0;
    for (char c : s)
    {
        if (c == 'A' || c == 'C' || c == 'G' || c == 'T')
        {
            ++seq;
        }
        else
        {
            maxi = max(seq, maxi);
            seq = 0;
        }
    }
    maxi = max(seq.maxi);
    cout << maxi << endl;
    return 0;
}

// Use For Debug
template <typename T>
void print(T const &v)
{
    for (int i = 0; i < v.size(); i++)
    {
        if (i)
            cout << " ";
        cout << v[i];
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:20: error: request for member 'maxi' in 'seq', which is of non-class type 'int'
   30 |     maxi = max(seq.maxi);
      |                    ^~~~
Language: C

/* ex 5_4
   potter0723sw */

#include <stdio.h>
#include <string.h>
#define SIZE 11

int main(void){
    int i,pre,counter = 0,ans = 0;
    char str1[SIZE],sub[2] = "A", *ret;
    scanf("%s", str1);
    while(counter != 3){
        pre=0;
        while((ret = strstr(str1+pre,sub)) != NULL){
            i = 0;
            while(*ret + i == 'A' || *ret + i == 'T' || *ret + i == 'c' || *ret + i == 'G'){
                i++;
            }
            if(i > ans){
                ans = i;
            }
            pre+=strlen(str1)-strlen(ret)+strlen(sub);
        }
        switch(counter){
            case 0:
                sub = "T";
                break;
            case 1:
                sub = "C";
                break;
            case 2:
                sub = "G";
                break;
        }
        counter++
    }
    printf("%d\n", ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:21: error: assignment to expression with array type
   26 |                 sub = "T";
      |                     ^
main.c:29:21: error: assignment to expression with array type
   29 |                 sub = "C";
      |                     ^
main.c:32:21: error: assignment to expression with array type
   32 |                 sub = "G";
      |                     ^
main.c:35:18: error: expected ';' before '}' token
   35 |         counter++
      |                  ^
      |                  ;
   36 |     }
      |     ~
Language: C

/* 	ex5_4
   	masaaki52	*/
#include <stdio.h>
#include <string.h>
int main(void){
  char string[11];
  int i,count=0,max=0;
  scanf("%s",string);
  for(i=0;i<strlen(string);i++){
    switch(string[i]){
      case 'A','C','G','T':
        count++;
        break;
      default:
        if(count > max){
          max = count;
        }
        count = 0;
    }
  }
  printf("%d",max);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:15: error: expected ':' or '...' before ',' token
   11 |       case 'A','C','G','T':
      |               ^
main.c:11:15: error: expected expression before ',' token
Language: C

/* ex 5_4
   UMAboogie */

#include <stdio.h>
#include <string.h>

int main(void){
  char str[11]; //文字列をいれる要素数11の配列を宣言
  int length, count = 0, ans = 0;
  scanf(%s,str);
  length = strlen(str); //文字列の長さを計算しlengthに代入
  for(int i = 0;i < length;i++){ //文字列内の各文字について
    if(str[i] == 'A'||str[i] == 'T'||str[i] == 'G'||str[i] == 'C'){
      count ++; //その文字がA,T,G,Cのどれかならば連続数を1加算
      if(count >= ans){ //その連続数が最大連続数以上の時
        ans = count; //それを最大連続数とする
      }
    }
    else{
      count = 0; //その文字がA,T,G,C以外であれば連続が途切れるので連続数をリセット
    }
  }

  printf("%d\n",ans); //答え(最大連続数)を出力

  return 0; //プログラムを終了
}


Compiler output:
main.c: In function 'main':
main.c:10:9: error: expected expression before '%' token
   10 |   scanf(%s,str);
      |         ^
Language: C

/* ex 5_4
   UMAboogie */

#include <stdio.h>
#include <string.h>

int main(void){
  char str[11]; //文字列をいれる要素数11の配列を宣言
  int length, count = 0, ans = 0;
  scanf(%s,str);
  length = strlen(str); //文字列の長さを計算しlengthに代入
  for(int i = 0;i < length;i++){ //文字列内の各文字について
    if(str[i] == 'A'||str[i] == 'T'||str[i] == 'G'||str[i] == 'C'){
      counter ++; //その文字がA,T,G,Cのどれかならば連続数を1加算
      if(count >= ans){ //その連続数が最大連続数以上の時
        max = count; //それを最大連続数とする
      }
    }
    else{
      count = 0; //その文字がA,T,G,C以外であれば連続が途切れるので連続数をリセット
    }
  }

  printf("%d\n",ans); //答え(最大連続数)を出力

  return 0; //プログラムを終了
}


Compiler output:
main.c: In function 'main':
main.c:10:9: error: expected expression before '%' token
   10 |   scanf(%s,str);
      |         ^
main.c:14:7: error: 'counter' undeclared (first use in this function); did you mean 'count'?
   14 |       counter ++; //その文字がA,T,G,Cのどれかならば連続数を1加算
      |       ^~~~~~~
      |       count
main.c:14:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:9: error: 'max' undeclared (first use in this function)
   16 |         max = count; //それを最大連続数とする
      |         ^~~
Language: C

/*  ex5_4
    takafumi_ueki*/
#include <stdio.h>
#include <string.h>
int main(void){
    char string[11];
    int i;
    int max = 0;
    int count = 0;
    scanf("%s",string);
    for(i=0;i<strlen(string);i++){
        if(string[i]=='A')||(string[i]=='T')||(string[i]=='G')||(string[i]=='C')){
            while((string[i]=='A')||(string[i]=='T')||(string[i]=='G')||(string[i]=='C')){
                count++;
                i++;
            }
            if(max<count){
                max = count;
            }
            //reset
            count = 0;
        }
    }
    //output the result
    printf("%d\n",max);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:27: error: expected expression before '||' token
   12 |         if(string[i]=='A')||(string[i]=='T')||(string[i]=='G')||(string[i]=='C')){
      |                           ^~
main.c:12:81: error: expected statement before ')' token
   12 |         if(string[i]=='A')||(string[i]=='T')||(string[i]=='G')||(string[i]=='C')){
      |                                                                                 ^
Language: C++

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

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define ll long long
const ll MOD = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1);

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

Compiler output:
a.cc:23:5: error: 'ans' does not name a type
   23 |     ans=max(ans,cnt);
      |     ^~~
a.cc:24:5: error: 'cout' does not name a type
   24 |     cout<<ans<<endl;
      |     ^~~~
a.cc:25:5: error: expected unqualified-id before 'return'
   25 |     return 0;
      |     ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

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

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

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

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

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define ll long long
const ll MOD = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: expected primary-expression before ')' token
   16 |         for(int j=i;j<n;j++)){
      |                             ^
Language: C++

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

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define ll long long
const ll MOD = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1);

int main(void)
{
    string s; cin>>s;
    rep(i,s.size()){
        ll cnt=0;
        rep(j,s.size()){
            if(s[i]!='A'||s[i]!='G'||s[i]!='T'||s[i]!='C'){
            break;
            }
            cnt=j-i+1;
        }
        ans=max(ans,cnt);
    }
    cout<<ans<<endl;
    return 0;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: 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:26: 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:39: 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:52: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (S[i]=="A" || S[i]=="T" || S[i]=="C" || S[i]=="G") {
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'l' was not declared in this scope
   11 |         else if(sum<l){
      |                     ^
a.cc:16:12: error: 'l' was not declared in this scope
   16 |     if(ans<l){
      |            ^
Language: C++

#include<iostream>
#include<cmath>
#include<algorithm>
#include<string>

#define ll long long int

using namespace std;

const ll mod=1000000007;
const ll inf=LONG_LONG_MAX;

int main(){

    /*string s;

    string t;

    cin >> s;

    int m=0;
    int l=0;
    string u;

    for(int i=0;i<s.size();i++){
        for(int j=0;j<s.size()-i+1;j++){
            t = s.substr(i,j);
            bool ok=true;
            for(int k=0;k<t.size();k++){
                if(t[k]=='T' || t[k] == 'A' || t[k] == 'G' || t[k] == 'C') ;
                else ok = false;
            }
            l = t.size();
            if(ok == true && t.size()>m)u=t;
            if(ok) m=max(m,l);
        }
    }

    cout << m << endl;*/

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

     

}

Compiler output:
a.cc:11:14: error: 'LONG_LONG_MAX' was not declared in this scope
   11 | const ll inf=LONG_LONG_MAX;
      |              ^~~~~~~~~~~~~
Language: C++

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

int main(){
  string S;
  cin >> S;
  int count1=0;
  int count2=0;
  int count3=0;
  int count4=0;
  int count5=0;
  for(int i=0;i<S.asize();i++){
    if(S.at(i)=='A'||S.at(i)=='C'||S.at(i)=='G'||S.at(i)=='T'){
      count1++;
    }
    else{
      if(count1!=0){
        if(count2!=0){
          if(count3!=0){
            if(count4!=0){
              count5=count1;
              count1=0;
            }
            else{
              count4=count1;
              count1=0;
            }
          }
          else{
            count3=count1;
            count1=0;
          }
        }
        else{
          count2=count1;
          count1=0;
        }
      }
    }
  }
  cout << max(max(max(max(count1,count2),count3),count4),count5) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'asize'; did you mean 'size'?
   12 |   for(int i=0;i<S.asize();i++){
      |                   ^~~~~
      |                   size
Language: C++

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

int main(){
  string S;
  cin >> S;
  int count1=0;
  int count2=0;
  int count3=0;
  int count4=0;
  int count5=0;
  for(int i=0;i<S.asize();i++){
    if(S.at(i)==A||S.at(i)==C||S.at(i)==G||S.at(i)==T){
      count1++;
    }
    else{
      if(count1!=0){
        if(count2!=0){
          if(count3!=0){
            if(count4!=0){
              count5=count1;
              count1=0;
            }
            else{
              count4=count1;
              count1=0;
            }
          }
          else{
            count3=count1;
            count1=0;
          }
        }
        else{
          count2=count1;
          count1=0;
        }
      }
    }
  }
  cout << max(max(max(max(count1,count2),count3),count4),count5) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'asize'; did you mean 'size'?
   12 |   for(int i=0;i<S.asize();i++){
      |                   ^~~~~
      |                   size
a.cc:13:17: error: 'A' was not declared in this scope
   13 |     if(S.at(i)==A||S.at(i)==C||S.at(i)==G||S.at(i)==T){
      |                 ^
a.cc:13:29: error: 'C' was not declared in this scope
   13 |     if(S.at(i)==A||S.at(i)==C||S.at(i)==G||S.at(i)==T){
      |                             ^
a.cc:13:41: error: 'G' was not declared in this scope
   13 |     if(S.at(i)==A||S.at(i)==C||S.at(i)==G||S.at(i)==T){
      |                                         ^
a.cc:13:53: error: 'T' was not declared in this scope
   13 |     if(S.at(i)==A||S.at(i)==C||S.at(i)==G||S.at(i)==T){
      |                                                     ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	string S;
	cin >> S;
	string ACGT="ACGT";
	int count=0, max_count=0;
	for (int i=0; i<S.size();i++){
	    bool isACGT=false;
	    for (int j=0; j<ACGT.size(); j++){
	        if (S[i]==ACGT[j]) isAGCT=true;
	        if (isAGCT){
	            count++;
	            max_count=max(max_count, count);
	        }
	        else count=0;
	    }
	}
	cout << max_count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:36: error: 'isAGCT' was not declared in this scope; did you mean 'isACGT'?
   12 |                 if (S[i]==ACGT[j]) isAGCT=true;
      |                                    ^~~~~~
      |                                    isACGT
a.cc:13:21: error: 'isAGCT' was not declared in this scope; did you mean 'isACGT'?
   13 |                 if (isAGCT){
      |                     ^~~~~~
      |                     isACGT
Language: C++

s = input()
sum = 0
max = 0
for i in range(len(s)):
    if s[i] == 'A' or s[i] == 'C' or s[i] == 'G' or s[i] == 'T':
        sum += 1
    else:
        if(sum >= max): max = sum
        sum = 0
print(max)



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

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

int main(){
    string s;cin>>s;
    vector<int> dna(1,0);
    string n;
    rep(i,s.size()){
        if(s[i]=='A')dna.back()++;
        if(s[i]=='C')dna.back()++;
        if(s[i]=='G')dna.back()++;
        if(s[i]=='T')dna.back()++;
        else dna.push_back(0);
    }
    sort(dna.rbegin(), dna.rend());
    cout << dna[0].size() << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: request for member 'size' in 'dna.std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   22 |     cout << dna[0].size() << endl;
      |                    ^~~~
Language: C++

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

int main(){
    string S;
    cin >> S;

    int counter = 0;
    int max = 0;
    for(int i = 0; i < S.size(); i++){
        for(int j = 1; j <= S.size() - i; j++){
            string str = S.substr(i,j);
            for(int k = 0; k < j; k++){
                if(str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] = 'T'){
                    counter++;
                    if(counter >= max)
                        max = counter;
                }else{
                    counter = 0;
                }
            }
        }
    }

    cout << max << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:68: error: lvalue required as left operand of assignment
   14 |                 if(str[i] == 'A' || str[i] == 'C' || str[i] == 'G' || str[i] = 'T'){
Language: C

#include<stdio.h>
#include<string.h>

int main(void)
{
  //文字列Sを入力
  char s[11];
  scanf("%s",s);

  //文字列の長さをslenとする
  int slen = strlen(s);
  
  //計算開始
  int i,j,cnt,ans=0;
  for(i=0;i<slen;i++){

    //cntを初期化  
    cnt=0;

    //s[i]がA,C,G,Tのいずれかであるか確認
    for(j=i;j<slen;j++){
      if((s[j]=='A')||(s[j]=='C')||(s[j]=='G')||(s[j]=='T'))
        cnt++;
      else
        break;
    }
    if(cnt>ans)
      ans=cnt;
    i+=cnt;
  }

Compiler output:
main.c: In function 'main':
main.c:30:3: error: expected declaration or statement at end of input
   30 |   }
      |   ^
Language: C

#include<stdio.h>
#include<string.h>
 
int main(void)
{
   int i=0,a=0,x;
   char s[11];
 
   scanf("%s",s);
 
   n=strlen(s);
  
   while(i<n){
      x=0;
      while((s[i]=='A')||(s[i]=='C')||(s[i]=='G')||(s[i]=='T')){
         i++;
         x++;
      }
      if(x==0)  i++;
      if(a<x)   a=x;
   }
 
   printf("%d\n",a);
  
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:4: error: 'n' undeclared (first use in this function)
   11 |    n=strlen(s);
      |    ^
main.c:11:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:69: error: expected primary-expression before ')' token
   12 |       if(s[j] == 'A' || s[j] == 'T' || s[j] == 'G' || s[j] == 'C' ||){
      |                                                                     ^
Language: C++

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

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


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

#include <stdio.h>
#include <string.h>
int main(void){

  char S[20];
  int count=0;
  int max=0;
  int len=0;
  
  scanf("%s",S);
  len=strlen(S);
  
  for(int i=0;i<len;i++){
  	 if(S[i]=='A' || S[i]=='C' || S[i]=='G' || S[i]=='T'){
  		count++;
        if(count>max){
        	max=count;
        }
     }else{
    count=0;
     }
  

  printf("%d",max);
  
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include <stdio.h>
#include <string.h>
int main(void){

  char S[11]={0};
  int count=0;
  int max=0;
  int len=0;
  
  scanf("%s",S);
  len=strlen(S)
  
  for(int i=0;i<len;i++){
  	  if(S[i]=='A' || S[i]=='C' || S[i]=='G' || S[i]=='T'){
        while(S[i]=='A' || S[i]=='C' || S[i]=='G' || S[i]=='T'){
        	count++;
        }
        if(count>max){
        	max=count;
        }else{
        	count=0;
        }
      }
  }

  printf("%d",max);
  
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:16: error: expected ';' before 'for'
   11 |   len=strlen(S)
      |                ^
      |                ;
   12 | 
   13 |   for(int i=0;i<len;i++){
      |   ~~~
Language: C

#include <stdio.h>
int main(void){

  char S[];
  int count=0;
  int max=0;
  
  scanf("%s",S);
  
  for(int i=0;i<10;i++){
  	  if(S[i]=='A' || S[i]=='C' || S[i]=='G' || S[i]=='T'){
        while(S[i]=='A' || S[i]=='C' || S[i]=='G' || S[i]=='T'){
        	count++;
        }
        if(count>max){
        	max=count;
        }else{
        	count=0;
        }
      }
  }

  printf("%d",max);
  
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:8: error: array size missing in 'S'
    4 |   char S[];
      |        ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:41: error: lvalue required as left operand of assignment
   11 |     if(s[i]='A' || s[i]='C' || s[i]='G' || s[i]='T'){
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: 'n' was not declared in this scope
   10 |   for(int i=0; i<n; i++){
      |                  ^
a.cc:11:41: error: lvalue required as left operand of assignment
   11 |     if(s[i]='A' || s[i]='C' || s[i]='G' || s[i]='T'){
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <stdio.h>

using namespace std;

typedef long long ll;

bool is_ACGT(char c){
    if(c=='A'||c=='C'||c=='G'||c=='T'){
        return true;
    }
    return false;
}


int main(){
    char S[11];
    scanf("%s",S);
    int max=0;
    int count=0;
    
    int len=strlen(S);

    
    for(int i=0;i!=len;++i){
        if(is_ACGT(S[i])){
            ++count;
            cout<<S[i]<<endl;
        }else{
            max=(max>count)?max:count;
            count=0;
        }
        
    }
    cout<<max<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 'strlen' was not declared in this scope
   24 |     int len=strlen(S);
      |             ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <vector>
  +++ |+#include <cstring>
    4 | #include <stdio.h>
Language: C++

#include  <bits/stdc++.h>
#include <math.h>
using namespace std;
​
int main() {
string S, T;
int U = 0;
int count = 0;
int max = 0;
cin >> S;
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') || i == S.size() - 1){
 count++;
  if(count == 1){
  max = i;
  U = i + 1;}
  if(i == S.size() - 1 && max < i - U + 1 && (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T')){
  max = i - U + 1;}
  if(count != 1 && max < i - U){
  max = i - U;}
 U = i + 1;}}
cout << max << endl;}

Compiler output:
a.cc:4:1: error: '\U0000200b' does not name a type
    4 | ​
      |
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin >> S;
  int n=S.size();
  int ans=0;
  for(int i=0;i<n;i++){
    for(int j=i;j<n;j++){
    string bubun = S.substr(i,j-i+1);
    int m = bubun.size();
    
    bool flag = true;
    for(int k=0;k<m;k++){
      char c = bubun[k];
      if(c!='A'&&c!='C'&&c!='G'&&c!='T'){
        flag=false;
        break;
      }
    }
    if(flag){
      ans=max(ans,m);
    }
  }
  cout<< ans<< endl;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin >> S;
  int n=S.size();
  int ans=0;
  for(int i=0;i<n;i++){
    string bubun = S.substr(i,j-i+1);
    int m = bubun.size();
    
    bool flag = true;
    for(int k=0;k<m;k++){
      char c = bubun[k];
      if(c!='A'&&c!='C'&&c!='G'&&c!='T'){
        flag=false;
        break;
      }
    }
    if(flag){
      ans=max(ans,m);
    }
  }
  cout<< ans<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: 'j' was not declared in this scope
    9 |     string bubun = S.substr(i,j-i+1);
      |                               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin >> S;
  int n=S.size();
  int ans=0;
  for(int i=0;i<n;i++){
    string bubun = s.substr(i,j-i+1);
    int m = bubun.size;
    
    bool flag = true;
    for(int k=0;k<m;k++){
      char c = bubun[k];
      if(c!='A'&&c!='C'&&c!='G'&&c!='T'){
        flag=false;
        break;
      }
    }
    if(flag){
      ans=max(ans,m);
    }
  }
  cout<< ans<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 's' was not declared in this scope
    9 |     string bubun = s.substr(i,j-i+1);
      |                    ^
a.cc:9:31: error: 'j' was not declared in this scope
    9 |     string bubun = s.substr(i,j-i+1);
      |                               ^
a.cc:10:19: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
   10 |     int m = bubun.size;
      |                   ^~~~
Language: C++

/*B - ATCoder*/
#include <iostream>
#include <string>
using namespace std;

int main() 
{
  int flag = 0;  
  string s,result="";
  cin >> s;

  for(int i=1; i<=s.size(); i++)
  {
    for(int j=0; j+i-1<s.size(); j++)
    {
      string tmp = s.substr(j,i);
//      cout << tmp << endl;
      for(int k=0; k<tmp.size();k++)
      {
        if(tmp[k]=='A'or tmp[k]=='C' or tmp[k]=='G' or tmp[k]=='T')
          flag = 1;
        else
        {
          flag = 0;
          break;
        }
      }
      if(flag) result = tmp; 
      flag = 0;
    }
  }

  int num = result.size();
  cout << num << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: unable to find character literal operator 'operator""or' with 'char' argument
   20 |         if(tmp[k]=='A'or tmp[k]=='C' or tmp[k]=='G' or tmp[k]=='T')
      |                    ^~~~~
a.cc:20:25: error: expected ')' before 'tmp'
   20 |         if(tmp[k]=='A'or tmp[k]=='C' or tmp[k]=='G' or tmp[k]=='T')
      |           ~             ^~~~
      |                         )
Language: C++

#include <iostream>
#include <cmath>
#include <algorithm>
#include <climits>
#include <vector>
#include <string>
#include <set>
#include <iomanip>
#include <map>
#include <stdio.h>
#include <queue>
#define rep(i,n) for (int i=0;i<(n);++i)
#define REP(i,n) for (int i=0;i<=(n);++i)
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
const int INF = 10000000;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:31:20: error: request for member 'tmp' in 'ans', which is of non-class type 'int'
   31 |     ans = max(ans. tmp);
      |                    ^~~
Language: C++

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

int main() {
  char S[11];
  cin >> S;

  int ans = 0;
  int tmp = 0;
  bool coun = false;
  for (int i = 0; S[i] != '\0'; i++) {
    if (S[i] == 'A' or S[i] == 'C' or S[i] == 'G' or S[i] == 'T') {
      coun = true;
      tmp++;
    } else {
      if (coun == true) {
	coun = false;
	ans = max(ans, tmp);
	tmp = 0;
      } else {
	coun = false;
    }
  }

  cout << ans << endl;

  return 0;
}


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

#include <bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef long double ld;

const ll mod = (ll)1e9 + 7;
const ll mxN = 200200;




int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.precision(20);
	cout << fixed;

	string s;
	cin>>s;
	ll ans =0,prev=-1;
	for(int i=0;i<s.length();i++)
		if(s[i]!='A' && s[i]!='C' && s[i]!='G' && s[i]!='T'){
			ans=max(ans,i-prev-1);
			prev=i;
		}
	cout<<max(ans,n-prev-1)<<"\n";

		

}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:23: error: 'n' was not declared in this scope
   36 |         cout<<max(ans,n-prev-1)<<"\n";
      |                       ^
Language: C++

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

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

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

  cout << ans << endl;
  

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(S[i] == "A" || S[i] == "C" || S[i] == "G" || S[i] == "T" ) temp++;
a.cc:14:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(S[i] == "A" || S[i] == "C" || S[i] == "G" || S[i] == "T" ) temp++;
a.cc:14:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(S[i] == "A" || S[i] == "C" || S[i] == "G" || S[i] == "T" ) temp++;
a.cc:14:58: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(S[i] == "A" || S[i] == "C" || S[i] == "G" || S[i] == "T" ) temp++;
Language: C++

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

int main() {
  string s;
  cin >> s;
  
  auto f = [](string &s) {
    for (auto &&c : s) {
      if ((c == 'A') || (c == 'C') || (c == 'G') || (c == 'T')) {
        continue;
      }
      return false;
    }
    return true;
  };
  
  string t = "";
  
  for (int64_t i = 0; i < s.size(); i++) {
    for (int64_t j = 1; j <= s.size(); j++) {
      if (f(s.substr(i, j)) && t.size() < j) {
        t = s.substr(i, j);
      }
    }
  }
  
  cout << t.size() << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: no match for call to '(main()::<lambda(std::string&)>) (std::__cxx11::basic_string<char>)'
   22 |       if (f(s.substr(i, j)) && t.size() < j) {
      |           ~^~~~~~~~~~~~~~~~
a.cc:22:12: note: candidate: 'bool (*)(std::string&)' {aka 'bool (*)(std::__cxx11::basic_string<char>&)'} (conversion)
a.cc:22:12: note:   conversion of argument 2 would be ill-formed:
a.cc:22:21: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
   22 |       if (f(s.substr(i, j)) && t.size() < j) {
      |             ~~~~~~~~^~~~~~
a.cc:8:12: note: candidate: 'main()::<lambda(std::string&)>' (near match)
    8 |   auto f = [](string &s) {
      |            ^
a.cc:8:12: note:   conversion of argument 1 would be ill-formed:
a.cc:22:21: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
   22 |       if (f(s.substr(i, j)) && t.size() < j) {
      |             ~~~~~~~~^~~~~~
Language: C++

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

int main() {

	string s; cin >> s;

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

	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:30: 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 '()' ?)
   19 |                 if (tmp == s.size) ans = tmp;
      |                            ~~^~~~
      |                                  ()
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int MAX=0;
  for(int i=0;i<s.size();i++){
    if(s.at(i)=='A'||s.at(i)=='T'||s.at(i)=='C'||s.at(i)=='G'){
      int j=i+1;
      int cnt=1;
      while(j<s.sie()){
        if(s.at(j)=='A'||s.at(j)=='T'||s.at(j)=='C'||s.at(j)=='G'){
        cnt++;
        j++;
        }
        MAX=max(MAX,cnt);
        break;
      }
    }
  }
  cout<<MAX<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sie'; did you mean 'size'?
   11 |       while(j<s.sie()){
      |                 ^~~
      |                 size
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+2; j<s.size();j++){
      int tmp=0;
      for(int k=i;k<j;k++){
        if(s.at(k) =='A' || s.at(k) =='C' ||s.at(k) =='G'||s.at(k) =='T')
          tmp++;
        else break;
      }
      count = max(count, tmp)
    }
  }
  
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: expected ';' before '}' token
   18 |       count = max(count, tmp)
      |                              ^
      |                              ;
   19 |     }
      |     ~
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+2; j<s.size();j++){
      int tmp=0;
      for(int k=i;k<j;k++){
        if(s.at(k) =='A' || s.at(k) =='C' ||s.at(k) =='G'||s.at(k) =='T')
          tmp++;
      }
      count = max(count, tmp)
    }
  }
  
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:30: error: expected ';' before '}' token
   17 |       count = max(count, tmp)
      |                              ^
      |                              ;
   18 |     }
      |     ~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <valarray>
#include <algorithm>
#include <utility>

using namespace std;

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

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

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
 
int main(){
    int ans=0,now=0;
    string S,T;
    T = "ATGC"
    cin >> S;
    for (int i = 0; i < S.size(); i++){
        bool isATGC = false;
        for (int j = 0; j < T.size(); j++){
           if (S[i] == T[i])isATCG = true;
       }
       if (!isATGC){
           now=0;
       }else{
           now++;
           ans = max(now,ans);
       }
    }
    cout << ans << endl;
return 0;
}
       

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before 'cin'
    9 |     T = "ATGC"
      |               ^
      |               ;
   10 |     cin >> S;
      |     ~~~        
a.cc:14:29: error: 'isATCG' was not declared in this scope; did you mean 'isATGC'?
   14 |            if (S[i] == T[i])isATCG = true;
      |                             ^~~~~~
      |                             isATGC
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
 
int main(){
    int ans=0,now=0;
    string S,T;
    T = "ATGC"
    cin >> S;
    for (int i = 0; i < S.size(); i++){
        bool isATGC = false;
        for (int  = 0; i < T.size(); i++){
           if (S[i] == T[i])isATCG = true;
       }
       if (!isATGC){
           now=0;
       }else{
           now++;
           ans = max(now,ans);
       }
    }
    cout << ans << endl;
return 0;
}
       

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before 'cin'
    9 |     T = "ATGC"
      |               ^
      |               ;
   10 |     cin >> S;
      |     ~~~        
a.cc:13:19: error: expected unqualified-id before '=' token
   13 |         for (int  = 0; i < T.size(); i++){
      |                   ^
a.cc:13:17: error: expected ';' before '=' token
   13 |         for (int  = 0; i < T.size(); i++){
      |                 ^ ~
      |                 ;
a.cc:13:19: error: expected primary-expression before '=' token
   13 |         for (int  = 0; i < T.size(); i++){
      |                   ^
a.cc:13:36: error: expected ')' before ';' token
   13 |         for (int  = 0; i < T.size(); i++){
      |             ~                      ^
      |                                    )
a.cc:13:41: error: expected ';' before ')' token
   13 |         for (int  = 0; i < T.size(); i++){
      |                                         ^
      |                                         ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  char s[20];
  cin >> s;
  int n=strlen(s),a,b=0;
  for(int i=0;i<n;i++){
    a=0;
    for(int j=i;j<n;j++){
      if(s[j]=='A'||s[j]=='G'||s[j]=='C'||s[j]=='T')a++;
      else break;
    }
    if(b<a)b=a;
  cout << b;
}

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

#include <bits/stdc++.h>
using namespace std;
 
 
 
 
int main() {
string S;
cin >> S;
int moji = size.S;
string ans;
int maxnaga = 0;
for(int i = 0; i < moji; i++){
bool check = 1;
string kari;
 
int naga = 0;
if(S[i] == 'A' || S[i] == 'T' || S[i] == 'C' || S[i] == 'G'){
kari = S[i];
naga++;
}
else check = 0;
for(int j = i+1; j < moji; j++){
if(check == 1 && ( S[j] == 'A' || S[j] == 'T' || S[j] == 'C' || S[j] == 'G')){
    kari += S[j];
    naga++;
   if(naga > maxnaga){
       maxnaga = naga;
ans = kari;
   }
}
 
 
}
 
 
 
}
cout << ans << endl;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: overloaded function with no contextual type information
   10 | int moji = size.S;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
 
 
 
int main() {
string S;
cin >> S;
int moji = size.(S);
string ans;
int maxnaga = 0;
for(int i = 0; i < moji; i++){
bool check = 1;
string kari;
 
int naga = 0;
if(S[i] == 'A' || S[i] == 'T' || S[i] == 'C' || S[i] == 'G'){
kari = S[i];
naga++;
}
else check = 0;
for(int j = i+1; j < moji; j++){
if(check == 1 && ( S[j] == 'A' || S[j] == 'T' || S[j] == 'C' || S[j] == 'G')){
    kari += S[j];
    naga++;
   if(naga > maxnaga){
       maxnaga = naga;
ans = kari;
   }
}
 
 
}
 
 
 
}
cout << ans << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected unqualified-id before '(' token
   10 | int moji = size.(S);
      |                 ^
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <cmath>
#include <tuple>
#include <queue>
#include <bitset>
#include <set>
#include <map>
#include <list>

using ll = long long;
using ld = long double;
using namespace std;
const int INF = 1e9+100;
const ll INF64 = 7e18l;
const int mod = 1000000007;
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(a) (a).begin(), (a).end()
#define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);



int main(){
    FIN;
    string s;
    cin >> s;
    int cur=0,ans=0;
    for(int i=0;i<s.size();i++){
        if(s[i] == 'A' or s[i] == 'G' or s[i] == 'C' or s[i] == 'T')
            cur++;
        else{
            ans = max(ans,cur);
            cur = 0;
        }
    }
    ans = mac(ans,cur);

    cout << ans << endl;

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:41:11: error: 'mac' was not declared in this scope
   41 |     ans = mac(ans,cur);
      |           ^~~
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++){
    int a=0;
    for(int j=i;j<s.size();j++){
      if(s[j]=='A' ||s[j]=='G' || s[j]=='C' || s[j]=='T'){
        a++;
        count=max(a,count);
      }
      else break;
    }
  }
  cout<<count<<endl;
}

Compiler output:
a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory
    1 | #include <bits.stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.