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

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: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string s;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>s;
      |   ^~~
a.cc:3:8: error: 's' was not declared in this scope
    3 |   cin>>s;
      |        ^
a.cc:11:15: error: 'max' was not declared in this scope
   11 |         count=max(a,count);
      |               ^~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   16 |   cout<<count<<endl;
      |   ^~~~
      |   count
a.cc:16:16: error: 'endl' was not declared in this scope
   16 |   cout<<count<<endl;
      |                ^~~~
Language: C++

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

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

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'string' was not declared in this scope
    4 |     string S;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> S;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:5:12: error: 'S' was not declared in this scope
    5 |     cin >> S;
      |            ^
a.cc:16:19: error: 'max' was not declared in this scope
   16 |             res = max(res, cnt);
      |                   ^~~
a.cc:21:15: error: 'max' was not declared in this scope
   21 |         res = max(res, 1);
      |               ^~~
a.cc:23:5: error: 'cout' was not declared in this scope
   23 |     cout << res;
      |     ^~~~
a.cc:23:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int cnt=0,cnt1=0;
int n[99999999999]={0}
int panduan(string t){
	for(int i=0;i<s.size();i++){
		if(s[i]=='A'||s[i]=='c'||s[i]=='G'||s[i]=='T')cnt++;
	}
	else{
		n[cnt1]==cnt;
		cnt1++;
		cnt=0;
	}
	sort[n,n+cnt1]
	return n[cnt1-1]
}
int main() {
	string s;
	getline(cin,s);
	cout<<panduan(s);
	return 0;
}


