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

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

int main() {
  string s;
  cin >> s;
  int a = 0, r = 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'){
      a++;
      int p = max{a, r};
      r = p;
    }
    else
      a = 0;
  }  
  cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: cannot resolve overloaded function 'max' based on conversion to type 'int'
   11 |       int p = max{a, r};
      |               ^~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  int a = 0, r = 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'){
      a++;
      r = max{a, r};
    }
    else
      a = 0;
  }  
  cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: cannot resolve overloaded function 'max' based on conversion to type 'int'
   11 |       r = max{a, r};
      |           ^~~
Language: C

#include<iostream>
#include<string>
using namespace std;
int main() {
  int count,ans=0;
  string s;
  cin >> s;
  for(int i=0;i<s.size();i++){
    if(s[i] == 'A' || s[i] == 'T' || s[i] == 'C' || s[i] == 'G'){
      count = 0;
      for(int j=i;j<s.size();j++){
        if(s[j] == 'A' || s[j] == 'T' || s[j] == 'C' || s[j] == 'G') count++;
        else break;
      }
      if(count>=ans) ans = count;
    }
  }
    cout << ans << endl;
    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
int main(){
  string s;
  cin>>s;
  int cnt=0,ans=0;
  rep(i,s.size()){
    if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T'){
      cnt++;
      ans=max(ans,cnt);}
    else cnt=0;
  }
  cout << ans <<endl;
}