Compiler output:
a.cc:6:1: error: expected ',' or ';' before 'int'
    6 | int panduan(string t){
      | ^~~
a.cc: In function 'int main()':
a.cc:21:15: error: 'panduan' was not declared in this scope
   21 |         cout<<panduan(s);
      |               ^~~~~~~
Language: C++

#define rep0(i,n) for(i=0;i<n;i++)
#define test(a) cout << "*" << a << endl
int main(){
  string s;
  int i,j;
  int sLongMax=0;
  int sLong=0;
  
  cin >> s;
  
  
  rep0(i,s.size()){
    if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T'){
      sLong++;
      if(i==s.size()-1)/*注意*/
        sLongMax = sLong; 
    }
    else{
      if(sLongMax<sLong){
        sLongMax = sLong;
      }
      sLong = 0;
    }
  }
  cout << sLongMax << endl;
    
      
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s;
      |   ^~~~~~
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> s;
      |   ^~~
a.cc:9:10: error: 's' was not declared in this scope
    9 |   cin >> s;
      |          ^
a.cc:25:3: error: 'cout' was not declared in this scope
   25 |   cout << sLongMax << endl;
      |   ^~~~
a.cc:25:23: error: 'endl' was not declared in this scope
   25 |   cout << sLongMax << endl;
      |                       ^~~~
Language: C++


  int c=0;
  for(int j=0;j<s.size();j++){
    if(atgc(s[j])==1){
      i++;
    }
    c=j;#include <iostream>
using namespace std;

int atgc(char c){
  if(c=='A' || c=='T' || c=='G' || c=='C'){
    return 1;
  }else{
    return 0;
  }
}

int main(){
  string s;
  cin>>s;
  int count=100;
  vector<int> v;
  int i=0;
    while(atgc(s[c])==1){
      c++;
    }
    count=max(count,c);
    cout<<count<<endl;
}

Compiler output:
a.cc:7:9: error: stray '#' in program
    7 |     c=j;#include <iostream>
      |         ^
a.cc:3:3: error: expected unqualified-id before 'for'
    3 |   for(int j=0;j<s.size();j++){
      |   ^~~
a.cc:3:15: error: 'j' does not name a type
    3 |   for(int j=0;j<s.size();j++){
      |               ^
a.cc:3:26: error: 'j' does not name a type
    3 |   for(int j=0;j<s.size();j++){
      |                          ^
Language: C++

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


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


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

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define square(x) pow(x 2.0)
#define all(x) (x).begin(),(x).end()
#define F first
#define S second
#define max_queue(x) priority_queue<x>
#define min_queue(x) priority_queue<x, vector<x>, greater<x>>
#define big_sort(v) sort(all(v), [](int a, int b) { return a > b; })//大きい順にソート
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
#define co(x) cout << x << endl;
#define cins(n,v) rep(i,n){cin >> v.at(i);}
#define couts(v) rep(i,v.size()){cout << v.at(i) << endl;}
// aよりもbが大きいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmax(T &a, const T& b) {
  if (a < b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}
// aよりもbが小さいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmin(T &a, const T& b) {
  if (a > b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}
/*
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
*/
int main() {
  string str,sub;
  int len,ans;
  bool flag=true;
  cin >> str;
  len = str.size();
  rep(i,len){
    rep(j,len-i-1){
      sub=str.substr(j,i+1)
      rep(i,sub.size()){
        if(sub[i]!='A'&&sub[i]!='T'&&sub[i]!='G'&&sub[i]!='C'){
          bool = false;
          break;
        }
      }
      if(bool){
        ans=i+1;
      }
      bool = true;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:28: error: expected ';' before 'for'
   67 |       sub=str.substr(j,i+1)
      |                            ^
      |                            ;
a.cc:4:61: error: expected ';' before ')' token
    4 | #define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
      |                                                             ^
a.cc:5:18: note: in expansion of macro 'REP'
    5 | #define rep(i,n) REP(i,0,n)
      |                  ^~~
a.cc:68:7: note: in expansion of macro 'rep'
   68 |       rep(i,sub.size()){
      |       ^~~
a.cc:74:14: error: expected unqualified-id before ')' token
   74 |       if(bool){
      |              ^
a.cc:77:12: error: expected unqualified-id before '=' token
   77 |       bool = true;
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: 'G' was not declared in this scope
   12 |     if(c=='A'||c=='C'||c==G||c==T) cnt++;
      |                           ^
a.cc:12:33: error: 'T' was not declared in this scope
   12 |     if(c=='A'||c=='C'||c==G||c==T) cnt++;
      |                                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define fro(i,j,n) for(int i=j;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)


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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'length' was not declared in this scope
   15 |     fr(i,length(s)){
      |          ^~~~~~
a.cc:5:31: note: in definition of macro 'fr'
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |                               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define fro(i,j,n) for(int i=j;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)


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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   15 |     fr(i,strlen(s)){
      |                 ^
      |                 |
      |                 std::string {aka std::__cxx11::basic_string<char>}
a.cc:5:31: note: in definition of macro 'fr'
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |                               ^
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/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<iostream>
#include<string>

using namespace std;

int main()
{
  string s; 
  cin>>s;
  
  int ans[10];
  
  bool now=false;
  bool first=false;
  
  int index;
  
  for(int i=0;i<s.length();i++)
  {
    //acgt
    //違うならfalse
    if(s[i]!='A'&&s[i]!='C'&&s[i]!='G'
                &&s[i]!='T')
    {
      now=false;
    }
    
    //初回ならfirst=true
    //now=true
    if((!now)&&(s[i]=='A'||s[i]=='C'||s[i]=='G'
                ||s[i]=='T')
       {
         first=true;
         now=true;
       }
       
       //初回ならindexずらす
       if(first)
       {
         index++;
         first=false;
       }
       
       if(now&&(s[i]=='A'||s[i]=='C'||s[i]=='G'
                ||s[i]=='T'))
       {
         ans[index]++;
       }
  }
  
  int nowAns=ans[1];
  
  for(int i=1;i<10;i++)
  {
    if(ans[i]>=nowAns)
    {
      nowAns=ans[i];
    }
  }
  
  cout<<nowAns<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:29: error: expected ')' before '{' token
   31 |                 ||s[i]=='T')
      |                             ^
      |                             )
   32 |        {
      |        ~                     
a.cc:30:7: note: to match this '('
   30 |     if((!now)&&(s[i]=='A'||s[i]=='C'||s[i]=='G'
      |       ^
a.cc:49:3: error: expected primary-expression before '}' token
   49 |   }
      |   ^
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main()
{
  string s; 
  cin>>s;
  
  int ans[10];
  
  bool now=false;
  
  int index;
  
  for(int i<0;s.length();i++)
  {
    if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T')
    {
      now=true;
      ans[index]++;
    }
    
    if(now&&(s[i]!='A')&&(s[i]!='C')&&(s[i]!='G')
       &&(s[i]!='T'))
    {
      now=false;
      index++;
    }
  }
  
  int nowAns=ans[0];
  
  for(int i=0;i<10;i++)
  {
    if(ans[i]>=nowAns)
    {
      nowAns=ans[i];
    }
  }
  
  cout<<nowAns<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: expected ';' before '<' token
   17 |   for(int i<0;s.length();i++)
      |            ^
      |            ;
a.cc:17:12: error: expected primary-expression before '<' token
a.cc:17:23: warning: ignoring return value of '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 with attribute 'nodiscard' [-Wunused-result]
   17 |   for(int i<0;s.length();i++)
      |               ~~~~~~~~^~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1083:7: note: declared here
 1083 |       length() const _GLIBCXX_NOEXCEPT
      |       ^~~~~~
a.cc:17:25: error: expected ')' before ';' token
   17 |   for(int i<0;s.length();i++)
      |      ~                  ^
      |                         )
a.cc:17:26: error: 'i' was not declared in this scope
   17 |   for(int i<0;s.length();i++)
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll MOD=1000000007;
const double PI=3.14159265358979;
const ll INF= pow(10,18);
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";

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

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: 'c' was not declared in this scope
   22 |       c++;
      |       ^
a.cc:26:7: error: 'c' was not declared in this scope
   26 |       c=0;
      |       ^
Language: C++

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


int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  string s;
  cin>>s;
  int c[15];
  
  
  for(int k=0;k<15;k++){
    c[k]=0;
  }
  int j=0;
  int e;
  for(int i=0;i<s.length();i++){
    if((s[i]=='A' || s[i]=='G'|| s[i]=='T'|| s[i]=='C')&&(s[i+1]=='A' || s[i+1]=='G'|| s[i+1]=='T'|| s[i+1]=='C')){
       c[j]=c[j]+1;
    }else{
      j++;
    }
    if((s[i]=='A' || s[i]=='G'|| s[i]=='T'|| s[i]=='C')&&(!(s[i+1]=='A' || s[i+1]=='G'|| s[i+1]=='T'|| s[i+1]=='C')){
       e=1;
    }
  }
  
  sort(c,c+15);
  if(c[14] !=0 && c[14]>=e){
  cout<<c[14]+1;
  }else if(c[14]<e){
    cout<<e;
  }else{
    cout<<0;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:24:117: error: expected ')' before '{' token
   24 |     if((s[i]=='A' || s[i]=='G'|| s[i]=='T'|| s[i]=='C')&&(!(s[i+1]=='A' || s[i+1]=='G'|| s[i+1]=='T'|| s[i+1]=='C')){
      |       ~                                                                                                             ^
      |                                                                                                                     )
a.cc:27:3: error: expected primary-expression before '}' token
   27 |   }
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 string S;
  cin>>S;
  int N=S.size();
  vector<int> A(N);
  for(int i=0;i<N;i++){
  int sum=0;
    for(int j=i;j<N;j++){
    char c=S.at(j);
      if(c=='A'||c=='C'||c=='G'||c=='T')
        sum++;
      else break;
    
    } sum=A.at(i);
  
   }int Max=A.at(0);
  for(int i=1;i<N;i++)
    if(Max<=A.at(i)
       Max=A.at(i);
       
       cout<<Max<<endl;
      
      
      
      
      
      
      
      
      
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: expected ';' before 'Max'
   20 |     if(Max<=A.at(i)
      |                    ^
      |                    ;
   21 |        Max=A.at(i);
      |        ~~~          
a.cc:23:23: error: expected ')' before ';' token
   23 |        cout<<Max<<endl;
      |                       ^
      |                       )
a.cc:20:7: note: to match this '('
   20 |     if(Max<=A.at(i)
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 string S;
  cin>>S;
  int N=S.size();
  vector<int> A(N);
  for(int i=0;i<N;i++){
  int sum=0;
    for(int j=i;j<N;j++){
    char c=S.at(j);
      if(c=='A'||c=='C'||c=='G'||c=='T')
        sum++;
      else break;
    
    } sum=A.at(0);
  
   }int Max=A.at(i);
  for(int i=1;i<N;i++)
    if(Max<=A.at(i)
       Max=A.at(i);
       
       cout<<Max<<endl;
      
      
      
      
      
      
      
      
      
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: 'i' was not declared in this scope
   18 |    }int Max=A.at(i);
      |                  ^
a.cc:20:20: error: expected ';' before 'Max'
   20 |     if(Max<=A.at(i)
      |                    ^
      |                    ;
   21 |        Max=A.at(i);
      |        ~~~          
a.cc:23:23: error: expected ')' before ';' token
   23 |        cout<<Max<<endl;
      |                       ^
      |                       )
a.cc:20:7: note: to match this '('
   20 |     if(Max<=A.at(i)
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 string S;
  cin>>S;
  int N=S.size();
  vector<int> A(N);
  for(int i=0;i<N;i++){
  int sum=0;
    for(int j=i;j<N;j++){
    char c=S.at(j);
      if(c=='A'||c=='C'||c=='G'||c=='T')
        sum++;
      else break;
    
    } sum=A.at(i);
  
   }int Max=A.at(i);
  for(int i=1;i<N;i++)
    if(Max<=A.at(i)
       Max=A.at(i);
       
       cout<<Max<<endl;
      
      
      
      
      
      
      
      
      
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: 'i' was not declared in this scope
   18 |    }int Max=A.at(i);
      |                  ^
a.cc:20:20: error: expected ';' before 'Max'
   20 |     if(Max<=A.at(i)
      |                    ^
      |                    ;
   21 |        Max=A.at(i);
      |        ~~~          
a.cc:23:23: error: expected ')' before ';' token
   23 |        cout<<Max<<endl;
      |                       ^
      |                       )
a.cc:20:7: note: to match this '('
   20 |     if(Max<=A.at(i)
      |       ^
Language: C++

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

using namespace std;

bool isACGT(char x){
  return x=='A' || x=='C' || x=='G' || x=='T';
}

int main(){
  string s;
  cin >> s;
  int n=0;
  vector<int> ans;
  for(int i=0;i<s.length();i++){
  if(isACGT(s[i])) n++;
  else {ans.push_back(n); n=0;}
  }
	ans.push_back(n)
  	cout << *max_element(ans.begin(),ans.end()) << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected ';' before 'cout'
   21 |         ans.push_back(n)
      |                         ^
      |                         ;
   22 |         cout << *max_element(ans.begin(),ans.end()) << endl;
      |         ~~~~
Language: C++

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

using namespace std;

bool isACGT(char x){
  return x=='A' || x=='C' || x=='G' || x=='T';
}

int main(){
  string s;
  cin >> s;
  int n=0;
  vector<int> ans;
  for(int i=0;i<s.length();i++){
  if(isACGT(s[i])) n++;
  else {ans.push_back(n); n=0;}
  }
	ans.push_back(n)
  	cout << *max_element(ans.begin(),ans.end()) << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'vector' was not declared in this scope
   15 |   vector<int> ans;
      |   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | 
a.cc:15:10: error: expected primary-expression before 'int'
   15 |   vector<int> ans;
      |          ^~~
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |   else {ans.push_back(n); n=0;}
      |         ^~~
      |         abs
a.cc:20:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |         ans.push_back(n)
      |         ^~~
      |         abs
Language: C++

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

using namespace std;

bool isACGT(char x){
  return x=='A' || x=='C' || x=='G' || x=='T';
}

int main(){
  string s;
  cin >> s;
  int n=0;
  vector<int> ans;
  for(int i=0;i<s.length();i++){
  if(isAGCT(s[i]) n++;
  else {ans.push_back(n); n=0;}
  }
	ans.push_back(n)
  	cout << *max_element(ans.begin(),ans.end()) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'vector' was not declared in this scope
   15 |   vector<int> ans;
      |   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | 
a.cc:15:10: error: expected primary-expression before 'int'
   15 |   vector<int> ans;
      |          ^~~
a.cc:17:6: error: 'isAGCT' was not declared in this scope; did you mean 'isACGT'?
   17 |   if(isAGCT(s[i]) n++;
      |      ^~~~~~
      |      isACGT
a.cc:18:3: error: expected primary-expression before 'else'
   18 |   else {ans.push_back(n); n=0;}
      |   ^~~~
a.cc:17:23: error: expected ')' before 'else'
   17 |   if(isAGCT(s[i]) n++;
      |     ~                 ^
      |                       )
   18 |   else {ans.push_back(n); n=0;}
      |   ~~~~                 
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^
a.cc:20:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |         ans.push_back(n)
      |         ^~~
      |         abs
Language: C++

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

int main() {
	string s;
	string t="ATCG"
	cin>>s;
	
	int ans=0;
	int now=0;
	
	for(int i=0;i<s.size();i++){
		bool ok=false;
		for(int j=0;j<t.size();j++){
			if(s[i]==T[j])ok=true;
		}
		if(ok){
			now++;
			ans=max(ans,now);
		}
		else{
			now=0;
		}
	}
	
	cout>>ens>>endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected ',' or ';' before 'cin'
    7 |         cin>>s;
      |         ^~~
a.cc:15:34: error: 'T' was not declared in this scope
   15 |                         if(s[i]==T[j])ok=true;
      |                                  ^
a.cc:26:15: error: 'ens' was not declared in this scope; did you mean 'ans'?
   26 |         cout>>ens>>endl;
      |               ^~~
      |               ans
Language: C++

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

int main() {
	string s;
	cin>>s;
	
	string t="ATCG";
	int ans=0;
	
	for(int i=0;i<s.size();i++){
		int now=0;
		for(int j=i;j<s.size();j++){
			bool ok=false;
			for(int k=0;k<t.size();k++){
				if(s[j]==t[k])ok=true;
			}
			if(ok){
				now++;
				ans=max(ans,now)
			}else{
				break;
			}
		}
	}
	
	cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:49: error: expected ';' before '}' token
   20 |                                 ans=max(ans,now)
      |                                                 ^
      |                                                 ;
   21 |                         }else{
      |                         ~
Language: C++

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

int main(){
  string s;
  cin >> s;
  set<char> acgt; int l=0;
  acgt.insert('A'); acgt.insert('C'); acgt.insert('G'); acgt.insert('T');
  for(int i=0;i<s.size();i++){
    for(int j=1;j<s.size()-i;j++){
      string  tmp = s.substr(i,j);
      bool flag = true;
      for(int k=0;k<tmp.size();k++) if(!acgt.count(tmp.at(k))) flag = false;
      if(flag) l = max(l,tmp.size());
    }
  }
  cout << l << endl;
        
      
}


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

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

int main(){
  string s;
  cin >> s;
  set<char> = acgt; int l=0;
  acgt.insert('A'); acgt.insert('C'); acgt.insert('G'); acgt.insert('T');
  for(int i=0;i<s.size();i++){
    for(int j=1;j<s.size()-i;j++){
      string  tmp = s.substr(i,j);
      bool flag = true;
      for(int k=0;k<tmp.size();k++) if(!acgt.count(tmp.at(k))) flag = false;
      if(flag) l = max(l,tmp.size());
    }
  }
  cout << l << endl;
        
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected unqualified-id before '=' token
    7 |   set<char> = acgt; int l=0;
      |             ^
a.cc:8:3: error: 'acgt' was not declared in this scope; did you mean 'acct'?
    8 |   acgt.insert('A'); acgt.insert('C'); acgt.insert('G'); acgt.insert('T');
      |   ^~~~
      |   acct
a.cc:14:23: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)'
   14 |       if(flag) l = max(l,tmp.size());
      |                    ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:14:23: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   14 |       if(flag) l = max(l,tmp.size());
      |                    ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:14:23: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   14 |       if(flag) l = max(l,tmp.size());
      |                    ~~~^~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <map>
#include <cstdlib>
#include <cmath>
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0;i<n;i++)
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;
            ans=max(ans,tmp);
        }else tmp=0;
    cout << ans << endl;
}


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

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

int main(){
  sring S;
  cin >> S;
  
  string T="ATCG";
  
  int ans = 0;//ATCGの文字列の最大長
  int now = 0;//今見ている文字を末尾とするATCGの文字列の最大長
  for (int i=0;i<S.size();++i){
    bool isATCG = false;
    for (int j=0;j<T.size();++j){
       if (S[i]==T[j]) isATCG = true;
    }
    
    if (!isATCG){
      //違う場合は０にする
      now = 0;
    }
    else {
      //ATCG文字の場合は、前の文字列に1つ文字を足せる
      now++;
      //最大値を更新する
      ans=max(ans,now);
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'sring' was not declared in this scope
    5 |   sring S;
      |   ^~~~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
Language: C++

#abc122_b
#word = 'HATAGAYA'
#word = 'SHINJUKU'
word = input()
chl = ['A','C','G','T']
lmax = 0
temp = 0
for ch in word:
    if ch in chl:
        temp += 1
    else:
        temp = 0
    if temp >= lmax:
            lmax = temp
print(lmax)

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #abc122_b
    1 | #abc122_b
      |  ^~~~~~~~
a.cc:2:2: error: invalid preprocessing directive #word
    2 | #word = 'HATAGAYA'
      |  ^~~~
a.cc:3:2: error: invalid preprocessing directive #word
    3 | #word = 'SHINJUKU'
      |  ^~~~
a.cc:4:1: error: 'word' does not name a type
    4 | word = input()
      | ^~~~
Language: C++

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

int main() {
    string s;
    cin >> s;
    int ans = 0, q = -1;
    rep(i, s.size()) {
        if(s[i] != 'A' || s[i] != 'C' || s[i] != 'G' || s[i] != 'T') {
            int p = i - q-1;
            if(p > ans) {
                
                ans = p;
            }
            q=i;
        }
        if(i==s.size()){
            p=i-q;
            if(p > ans) {
                
                ans = p;
            }
            q=i;
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'p' was not declared in this scope
   21 |             p=i-q;
      |             ^
Language: C++

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

int main() {
    string s;
    cin >> s;
    int ans = 0, q = -1;
    rep(i, s.size()) {
        if(s[i] != 'A' || s[i] != 'C' || s[i] != 'G' || s[i] != 'T') {
            int p = i - q-1;
            if(p > ans) {
                q = i;
                ans = p;
            }
        }
        if(i==s.size()){
            p=i-q;
            if(p > ans) {
                q = i;
                ans = p;
            }
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: 'p' was not declared in this scope
   20 |             p=i-q;
      |             ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: expected primary-expression before ']' token
   15 |        ]
      |        ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C

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

int main(){
  char *S;
  int max=0;
  int len;
  scanf("%s",S);
  for(int i = 0;S[i] != '\0';i++){
    len = 1;
    for(int j = i;S[j] ! = '\0';j++){
      if(S[j] != 'A'||S[j] != 'T'||S[j] != 'C'||S[j] != 'G') continue;
      len++;
      if(max < len) max = len;
    }
  }
  printf("%d\n",max);
  return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:12:23: error: expected ';' before '!' token
   12 |     for(int j = i;S[j] ! = '\0';j++){
      |                       ^~
      |                       ;
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++){
        int lo=0;
        int so=i
        while(1){
            if(s[so]=='A'||s[so]=='C'||s[so]=='G'||s[so]=='T'){
                lo++;
                so++;
            }
            else if(so<=s.size())break;
            else{
                break;
            }
        }
        if(max<lo)max=lo;
    }
    cout << max << endl;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ',' or ';' before 'while'
   10 |         while(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++){
    int kari=0;
    for(int j=i;j<n;j++){
      if(s[j]=='A' || s[j]=='C' || s[j]=='G' s[j]=='T') kari++;
      else break;
    }
    ans=max(ans,kari);
  }
  cout<<ans<<endl;
      
}

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

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

using ll=long long;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int ans = 0;
  int res = 0;
  rep(i,s.size()){
    if(s[i]=="A"||s[i]=="G"||s[i]=="C"||s[i]=="T") res++;
    else {
      ans = max(ans, res);
      res = 0;
    }
  }
  ans = max(ans, res);
  cout << ans << endl;
}

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

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

int main(){
    string s;
    cin >> s;
    int res = 1;
    int res_m = 1;
    string ans = "";
    string test = "";
    rep(i,s.size()){
        if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T'){
            ans.push_back('.');
        }
        else ans.push_back('#');
    }
    rep(i,s.size()){
        test += '#';
    }
    if(ans == test){
        cout << 0 << endl;
        return 0;
    }
    else{
        rep(i,res.size()){
            if(ans[i] == '.'){
                if(ans[i] == ans[i+1]) res_m++;
                else if(ans[i] != ans[i+1]){
                    res = max(res_m,res);
                }
            }
        }
    }
  	cout << res << endl;
}

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

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

int main(){
    string s;
    cin >> s;
    int res = 1;
    int res_m = 1;
    string ans = "";
    string test = "";
    rep(i,s.size()){
        if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T'){
            ans.push_back('.');
        }
        else ans.push_back('#');
    }
    rep(i,s.size()){
        test += '#';
    }
    if(ans == test){
        cout << 0 << endl;
        return 0;
    }
    else{
        rep(i,res.size()){
            if(ans[i] == '.'){
                if(ans[i] == ans[i+1]) res_m++;
                if(ans[i] != ans[i+1]){
                    res = max(res_m,res);
                }
            }
        }
    }
  	cout << res << endl;
}

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

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

int main(){
    string s;
    cin >> s;
    int res = 1;
    int res_m = 1;
    string ans = "";
    string test = "";
    rep(i,s.size()){
        if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T'){
            ans.push_back('.');
        }
        else ans.push_back('#');
    }
    rep(i,s.size()){
        test += '#';
    }
    if(ans == test){
        cout << 0 << test;
        return 0;
    }
    elae{
        rep(i,s.size()){
            if(ans[i] == '.'){
                if(ans[i] == ans[i+1]) res_m++;
            }
            if(ans[i] != ans[i+1]){
                res = max(res_m,res);
            }
        }
    }
  	cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'elae' was not declared in this scope
   25 |     elae{
      |     ^~~~
Language: C++

s = input()
n = len(s)

res = 0
for i in range(n):
    for j in range(i, n):
        sub = s[i: j+1]
        
        flg = True
        for c in sub:
            if(c not in ['A', 'G', 'C', 'T']): flg = False
        
        if(flg): res = max(res, len(sub))

print(res)

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 P = pair<int,int>;

int main() {

  string s
  cin >> s;

  int count = 0;
  int ans = 0;
  int N = s.size();
  rep(i,N){
    if (s.at(i)== 'A' || s.at(i)== 'T' || s.at(i)== 'C' ||s.at(i)== 'G'){
      count = 1;
      rep(j,N-i){
        if (s.at(j)== 'A' || s.at(j)== 'T' || s.at(j)== 'C' ||s.at(j)== 'G'){
          count++;
          ans = max(ans, count);
        }
        else {
          break;
        }
      }
    }
  }

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



Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected initializer before 'cin'
   11 |   cin >> s;
      |   ^~~
a.cc:15:11: error: 's' was not declared in this scope
   15 |   int N = s.size();
      |           ^
Language: C++

#include <bits/stdc++.h> 
using namespace std;
typedef long long ll;
const int MM = 1000000000;
const int MOD = MM + 7;
const int MAX = 510000;
#define rep(i, n) for(ll i=0; i<n; i++)
#define Rep(i, j, n) for(ll i=j; i<n; i++)
#define all(vec) vec.begin(), vec.end()
template<class T> inline bool chmin(T& a, T b) {if(a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) {if(a < b) {a = b; return true;} return false;}
const ll INF = 1LL << 60;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:26:16: error: 'res' was not declared in this scope; did you mean 'rep'?
   26 |     chmax(ans, res);
      |                ^~~
      |                rep
Language: C++

#include <bits/stdc++.h>
bool ACGT(a)
  if(a == 'A' || a == 'C' || a == 'G' || a == 'T'){
    return true;
  }
  else{
    return false;
  }
using namespace std;
int main(){
  int ans=0,count=0;
  string S;
  cin >> S;
  for(int i=1;i<S.size();i++){
    if(ACGT(S[i])&&ACGT(S[i-1])){
      count++;
    }
    else{
      ans = max(ans,count);
      count = 0;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc:2:11: error: 'a' was not declared in this scope
    2 | bool ACGT(a)
      |           ^
a.cc:6:3: error: expected unqualified-id before 'else'
    6 |   else{
      |   ^~~~
a.cc: In function 'int main()':
a.cc:15:12: error: 'ACGT' cannot be used as a function
   15 |     if(ACGT(S[i])&&ACGT(S[i-1])){
      |        ~~~~^~~~~~
a.cc:15:24: error: 'ACGT' cannot be used as a function
   15 |     if(ACGT(S[i])&&ACGT(S[i-1])){
      |                    ~~~~^~~~~~~~
Language: C++

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

string T="ACGT";
    string S;
    int A[10]={0,0,0,0,0,0,0,0,0,0}
    
    int now=0;
    int ans=0;
int main(){
  
    cin>>S;
    for(int i=0;i<S.size();i++){
        for(int k=0;k<T.size();k++){
            if(S[i]==T[k]) A[i]=1;
        }
    }
    for(int j=0;j<10;j++){
        if(A[j]==1){
            now++;
            if(now>ans) ans=now;
        }else{
            now=0;
            
        }
    }


    cout<<ans<<endl;

    



    return 0;
}

Compiler output:
a.cc:10:5: error: expected ',' or ';' before 'int'
   10 |     int now=0;
      |     ^~~
a.cc: In function 'int main()':
a.cc:22:13: error: 'now' was not declared in this scope; did you mean 'pow'?
   22 |             now++;
      |             ^~~
      |             pow
a.cc:25:13: error: 'now' was not declared in this scope; did you mean 'pow'?
   25 |             now=0;
      |             ^~~
      |             pow
Language: C++

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

string T="ACGT";

int main(){
    string S;
    int A[10]={0,0,0,0,0,0,0,0,0,0}
    
    int now=0;
    int ans=0;
    cin>>S;
    for(int i=0;i<S.size();i++){
        for(int k=0;k<T.size();k++){
            if(S[i]==T[k]) A[i]=1;
        }
    }
    for(int j=0;j<10;j++){
        if(A[j]==1){
            now++;
            if(now>ans) ans=now;
        }else{
            now=0;
            
        }
    }


    cout<<ans<<endl;

    



    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'int'
   12 |     int now=0;
      |     ^~~
a.cc:22:13: error: 'now' was not declared in this scope; did you mean 'pow'?
   22 |             now++;
      |             ^~~
      |             pow
a.cc:25:13: error: 'now' was not declared in this scope; did you mean 'pow'?
   25 |             now=0;
      |             ^~~
      |             pow
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
 
 
int main(){
    string S;
    int A[10]={0,0,0,0,0,0,0,0,0,0}
    string T="ACGT";
    int now=0;
    int ans=0;
    cin>>S;
    for(int i=0;i<S.size();i++){
        for(int k=0;k<T.size();k++){
            if(S[i]==T[k]) A[i]=1;
        }
    }
    for(int j=0;j<10;j++){
        if(A[j]==1){
            now++;
            if(now>ans) ans=now;
        }else{
            now=0;
            
        }
    }
 
 
    cout<<ans<<endl;
 
    
 
 
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'string'
    9 |     string T="ACGT";
      |     ^~~~~~
a.cc:14:23: error: 'T' was not declared in this scope
   14 |         for(int k=0;k<T.size();k++){
      |                       ^
Language: C++

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



int main(){
    string S;
    int A[10]=0;
    string T="ACGT";
    int now=0;
    int ans=0;
    cin>>S;
    for(int i=0;i<S.size();i++){
        for(int k=0;k<T.size();k++){
            if(S[i]==T[k]) A[i]=1;
        }
    }
    for(int j=0;j<10;j++){
        if(A[j]==1){
            now++;
            if(now>ans) ans=now;
        }else{
            now=0;
            
        }
    }


    cout<<ans<<endl;

    



    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: array must be initialized with a brace-enclosed initializer
    8 |     int A[10]=0;
      |               ^