Compiler output:
a.cc:7:9: error: 'pair' does not name a type
    7 | typedef pair<ll, ll> l_l;
      |         ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: request for member 'size' in 's', which is of non-class type 'char [11]'
    8 |   for(int i=0;i<s.size()-1;i++){
      |                   ^~~~
Language: C++

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

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

// ABC122-B
// N<=10なら余裕だけど…
// より効率的にも解けますが不要です、、か。

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

int main(void){
  string S;
  cin >> S;
  int ret = 0;
  for(int i=0; i<S.size(); i++){
    for(int j=i; j<S.size(); j++){
      bool tmp = false;
      if(i=j) if(S[i] == 'A' || S[i] == 'G' || S[i] == 'T' || S[i] == 'C') ret = true;
      for(int k=i; k<j; k++) if(S[k] == 'A' || S[k] == 'G' || S[k] == 'T' || S[k] == 'C') ; else {tmp = false;break;}
      if(tmp) ret = max(ret, j-i+1);
    }
  }
  cout << ret << endl;
  return 0;
}

Compiler output:
a.cc:7:9: error: 'll' does not name a type
    7 | typedef ll long long;
      |         ^~
Language: C++

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

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

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

#include<iostream>
using namespace std;

int main()
{
  string S;
  cin>>S;
  int max = 0;
  for(int i = 0;i<=S.length();i++)
  {
    for(int j = 0;j<=S.length();j++)
    {
      if(i+j>S.length())
      {
        continue;
      }
      bool isACGT = true;
      for(int k = 0;k<sub.length();k++)
      {
        if(sub[k] != 'A' && sub[k] != 'C' && sub[k] != 'G' && sub[k] != 'T')
        {
          isACGT = false;
          break;
        }
      }
      if(isACGT)
      {
        if(max < sub.length())
        {
          max = sub.length();
        }
      }
    }
  }
  cout<<max<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: 'sub' was not declared in this scope
   18 |       for(int k = 0;k<sub.length();k++)
      |                       ^~~
a.cc:28:18: error: 'sub' was not declared in this scope
   28 |         if(max < sub.length())
      |                  ^~~
Language: C

#include <stdio.h>
#include <string.h>
#define max(a, b) (((a) > (b)) ? (a) : (b))
int main() {
	int r = 0 ans = 0;
	char s[20];
	scanf("%s", s);
	for(int i = 0; i < strlen(s);i++) {
		if (s[i] == 'A')r++;
		else if (s[i] == 'T')r++;
		else if (s[i] == 'G')r++;
		else if (s[i] == 'C')r++;
		else {
			ans = max(ans, r);
			r = 0;
		}
	}
	printf("%d", r);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:19: error: expected ',' or ';' before 'ans'
    5 |         int r = 0 ans = 0;
      |                   ^~~
main.c:14:25: error: 'ans' undeclared (first use in this function)
   14 |                         ans = max(ans, r);
      |                         ^~~
main.c:14:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
int main() {
	int r = 0;
	char s[20];
	scanf("%s", s);
	REP(i, strlen(s)) {
		if (s[i] == 'A')r++;
		else if (s[i] == 'T')r++;
		else if (s[i] == 'G')r++;
		else if (s[i] == 'C')r++;
		else r = 0;
	}
	printf("%d", r);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'REP' [-Wimplicit-function-declaration]
    7 |         REP(i, strlen(s)) {
      |         ^~~
main.c:7:13: error: 'i' undeclared (first use in this function)
    7 |         REP(i, strlen(s)) {
      |             ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:26: error: expected ';' before '{' token
    7 |         REP(i, strlen(s)) {
      |                          ^~
      |                          ;
Language: C

#include<stdio.h>

int main()
{
  int i,tmp,max;
  char s[11];
  i=0;
  tmp=0;
  max=0;

  scanf("%s", &s);

  while (a[i]!='\0') {
  if(a[i]=='A' || a[i]=='T' || a[i]=='C' || a[i]=='G'){tmp+=1;}
  else {tmp=0;}
  i++;
  if(max<count)max=tmp;
  }

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


Compiler output:
main.c: In function 'main':
main.c:13:10: error: 'a' undeclared (first use in this function)
   13 |   while (a[i]!='\0') {
      |          ^
main.c:13:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:10: error: 'count' undeclared (first use in this function)
   17 |   if(max<count)max=tmp;
      |          ^~~~~
Language: C

#include<stdio.h>

int main()
{
  int i,j,tmp,max==0;
  char s[11];

  scanf("%s", &s);

  for(i=0;i<11;i++){
    tmp=0;
    if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T'){
      i=j;
      while(s[j]=='A'||s[j]=='C'||s[j]=='G'||s[j]=='T'){
        tmp++;
        j++;
      }
      if(tmp>max){
        max=tmp;
      }
    }
  }
  printf("%d", max);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token
    5 |   int i,j,tmp,max==0;
      |                  ^~
main.c:18:14: error: 'max' undeclared (first use in this function)
   18 |       if(tmp>max){
      |              ^~~
main.c:18:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

// ABC122B - ATCoder
// https://atcoder.jp/contests/abc122/tasks/abc122_b
void ABC122B() {
	string S;
	cin >> S;

	string ans = ""; //初期値は空文字
	for (int i = 0; i < S.length(); i++) //部分文字列のスタート地点を決める
	{
		//cout << S[i] << endl;
		//ACGT以外が出たら飛ばす
		if (S[i] != 'A' && S[i] != 'C' && S[i] != 'G' && S[i] != 'T') {
			continue;
		}

		for (int j = i; j < S.length(); j++) //部分文字列の終端を探す
		{
			//ACGT以外が出たら終了
			if (S[j] != 'A' && S[j] != 'C' && S[j] != 'G' && S[j] != 'T') {
				//一番長い部分文字列を更新
				string substr = S.substr(i, j - i);
				//cout << substr << endl;
				if (ans.length() < substr.length()) {
					ans = substr;
				}

				break;
			}
		}
	}

	//cout << ans << endl;
	cout << ans.length << endl;
}

int main() {
	ABC122B();

	return 0;
}



Compiler output:
a.cc: In function 'void ABC122B()':
a.cc:36:14: error: invalid use of non-static 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]'
   36 |         cout << ans.length << endl;
      |         ~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1083:7: note: declared here
 1083 |       length() const _GLIBCXX_NOEXCEPT
      |       ^~~~~~
Language: C++


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

int main(){
	string s; cin>>s;
  	vector<int> x(s.size());
  	rep(i,s.size()){
    	if(s[i]=='A' || s[i]=='T' || s[i]=='C' || s[i]=='G') x[i]=1;
      	else x[i]=0;
    }
  	ll tmp=0,ans=0;
  	rep(i,s.size()){
     	if(x[i]==0) tmp=0;
    	else tmp++;
      	if(tmp>ans) ans=tmp;
    }
  	printf("%lld",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string s; cin>>s;
      |         ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | 
a.cc:7:19: error: 'cin' was not declared in this scope
    7 |         string s; 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 | 
a.cc:7:24: error: 's' was not declared in this scope
    7 |         string s; cin>>s;
      |                        ^
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<int> x(s.size());
      |         ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | 
a.cc:8:16: error: expected primary-expression before 'int'
    8 |         vector<int> x(s.size());
      |                ^~~
a.cc:10:62: error: 'x' was not declared in this scope
   10 |         if(s[i]=='A' || s[i]=='T' || s[i]=='C' || s[i]=='G') x[i]=1;
      |                                                              ^
a.cc:11:14: error: 'x' was not declared in this scope
   11 |         else x[i]=0;
      |              ^
a.cc:15:12: error: 'x' was not declared in this scope
   15 |         if(x[i]==0) tmp=0;
      |            ^
a.cc:19:9: error: 'printf' was not declared in this scope
   19 |         printf("%lld",ans);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 |
Language: C++

#include <string>
#include <iostream>

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

using namespace std;

int main(){
    string st;
    int out_max=0;
    int out_tmp=0;
    cin >> st;
    for(int i=0; i<st.size();i++){
        cout<<st[i]<<endl;
        if(st[i]=='A'||st[i]=='C'||st[i]=='T'||st[i]=='G'){
            out_tmp++;
        }
        else{
            out_tmp=0;
        }
        /* 
        switch(st[i]){
            case 'A':
            case 'C':
            case 'G':
            case 'T':
                out_tmp++;
            default:
                out_tmp=0;
        }
        */
        //printf("%d   %d\n",out_max,out_tmp);
        if(out_max < out_tmp){
            out_max = out_tmp;
        }
    }
    cout << out_max << endl;
    return 0;
}

Compiler output:
a.cc:4:21: error: stray '#' in program
    4 | using namespace std;#include <string>
      |                     ^
a.cc:4:22: error: 'include' does not name a type
    4 | using namespace std;#include <string>
      |                      ^~~~~~~
Language: C++

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

int main()
{
    int ans = 0, t_ans = 0, N;
    char S[10];
    cin >> S;
    N = strlen(S);
    for (int i = 0; i < N; i++)
    {
        if (S[i] == 'A' || S[i] == 'T' || S[i] == 'C' || S[i] == 'G')
        {
            ans++;
            if (i == N - 1)
                t_ans = ans;
        }
        else
        {
            if (t_ans < ans)
            {
                t_ans = ans;
            }
            ans = 0;
        }
    }
    cout << t_ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'strlen' was not declared in this scope
   11 |     N = strlen(S);
      |         ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  string S;
  cin >> S;
  int ans = 0;
  vector<int> v(10,0);
  for(int i=0;i<S.size();i++){
    if(S[i] == 'A' || S[i] == 'T'|| S[i] == 'C'|| S[i] == 'G'){
      ans++;
    }
    else {
      v[i] = ans;
      ans = 0;
  }
    sort(v.begin(),v.end());
  cout << max(ans,v[9] << endl;  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator<<'
   18 |   cout << max(ans,v[9] << endl;
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

bool acgt(char ch)
{
  char atgc[]=:"ACGT";
  for(int j=0 ; j<4 ; ++j)
  {
      if(ch==atgc[j])
      {
        return true;
      }
  }
  return false;
}

int main()
{
	string str;
  	cin>>str;
  	vector<int> atcg(str.length(),0);
  	int ans=0;
  	for(int i=0 ; i<n ; ++i)
    {
    	if(acgt[str[i]])
        atcg[i]=1;
      	if(i && acgt[str[i-1]])
    	atcg[i]+=atcg[i-1];
      	ans=max(atcg[i],ans);
    }
  	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'bool acgt(char)':
a.cc:6:15: error: expected primary-expression before ':' token
    6 |   char atgc[]=:"ACGT";
      |               ^
a.cc: In function 'int main()':
a.cc:23:25: error: 'n' was not declared in this scope
   23 |         for(int i=0 ; i<n ; ++i)
      |                         ^
a.cc:25:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   25 |         if(acgt[str[i]])
      |                       ^
a.cc:27:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   27 |         if(i && acgt[str[i-1]])
      |                              ^
Language: C

#include <stdio.h>
#include <string.h>
int jud(char a){
  char s[]={"AGTC"};
  for(int i=0;i<4;i++)strchr(s,a)?return 1:return 0;
}
int main(){
  int i,c=0,r=0;
  char s[11];
  scanf("%s",s);
  for(i=0;i<strlen(s);i++){
    jud(s[i])?c++:c=0;
    if(r<c)r=c;
  }
  printf("%d",r);
  return 0;
}

Compiler output:
main.c: In function 'jud':
main.c:5:35: error: expected expression before 'return'
    5 |   for(int i=0;i<4;i++)strchr(s,a)?return 1:return 0;
      |                                   ^~~~~~
main.c: In function 'main':
main.c:12:20: error: lvalue required as left operand of assignment
   12 |     jud(s[i])?c++:c=0;
      |                    ^
Language: C

#include <stdio.h>
int jud(char a){
  if(a=='A'||a=='G'||a=='T'||a=='C')return 1;
  else return 0;
}
int main(){
  int i,c=0,r=0;
  char s[11];
  scanf("%s",s);
  for(i=0;i<strlen(s);i++){
    jud(s[i])?c++:c=0;
    if(r<c)r=c;
  }
  printf("%d",r);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:13: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   10 |   for(i=0;i<strlen(s);i++){
      |             ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | int jud(char a){
main.c:10:13: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   10 |   for(i=0;i<strlen(s);i++){
      |             ^~~~~~
main.c:10:13: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:11:20: error: lvalue required as left operand of assignment
   11 |     jud(s[i])?c++:c=0;
      |                    ^
Language: C++

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#include <deque>
#include <stack>
using namespace std;

#define REP(i, n) for (int i = 0; i < (n); ++i)
#define DEBUG(x) cout << (#x) << ": " << (x) << endl
#define DEBUG_VEC(v)            \
    cerr << #v << ": ";         \
    REP(__i, (v).size())        \
    cerr << ((v)[__i]) << ", "; \
    cerr << endl

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;

bool isAtgc(char c) {
    return (c == 'A') or (c == 'T') or (c == 'G') or (c == 'C');
}

int main()
{
    ios::sync_with_stdio(false);
    string s;
    cin >> s;
    
    int res = 0;
    int curr = 0;
    REP(i, s.size()) {
        if isAtgc([i]) {
            curr += 1;
            res = max(res, curr);
        } else {
            curr = 0;
        }
    }
    cout << res << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:12: error: expected '(' before 'isAtgc'
   48 |         if isAtgc([i]) {
      |            ^~~~~~
      |            (
a.cc:51:11: error: 'else' without a previous 'if'
   51 |         } else {
      |           ^~~~
Language: C++

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

int main() {
  stirng s, t; cin >> s;
  t = "ACGT";
  int ans = 0;
  int now = 0;
  bool isACGT = false;
  for (char c: s) {
    for (int i = 0; i < 4; i++) {
      if (c == t.at(i)) isACGT = true;
    }
    if (!isACGT) {
      now = 0;
    }
    else {
      now++;
    }
    ans = max(ans, now);
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
    5 |   stirng s, t; cin >> s;
      |   ^~~~~~
a.cc:5:23: error: 's' was not declared in this scope
    5 |   stirng s, t; cin >> s;
      |                       ^
a.cc:6:3: error: 't' was not declared in this scope; did you mean 'tm'?
    6 |   t = "ACGT";
      |   ^
      |   tm
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++) {
   if (a.at(i)=='A'||'C'||'G'||'T'){
    count++;
   }
   else {
    count=0;
   }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'a' was not declared in this scope
    7 |    if (a.at(i)=='A'||'C'||'G'||'T'){
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(void){
  string s; cin>>s;
  int count ,max = 0;
 
  for(int i = 0;i < s.length();i++){
    for(int t = s.length() - i;t > 0;t--){
      count=0;
      for(char x:s.substr(i,t)){
 
        if(x == 'A'||x == 'G'||x == 'C'||x == 'T'){
          count++;
          if(count > max)max = count;
        }
        else break;
 
      }
    }
  }
  cout<<max;
 
}
#include<bits/stdc++.h>
using namespace std;

int main(void){
  string s; cin>>s;
  int count ,max = 0;

  for(int i = 0;i < s.length();i++){
    for(int t = s.length() - i;t > 0;t--){
      count=0;
      for(char x:s.substr(i,t)){

        if(x == 'A'||x == 'G'||x == 'C'||x == 'T'){
          count++;
          if(count > max)max = count;
        }
        else break;

      }
    }
  }
  cout<<max;

}


Compiler output:
a.cc:28:5: error: redefinition of 'int main()'
   28 | int main(void){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(void){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
	
	string s;
	cin >> s;
	int ans = 0,max = 0,len = s.length();

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

	max = max(ans,max);

	cout << max;

    return 0;
}

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

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

bool isAcgt(char s) {
    if(s == 'A' || s == 'C' || s == 'G' || s == 'T') {
        return true;
    }
    else {
        return false;
    }
}
 
int main() {
    string S;
    cin >> S;

    int max = 0;
    int num = 0;

    for(int i = 0; i < S.size(); i++) {
        if(isAcgt(S[i])) {
            num += 1;

            if(i == S.size() - 1) {
                if(max < num) {
                    max = num;
                }
            }
        }
        else{
            if(max < num) {
                max = num;
            }
            num = 0
        }
    }

    cout << max;
    
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:20: error: expected ';' before '}' token
   36 |             num = 0
      |                    ^
      |                    ;
   37 |         }
      |         ~
Language: C++

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

int acgt_length(string s) {
  int length = 0;
  
  for (int i = 0; int < s.length(); i++) {
    switch (s.at(i)) {
      case 'A':
      case 'T':
      case 'C':
      case 'G':
        length++;
        break;
        
      default:
        if (i == s.length() - 1) {
          return length;
        } else {
          string sub = s.substr(i + 1);
          return max(length, acgt_length(sub));
        }
        break;
    }
  }
  
  return length;
}

int main() {
  string S;
  cin >> S;
  
  int length = acgt_length(S);
  cout << length << endl;
}

Compiler output:
a.cc: In function 'int acgt_length(std::string)':
a.cc:7:19: error: 'int' is not a template
    7 |   for (int i = 0; int < s.length(); i++) {
      |                   ^~~
a.cc:7:33: error: call to non-'constexpr' 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]'
    7 |   for (int i = 0; int < s.length(); i++) {
      |                         ~~~~~~~~^~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1083:7: note: '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]' declared here
 1083 |       length() const _GLIBCXX_NOEXCEPT
      |       ^~~~~~
a.cc:7:19: error: expected primary-expression before 'int'
    7 |   for (int i = 0; int < s.length(); i++) {
      |                   ^~~
a.cc:7:18: error: expected ';' before 'int'
    7 |   for (int i = 0; int < s.length(); i++) {
      |                  ^~~~
      |                  ;
a.cc:7:19: error: expected primary-expression before 'int'
    7 |   for (int i = 0; int < s.length(); i++) {
      |                   ^~~
a.cc:7:18: error: expected ')' before 'int'
    7 |   for (int i = 0; int < s.length(); i++) {
      |       ~          ^~~~
      |                  )
a.cc:7:19: error: declaration does not declare anything [-fpermissive]
    7 |   for (int i = 0; int < s.length(); i++) {
      |                   ^~~
a.cc:7:37: error: 'i' was not declared in this scope
    7 |   for (int i = 0; int < s.length(); i++) {
      |                                     ^
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int ans = 0;
  int tmp = 0;
  cin >> s;
  for(si:s){
    if(si == 'A' || si == 'C' || si == 'G' || si == 'T'){
      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:8:9: error: found ':' in nested-name-specifier, expected '::'
    8 |   for(si:s){
      |         ^
      |         ::
a.cc:8:7: error: 'si' has not been declared
    8 |   for(si:s){
      |       ^~
a.cc:17:22: error: expected ')' before '}' token
   17 |   cout << ans << endl
      |                      ^
      |                      )
   18 | }
      | ~                     
a.cc:8:6: note: to match this '('
    8 |   for(si:s){
      |      ^
a.cc:18:1: error: expected primary-expression before '}' token
   18 | }
      | ^
Language: C++

#include <iostream>
#include <cstring>
using namespace std;
int main(){
  char str[12];
  int ans=0, res=0;
  cin >> str;
  for(int i=0; i<strlen(s); i++){
    if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T')
      res++;
    else
      res=0;
    if(res>ans)
      ans=res;
  }
  cout << ans;
    
  return 0;
}


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

#include <iostream>
#include <cstring>
using namespace std;
int main(){
  char s[12];
  int ans=0, res=0;
  cin >> str;
  for(int i=0; i<strlen(s); i++){
    if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T')
      res++;
    else
      res=0;
    if(res>ans)
      ans=res;
  }
  cout << ans;
    
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'str' was not declared in this scope; did you mean 'std'?
    7 |   cin >> str;
      |          ^~~
      |          std
Language: C++

#include <iostream>
#include <cstring>
using namespace std;
int main(){
  char s[12];
  int ans=0, res=0;
  cin >> str;
  for(i=0; i<strlen(s); i++){
    if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T')
      res++;
    else
      res=0;
    if(res>ans)
      ans=res;
  }
  cout << ans;
    
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'str' was not declared in this scope; did you mean 'std'?
    7 |   cin >> str;
      |          ^~~
      |          std
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0; i<strlen(s); i++){
      |       ^
Language: C++

#include <iostream>
#include <cstring>
using namespace std;
int main(){
  int s[12], ans=0, res=0;
  cin >> str;
  for(i=0; i<strlen(s); i++){
    if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T')
      res++;
    else
      res=0;
    if(res>ans)
      ans=res;
  }
  cout << ans;
    
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   cin >> str;
      |          ^~~
      |          std
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0; i<strlen(s); i++){
      |       ^
a.cc:7:21: error: cannot convert 'int*' to 'const char*'
    7 |   for(i=0; i<strlen(s); i++){
      |                     ^
      |                     |
      |                     int*
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(void){

    char S[11];
    int T[11] = {0};
    int X[11] = {0};
    scanf("%s", S);
    
    int i, j;
    int max_s = -1;
    int max_e = -1;
    int max_len = 0;
    for(i=0; S[i]!='\0'; i++) {
        if(S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T'){
            T[i] = 1;
        }
    }

    i = 0;
    while(S[i] !='\0') {
        // 同じ場所から順に右に探索
        if(T[i] == 1) {
           // printf("nice !S[%d] = %c\n", i, S[i]); 
           for(j=i; S[j]!='\0'; j++) {
               if(T[j] == 1) {
                   // printf("T[%d] = 1\n", j);
                   if(j - i + 1 > max_len) {
                       max_len = j - i + 1;
                       max_s = i;
                       max_e = j;
                       // printf("kiroku kousin\n");
                       flag = 1;
                    }
               }
               else{
                   i++;
                   // printf("quit, next\n");
                   break;
               }
           }
           i++;
           // printf("searching end. next i\n");
        }
        else{
           // printf("S[%d] = %c, zannen\n", i, S[i]); 
            i++;
        }
    }

    //printf("%d, %d, %d\n", max_s, max_e, max_len);
    printf("%d\n", max_len);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:34:24: error: 'flag' undeclared (first use in this function)
   34 |                        flag = 1;
      |                        ^~~~
main.c:34:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C++


#include <bits/stdc++.h>
using namespace std;
 
int main(){
string S;
  cin>>S;
  int sum=0;



  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'){
      sum++;

  }
    else if(sum!=0&&(S.at(i)!='A'&&S.at(i)!='T'&&S.at(i)!='G'&&S.at(i)!='C')){
      cout<<sum<<endl;
      break;
      
      else if(sum==0&&(S.at(i)!='A'&&S.at(i)!='T'&&S.at(i)!='G'&&S.at(i)!='C')){
        0+=sum;
}

  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected '}' before 'else'
   21 |       else if(sum==0&&(S.at(i)!='A'&&S.at(i)!='T'&&S.at(i)!='G'&&S.at(i)!='C')){
      |       ^~~~
a.cc:17:78: note: to match this '{'
   17 |     else if(sum!=0&&(S.at(i)!='A'&&S.at(i)!='T'&&S.at(i)!='G'&&S.at(i)!='C')){
      |                                                                              ^
a.cc:22:12: error: lvalue required as left operand of assignment
   22 |         0+=sum;
      |            ^~~
Language: C++

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

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

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

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

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

    for(int i=0; i<n; ++i){
        for(int j=(n-i); j>=1; --j){
            sub = s.substr(i, j);
            bool result1 = all_of(sub.begin(), sub.end(), [](char c){ return c=='A'||c=='C'||c=='G'||c=='T';});
            if(result1){
                auto count = count_if(sub.begin(), sub.end(), [](char c){ return c=='A'||c=='C'||c=='G'||c=='T';});
                ans = max(count, ans);
            }
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: no matching function for call to 'max(long int&, int&)'
   17 |                 ans = max(count, ans);
      |                       ~~~^~~~~~~~~~~~
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:17:26: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   17 |                 ans = max(count, ans);
      |                       ~~~^~~~~~~~~~~~
/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:17:26: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   17 |                 ans = max(count, ans);
      |                       ~~~^~~~~~~~~~~~
Language: C++

int main(void){
    int n = 0;
    string str;
    cin >> str;
    int tmpN = 0;
    for(int i = 0;i < str.length();i++){
        if(check(str[i])){
            tmpN++;
        }else{
            if(n < tmpN) n = tmpN;
            tmpN = 0;
        }
    }
    if(n < tmpN) n = tmpN;
    cout << n << endl;
    return 0;
}
bool check(char c){
    if(c == 'A' || c == 'T' || c == 'G' || c == 'C'){
        return true;
    }
    return false;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string str;
      |     ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> str;
      |     ^~~
a.cc:4:12: error: 'str' was not declared in this scope; did you mean 'std'?
    4 |     cin >> str;
      |            ^~~
      |            std
a.cc:7:12: error: 'check' was not declared in this scope
    7 |         if(check(str[i])){
      |            ^~~~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << n << endl;
      |     ^~~~
a.cc:15:18: error: 'endl' was not declared in this scope
   15 |     cout << n << endl;
      |                  ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:32: error: lvalue required as left operand of assignment
   11 |         if(s[i]!='A'&&s[i]!='C'&&s[i]='G'&&s[i]!='T'){ans=max(ans,cnt);cnt=0;}
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll cnt=0;
      |         ^~
a.cc:6:5: error: expected ';' before 'ans'
    6 |   ll ans=0;
      |     ^~~~
      |     ;
a.cc:9:9: error: expected ';' before 'i'
    9 |   for(ll i=0;i<s.size()-1;i++){
      |         ^~
      |         ;
a.cc:9:14: error: 'i' was not declared in this scope
    9 |   for(ll i=0;i<s.size()-1;i++){
      |              ^
a.cc:10:55: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |         if(s[i]!='A'&&s[i]!='C'&&s[i]='G'&&s[i]!='T'){ans=max(ans,cnt);cnt=0;}
      |                                                       ^~~
      |                                                       abs
a.cc:10:67: error: 'cnt' was not declared in this scope; did you mean 'int'?
   10 |         if(s[i]!='A'&&s[i]!='C'&&s[i]='G'&&s[i]!='T'){ans=max(ans,cnt);cnt=0;}
      |                                                                   ^~~
      |                                                                   int
a.cc:11:10: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |     else cnt++;
      |          ^~~
      |          int
a.cc:13:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   ans=max(ans,cnt);
      |   ^~~
      |   abs
a.cc:13:15: error: 'cnt' was not declared in this scope; did you mean 'int'?
   13 |   ans=max(ans,cnt);
      |               ^~~
      |               int
Language: C++

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

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

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

S=str(input())
length=0
longest=0

for i in range(len(S)):
    if S[i]!='A' and S[i]!='C' and S[i]!='G' and S[i]!='T':
        length=0
    else:
        length+=1
    if length>longest:
        longest=length
print(longest)

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

#include "bits/stdc++.h"

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



Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: 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 '()' ?)
   10 |         for (int i = 0; i < a.length; i++) {
      |                             ~~^~~~~~
      |                                     ()
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'y' was not declared in this scope
   15 |             y=x;
      |             ^
a.cc:19:17: error: 'y' was not declared in this scope
   19 |     cout << (x>=y?x:y) << endl;
      |                 ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
  string s;
  getline(cin,s);
  int l,count=0;
  l=s.length();
  int max=0;
  for(int i=0;i<l;i++)
  {
    if(s[i]=='A' || s[i]=='C' || s[i]=='G' || s[i]=='T')
    {
      count ++;
    }
    if(s[i+1]!='A' || s[i+1]!='C' || s[i+1]|='G' || s[i+1]!='T')
      {
      if(count>max)
      {
        max=count;
      }
        count=0;
      }
  }
  cout<<max;
  return 0;
}


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

s = input()
cnt = 0
ans = []

for i in range(len(s)):
    if (s[i] == 'A') or (s[i] == 'T') or (s[i] == 'C') or (s[i] == 'G'):
        cnt += 1
    else:
        cnt = 0
    ans.append(cnt)
print(max(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 a,b;
  string s;
  cin >>s;
  
  for(int i=0;i<s.length();i++){
    if(s[i] == "A") a++;
    else if(s[i] == "T") a++;
    else if(s[i] == "G") a++;
    else if(s[i] == "C") a++;
    else a = 0;
    b = max(a,b);
  }
  cout<<b<<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") a++;
a.cc:11:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     else if(s[i] == "T") a++;
a.cc:12:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     else if(s[i] == "G") a++;
a.cc:13:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     else if(s[i] == "C") a++;
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<numeric>
#include<string>
#include<vector>
using namespace std;
int main(){
    string s;
    cin>>s;
    strgin T="ATCG";
    int ans=0;
    int now=0;//今みている文字列を末尾とするATCG文字列
    for(int i=0;i<s.size();i++){
        bool isATCG=false;
        for(int j=0j<T.size();j++){
            if(s[i]==T[j])isATCG=true;
        }
        if(!isATCG){
            now=0;
        }else{
            now++;
            ans+=max(now,ans);
        }
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'strgin' was not declared in this scope; did you mean 'strspn'?
   11 |     strgin T="ATCG";
      |     ^~~~~~
      |     strspn
a.cc:16:22: error: 'T' was not declared in this scope
   16 |         for(int j=0j<T.size();j++){
      |                      ^
a.cc:16:34: error: expected ';' before ')' token
   16 |         for(int j=0j<T.size();j++){
      |                                  ^
      |                                  ;
Language: Java

import java.util.*;
import java.io.*;

public class Main
{
  	int cnt, max = 0, at = 0, l;
  	char[] s;
  	String set = "ATGC";
  
    Main(Scanner in, PrintWriter out)
    {
      s = in.next().toCharArray();
      l = s.length;
      while (at < l)
      {
        cnt = 0;
        while (at < l && set.contains(s[at]))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
      }
      out.print(max);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
}

Compiler output:
Main.java:17: error: incompatible types: char cannot be converted to CharSequence
        while (at < l && set.contains(s[at]))
                                       ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C

#include <stdio.h>
int main(){
  char s[10];
  int c=0,i;
  scanf("%s",s);
  for(i=0;i<10;i++){
    if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C')
		c++;
    if(c>i)
    	i=c;
    
    if(s[i]=='\0')
      break;
  }

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

#include <stdio.h>
int main(){
  char s[10];
  int c=0,i;
  scanf("%s",s);
  for(i=0;i<10;i++){
    if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C')
		c++;
    if(c>i)
    	i=c;
    
    if(s[i]=='\0' )
      break;
  }

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

#include <stdio.h>
int main(){
  char s[10];
  int c=0,i;
  scanf("%s",s);
  for(i=0;i<=9;i++){
    if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C')
		c++;
  }
  printf("%d",c);
  
  return 0;
}
      
      
      
      
      
      
      
      
  }

Compiler output:
main.c:22:3: error: expected identifier or '(' before '}' token
   22 |   }
      |   ^
Language: C

#include <stdio.h>
int main(){
  char string[10];
  int count=0;
    scanf("%s",string);
  do{
    static int i=0;
    if(string[i]=='A')
      ++count;
    if(string[i]=='T')
      ++count;
    if(string[i]=='G')
      ++count;
    if(string[i]=='C')
      ++count;
    ++i;
  }while(string[i]=='\0');
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:17: error: 'i' undeclared (first use in this function)
   17 |   }while(string[i]=='\0');
      |                 ^
main.c:17:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
  char string[10];
  int i=0,count=0;
    scanf("%s",string);
  do{
    
    if(string[i]=='A')
      ++count;
    if(string[i]=='T')
      ++count;
    if(string[i]=='G')
      ++count;
    if string[i]=='C')
      ++count;
    i++;
  }while(string[i]=='\0');
  printf("%d",count);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:8: error: expected '(' before 'string'
   14 |     if string[i]=='C')
      |        ^~~~~~
      |        (
main.c:14:22: error: expected statement before ')' token
   14 |     if string[i]=='C')
      |                      ^
Language: C

#include <stdio.h>
int main(){
  char string[10];
  int i=0,count=0;
    scanf("%s",string);
  do{
    
    if(string[i]=='A')
      ++count;
    if(string[i]=='T')
      ++count;
    if(string[i]=='G')
      ++count;
    if string[i]'C')
      ++count;
    i++;
  }while(string[i]=='\0');
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:8: error: expected '(' before 'string'
   14 |     if string[i]'C')
      |        ^~~~~~
      |        (
main.c:14:20: error: expected statement before ')' token
   14 |     if string[i]'C')
      |                    ^