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

import java.util.Scanner;
class Main{

    public static void main(String args[]){
        Main main = new Main();
        main.start();
    }

    public void start(){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String letters[] = str.split("");
        int max = 0;
        for(int i = 0; i < letters.length; i++){
            int num = countLength(letters,i);
            if(num > max) max = num;
        }
        System.out.println(max);
    }

    public int countLength(String[] letters,int index){
        int count = 0;
        for(int i = index; i < letters.length;i++){
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        }
    }
}

Compiler output:
Main.java:30: error: missing return statement
    }
    ^
1 error
Language: Java

import java.util.Scanner;
class Main{

    public static void main(String args[]){
        Main main = new Main();
        main.start();
    }

    public void start(){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String letters[] = str.split("");
        int max = 0;
        for(int i = 0; i < letters.length(); i++){
            int num = countLength(letters,i);
            if(num > max) max = num;
        }
        System.out.println(max);
    }

    public int countLength(String[] letters,int index){
        int count = 0;
        for(int i = index; i < letters.length;i++){
            if(letters[i].equals("A")||letters[i].equals("C")||letters[i].equals("T")||letters[i].equals("G")){
                count++;
            }else{
                return count;
            }
        }
    }
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;cin>>s;int max=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;
    if(c>max)c=max;
  }
  cout<<max<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:29: error: expected ';' before ')' token
    5 |   for(int i=0;i<s.size(),i++){
      |                             ^
      |                             ;
Language: C++

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

cin >> str;

int n=str.size();
int max=-1;
int ans=0;
char op;
for(int i=0;i<n;i++){
  op=str.at(i);
  if(op=="A"||op=="C"||op=="G"||op=="T"){
    ans++;
  for(int j=i;j<n;j++){
    op=str.at(j);
  if(op=="A"||op=="C"||op=="G"||op=="T"){
    ans++;
  }
     else{break;}
  }
}
  if(ans>max){max=ans;}
  ans=0;
}
cout <<max<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   if(op=="A"||op=="C"||op=="G"||op=="T"){
      |      ~~^~~~~
a.cc:14:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   if(op=="A"||op=="C"||op=="G"||op=="T"){
      |               ~~^~~~~
a.cc:14:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   if(op=="A"||op=="C"||op=="G"||op=="T"){
      |                        ~~^~~~~
a.cc:14:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   if(op=="A"||op=="C"||op=="G"||op=="T"){
      |                                 ~~^~~~~
a.cc:18:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |   if(op=="A"||op=="C"||op=="G"||op=="T"){
      |      ~~^~~~~
a.cc:18:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |   if(op=="A"||op=="C"||op=="G"||op=="T"){
      |               ~~^~~~~
a.cc:18:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |   if(op=="A"||op=="C"||op=="G"||op=="T"){
      |                        ~~^~~~~
a.cc:18:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |   if(op=="A"||op=="C"||op=="G"||op=="T"){
      |                                 ~~^~~~~
Language: C++

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

cin >> str;

int n=str.size();
int max=-1;
int ans=0;

for(int i=0;i<n;i++){
  if(str.at(i)=="A"||str.at(i)=="C"||str.at(i)=="G"||str.at(i)=="T"){
    ans++;
  for(int j=i;j<n;j++){
    
  if(str.at(i)=="A"||str.at(i)=="C"||str.at(i)=="G"||str.at(i)=="T"){
    ans++;
  }
     else{break;}
  }
}
  if(ans>max){max=ans;}
  ans=0;
}
cout <<max<<endl;
}


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

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

cin >> str;

int n=str.size();
int max=-1;
int ans=0;

for(int i=0;i<n;i++){
  if(str.at(i)==("A")||("C")||("G")||("T")){
    ans++;
  for(int j=i;j<n;j++){
    
  if(str.at(i)==("A")||("C")||("G")||("T")){
    ans++;
  }
     else{break;}
  }
}
  if(ans>max){max=ans;}
  ans=0;
}
cout <<max<<endl;
}


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

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

cin >> str;

int n=str.size();
int max=-1;
int ans=0;

for(int i=0;i<n;i++){
  if(str.at(i)=="A"||"C"||"G"||"T"){
    ans++;
  for(int j=i;j<n;j++){
    
  if(str.at(i)=="A"||"C"||"G"||"T"){
    ans++;
  }
     else{break;}
  }
}
  if(ans>max){max=ans;}
  ans=0;
}
cout <<max<<endl;
}

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

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

cin >> str;

int n=str.size();
int max=-1;
int ans=0;

for(int i=0;i<n;i++){
  if(str.at(i)=="A"||"C"||"G"||"T"){
    ans++;
  for(int j=i;j<n;j++){
    
  if(str.at(i)=="A"||"C"||"G"||"T"){
    ans++;
  }
     else{break;}
  }
}
  if(ans>max){max=ans;}
  ans=0;
}
cout <<max<<endl;


Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> str;
      | ^~~
a.cc:11:1: error: expected unqualified-id before 'for'
   11 | for(int i=0;i<n;i++){
      | ^~~
a.cc:11:13: error: 'i' does not name a type
   11 | for(int i=0;i<n;i++){
      |             ^
a.cc:11:17: error: 'i' does not name a type
   11 | for(int i=0;i<n;i++){
      |                 ^
a.cc:25:1: error: 'cout' does not name a type
   25 | cout <<max<<endl;
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
string str;
cin >>str;
int i,j;
int n=str.size();
int max=-1;
int ans=0;

for(i=0;i<n;i++){
  if(str.at(i)=="A"||"C"||"G"||"T"){
    ans++;
  for(j=i;j<n;j++){
    
  if(str.at(i)=="A"||"C"||"G"||"T"){
    ans++;
  }
     else{break;}
  }
}
  if(ans>max){max=ans;}
  ans=0;
}
cout <<max<<endl;
}

Compiler output:
a.cc:4:1: error: 'cin' does not name a type
    4 | cin >>str;
      | ^~~
a.cc:10:1: error: expected unqualified-id before 'for'
   10 | for(i=0;i<n;i++){
      | ^~~
a.cc:10:9: error: 'i' does not name a type
   10 | for(i=0;i<n;i++){
      |         ^
a.cc:10:13: error: 'i' does not name a type
   10 | for(i=0;i<n;i++){
      |             ^
a.cc:24:1: error: 'cout' does not name a type
   24 | cout <<max<<endl;
      | ^~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
string str;
cin >>str;
int i,j;
int n=str.size();
int max=-1;
int ans=0;

for(i=0;i<n;i++){
  if(str.at(i)=="A"||"C"||"G"||"T"){
    ans++;
  for(j=i;j<n;j++){
    
  if(str.at(i)=="A"||"C"||"G"||"T"){
    ans++;
  }
     else{break;}
  }
}
  if(ans>max){max=ans;}
  ans=0;
}
cout <<max<<endl;

Compiler output:
a.cc:4:1: error: 'cin' does not name a type
    4 | cin >>str;
      | ^~~
a.cc:10:1: error: expected unqualified-id before 'for'
   10 | for(i=0;i<n;i++){
      | ^~~
a.cc:10:9: error: 'i' does not name a type
   10 | for(i=0;i<n;i++){
      |         ^
a.cc:10:13: error: 'i' does not name a type
   10 | for(i=0;i<n;i++){
      |             ^
a.cc:24:1: error: 'cout' does not name a type
   24 | cout <<max<<endl;
      | ^~~~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    char s;
    int count =0,ans = 0;
    for(int i = 0;i<S.length();i++){
      	s=charAt(i);
      	if(s=='A'||s=='T'||s=='G'||s=='C'){
			count++;
        }else{
			ans = Math.max(count,ans);
          	count = 0;
        }
    }
    
    ans = Math.max(count,ans);
    System.out.println(ans);
  }

Compiler output:
Main.java:21: error: reached end of file while parsing
  }
   ^
1 error
Language: C++

#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <conio.h>
using namespace std;
int main() {
	const int MAX_N = 10;
	char s[MAX_N];
	int h=0;
	int max_h=0;
	std::cin >> s;
	for (int i = 0; i < 10; i++) {
		if (s[i] == 'A' || s[i] == 'G' || s[i] == 'C' || s[i] == 'T') {
			h++;
			max_h = max(max_h, h);
		}
		else {
			max_h = max(max_h, h);
		}
	}
	cout << max_h;
}

Compiler output:
a.cc:4:10: fatal error: conio.h: No such file or directory
    4 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

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

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

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

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   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 | #incldue<bits/stdc++.h>
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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 | #incldue<bits/stdc++.h>
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:13:16: error: 'max' was not declared in this scope
   13 |       maxlen = max(maxlen , len);
      |                ^~~
a.cc:17:12: error: 'max' was not declared in this scope
   17 |   maxlen = max(maxlen , len);
      |            ^~~
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout << maxlen ;
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   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 | #incldue<bits/stdc++.h>
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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 | #incldue<bits/stdc++.h>
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:13:16: error: 'max' was not declared in this scope
   13 |       maxlen = max(maxlen , len);
      |                ^~~
a.cc:17:12: error: 'max' was not declared in this scope
   17 |   maxlen = max(maxlen , len);
      |            ^~~
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout << maxlen ;
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:19: error: expected '}' at end of input
   18 |   cout << maxlen ;
      |                   ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.Scanner;

public class ATCoder {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String input = sc.next();
			char[] chars = input.toCharArray();
			int len = chars.length;
			int maxCount = 0;
			int count = 0;
			for (int i = 0; i < len; i++) {
				if (isATGC(chars[i])) {
					count++;
				} else {
					maxCount = count > maxCount ? count : maxCount;
					count = 0;
				}
			}

			System.out.println(maxCount);
		}
	}

	private static boolean isATGC(char c) {
		return (c == 'A' || c == 'C' || c == 'G' || c == 'T');
	}
}


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else{
      |   ^~~~
a.cc: At global scope:
a.cc:18:1: error: 'cout' does not name a type
   18 | cout << ans <<endl;
      | ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <iostream>
#include <set>
#include <string>

int main() {
using namaspace std;
  string str;
  cin >> str;
  size_t max_length = 0;
  size_t length = 0;
  const set<char> checker{'A', 'C', 'G', 'T'};
  for (size_t i = 0, size = str.size(); i < size; ++i) {
    if (checker.find(str[i]) != checker.end()) {
      ++length;
    } else {
      if (length > max_length) {
        max_length = length;
      }
      length = 0;
    }
  }
  cout << max_length;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected nested-name-specifier before 'namaspace'
    6 | using namaspace std;
      |       ^~~~~~~~~
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string str;
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> str;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:10: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   cin >> str;
      |          ^~~
      |          std
a.cc:11:9: error: 'set' does not name a type
   11 |   const set<char> checker{'A', 'C', 'G', 'T'};
      |         ^~~
a.cc:13:9: error: 'checker' was not declared in this scope
   13 |     if (checker.find(str[i]) != checker.end()) {
      |         ^~~~~~~
a.cc:22:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |   cout << max_length;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
#include <set>
#include <string>

using namaspace std;

int main() {
  string str;
  cin >> str;
  size_t max_length = 0;
  size_t length = 0;
  const set<char> checker{'A', 'C', 'G', 'T'};
  for (size_t i = 0, size = str.size(); i < size; ++i) {
    if (checker.find(str[i]) != checker.end()) {
      ++length;
    } else {
      if (length > max_length) {
        max_length = length;
      }
      length = 0;
    }
  }
  cout << max_length;

  return 0;
}

Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'namaspace'
    5 | using namaspace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string str;
      |   ^~~~~~
a.cc:8:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin >> str;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:10: error: 'str' was not declared in this scope; did you mean 'std'?
    9 |   cin >> str;
      |          ^~~
      |          std
a.cc:12:9: error: 'set' does not name a type
   12 |   const set<char> checker{'A', 'C', 'G', 'T'};
      |         ^~~
a.cc:14:9: error: 'checker' was not declared in this scope
   14 |     if (checker.find(str[i]) != checker.end()) {
      |         ^~~~~~~
a.cc:23:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |   cout << max_length;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

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

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

#include <bits/stdc++.h>
using namespace std;
char a[100];
int check(char ch)
{
 if (ch=='A'||ch=='C'||ch=='G'||ch=='T')
   return 1;
  else
   return 0; 
    
  
}
int main()
{
 int num=0,ans=0;
  cin>>a;
  int len=strlen(a);
  //if (check(a[0])==1) j=1;
  //else j=0;
  for(int i=0;i<len;i++)
  {
   if (check(a[i])==1) j++;
    else
    {
     ans=max(ans,j);
      j=0;
     
    }
    
    
  }
  
  
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: 'j' was not declared in this scope
   22 |    if (check(a[i])==1) j++;
      |                        ^
a.cc:25:18: error: 'j' was not declared in this scope
   25 |      ans=max(ans,j);
      |                  ^
Language: Java

public class Main {
	public static void main(String[] args) throws Exception {
        B();
    }
      public static void B() throws Exception {
        Scanner scanner = new Scanner( System.in );
        String S = scanner.next();
        boolean inACGT = false;
        int start = 0, len = 0;
        for (int i = 0; i < S.length(); i++) {
            char c = S.charAt( i );
            boolean isACGT = c == 'A' || c == 'C' || c == 'G' || c == 'T';
            if (inACGT) {
                if (!isACGT) {
                    inACGT = false;
                    len = Math.max( len, i - start);
                }
            } else {
                if (isACGT) {
                    inACGT = true;
                    start = i;
                }
            }
        }
        if (inACGT) len = Math.max( len, S.length() - start);
        System.out.println(len);
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
        Scanner scanner = new Scanner( System.in );
        ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
        Scanner scanner = new Scanner( System.in );
                              ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main(){
	string s;
	putline(cin,s);
	int l=s.length(),ans=0,i=0;
	int tmp=0;
	while(i<l){
		switch(s[i]){
			case 'A':
			case 'C':
			case 'G':
			case 'T':++tmp;break;
			default:ans=max(ans,tmp);tmp=0;
		}
	}
	cout<<max(ans,tmp)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'putline' was not declared in this scope; did you mean 'getline'?
    6 |         putline(cin,s);
      |         ^~~~~~~
      |         getline
Language: C++

#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
inline int in() { int x; scanf("%d",&x); return x;}
template<typename T>inline istream& operator>>(istream&i,v(T)&v)
{rep(j,sz(v))i>>v[j];return i;}
template<typename T>string join(const v(T)&v)
{stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename T>inline ostream& operator<<(ostream&o,const v(T)&v)
{if(sz(v))o<<join(v);return o;}
template<typename T1,typename T2>inline istream& operator>>(istream&i,pair<T1,T2>&v)
{return i>>v.fi>>v.se;}
template<typename T1,typename T2>inline ostream& operator<<(ostream&o,const pair<T1,T2>&v)
{return o<<v.fi<<","<<v.se;}
template<typename T>inline ll suma(const v(T)& a) { ll res(0); for (auto&& x : a) res += x; return res;}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
const int MX = 200005;
#define RET(ans) {cout<<ans<<endl;return 0;} 

    // 二次元ベクターの基本
    /*
    vector<vector<int>> dp; // 宣言
    dp.resize(n); // 1次元めの要素数決定
    dp[i].push_back(int); // プッシュバック
    rep(i,n){
        sort(dp[i].begin(),dp[i].end()); // 二次元めを昇順ソート
    }
    */

    // 整数スキャン（複数）
    /*
    int x,y,z;
    scanf("%d%d%d",&x,&y,&z);

    // n個の整数のスキャン
    /*
    ll a[n] = {};
    rep(i,n){
        scanf("%lld",&a[i]);
    }
    */

    // 文字列スキャン
    /*
    string s; cin >> s;
    */

    // n個の文字列スキャン
    /*
    vector<string> slist;
    rep(i,n){
        string s; cin >> s;
        slist.push_back(s);
    }
    */

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


    int ans = 0;
    int count = 0;

    rep(i,s.size()){
        if(s[i]=='A'||s[i]=='T'||s[i]=='G'||s[i]=='C'){
            count++;
        }else{
            count = 0;
        }
        ans = (max,count);
    }
    
    cout << ans << endl;
    return 0;
}
 
 


Compiler output:
a.cc: In function 'int main()':
a.cc:106:20: error: left operand of comma operator cannot resolve address of overloaded function
  106 |         ans = (max,count);
      |                    ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin>>S;
  int sum=0;
  int i=0;
  int a,b,c,d,e;
  while(i<S.size()){
    if(S.at(i)=='A'||S.at(i)=='T'||S.at(i)=='G'||S.at(i)=='C'){
      sum++;
      i++;
    }else{
      i++;
      a=sum;
      sum=0;
      break;
    }
  while(i<S.size()){
    if(S.at(i)=='A'||S.at(i)=='T'||S.at(i)=='G'||S.at(i)=='C'){
      sum++;
      i++;
    }else{
      i++;
      b=sum;
      sum=0;
      break;
   }while(i<S.size()){
    if(S.at(i)=='A'||S.at(i)=='T'||S.at(i)=='G'||S.at(i)=='C'){
      sum++;
      i++;
    }else{
      i++;
      c=sum;
      sum=0;
      break;
    }
  while(i<S.size()){
    if(S.at(i)=='A'||S.at(i)=='T'||S.at(i)=='G'||S.at(i)=='C'){
      sum++;
      i++;
    }else{
      i++;
      d=sum;
      sum=0;
      break;
    }
  while(i<S.size()){
    if(S.at(i)=='A'||S.at(i)=='T'||S.at(i)=='G'||S.at(i)=='C'){
      sum++;
      i++;
    }else{
      i++;
      e=sum;
      sum=0;
      break;
    }
   if(a>=b&&a>=c&&a>=d&&a>=e){
     cout<<a<<endl;
   }else if(b>=c&&b>=d&&b>=e){
     cout<<b<<endl;
   }else if(c>=d&&c>=e){
     cout<<c<<endl;
   }else if(d>=e){
     cout<<d<<endl;
   }else{
     cout<<e<<endl;
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:70:2: error: expected '}' at end of input
   70 | }
      |  ^
a.cc:39:20: note: to match this '{'
   39 |   while(i<S.size()){
      |                    ^
a.cc:70:2: error: expected '}' at end of input
   70 | }
      |  ^
a.cc:29:22: note: to match this '{'
   29 |    }while(i<S.size()){
      |                      ^
a.cc:70:2: error: expected '}' at end of input
   70 | }
      |  ^
a.cc:20:20: note: to match this '{'
   20 |   while(i<S.size()){
      |                    ^
a.cc:70:2: error: expected '}' at end of input
   70 | }
      |  ^
a.cc:10:20: note: to match this '{'
   10 |   while(i<S.size()){
      |                    ^
a.cc:70:2: error: expected '}' at end of input
   70 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.*;

public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		s.replaceAll("A", "-");
		s.replaceAll("C", "-");
		s.replaceAll("T", "-");
		s.replaceAll("G", "-");
		if (s.contains("----------")){
			System.out.println(10);
		}else if (s.contains("---------"){
			System.out.println(9);
		}else if (s.contains("--------"){
			System.out.println(8);
		}else if (s.contains("-------"){
			System.out.println(7);
		}else if (s.contains("------"){
			System.out.println(6);
		}else if (s.contains("-----"){
			System.out.println(5);
		}else if (s.contains("----"){
			System.out.println(4);
		}else if (s.contains("---"){
			System.out.println(3);
		}else if (s.contains("--"){
			System.out.println(2);
		}else if (s.contains("-"){
			System.out.println(1);
		}else{
			System.out.println(0);
		}
	}
}

Compiler output:
Main.java:13: error: ')' expected
		}else if (s.contains("---------"){
		                                 ^
Main.java:15: error: ')' expected
		}else if (s.contains("--------"){
		                                ^
Main.java:17: error: ')' expected
		}else if (s.contains("-------"){
		                               ^
Main.java:19: error: ')' expected
		}else if (s.contains("------"){
		                              ^
Main.java:21: error: ')' expected
		}else if (s.contains("-----"){
		                             ^
Main.java:23: error: ')' expected
		}else if (s.contains("----"){
		                            ^
Main.java:25: error: ')' expected
		}else if (s.contains("---"){
		                           ^
Main.java:27: error: ')' expected
		}else if (s.contains("--"){
		                          ^
Main.java:29: error: ')' expected
		}else if (s.contains("-"){
		                         ^
9 errors
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String X  = sc.next();
    String[] words = s.split("[^ATCG]+");
    int max = 0;
    for(String word : words){
      if(word.length() > max){
        max = word.length();
      }
    }
    System.out.print(max);
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
    String[] words = s.split("[^ATCG]+");
                     ^
  symbol:   variable s
  location: class Main
1 error
Language: C++

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

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

  int ans = 0;
  int now = 0;

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

  count << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   20 |   count << ans << endl;
      |   ~~~~~~^~~~~~
Language: C++

#include "bits/std.c++.h"
using namespace std;
int main()
{
  string s;
  cin>>s;
  int ans = 0;
  for(int i = 0 ; s[i] ; ++i)
  {
    int cnt = 0;
    if(s[i] == 'A' || s[i] == 'G' || s[i] == 'T' || s[i] == 'C')
      ++cnt;
    else
      ans = max(ans , cnt);
  }
  printf("%d" , ans);
}

Compiler output:
a.cc:1:10: fatal error: bits/std.c++.h: No such file or directory
    1 | #include "bits/std.c++.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
int main(void){
  int len=0;
  int lenmax=0;
  char str[11],c;
  scanf("%s",str);
  while(c=*str++){
    if(c=='A'||c=='T'||c=='C'||c=='G')len++;
    else{
      if(lenmax < len)lenmax = len;
      len=0;
    }
  }
  printf("%d",lenmax);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: lvalue required as increment operand
    7 |   while(c=*str++){
      |            ^~~
Language: C++

#include <stdio.h>
int main(void){
  int len=0;
  int lenmax=0;
  char str[11];
  scanf("%s",&str);
  while(c=*str++){
    if(c=='A'||c=='T'||c=='C'||c=='G')len++;
    else{
      if(lenmax < len)lenmax = len;
      len=0;
    }
  }
  printf("%d",lenmax);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'c' was not declared in this scope
    7 |   while(c=*str++){
      |         ^
a.cc:7:12: error: lvalue required as increment operand
    7 |   while(c=*str++){
      |            ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define sc scanf
#define pr printf

int main(){
    int maxi = 0;
    int atual = 0;
    char ch;
    while(ch = getchar(), ch != '\n') {
        if (ch == 'A' || ch == 'T' || ch == 'G' || ch == 'C') atual++;
        else {
            max = max(maxi, atual);
            atual = 0;
        }
    }
 	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: overloaded function with no contextual type information
   13 |             max = max(maxi, atual);
      |                                  ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  string s;cin>>s;
  int a=0,b=0;
  for(char p:s){
    if(p=='A'||p=='C'||p=='T'||p=='G'){a++;b=nax(a,b);}
    else a=0;
  }
  cout<<b<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:46: error: 'nax' was not declared in this scope
    7 |     if(p=='A'||p=='C'||p=='T'||p=='G'){a++;b=nax(a,b);}
      |                                              ^~~
Language: C++

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

int main(){
  std::string s;
  std::cin >> s;
  int length[20]=0;
  int i=0;
  for(auto& e : s){
    if(e=='A'||e=='T'||e=='G'||e=='C')
      length[i]++;
    else
      i++;
  }
  int max=0;
  for(int j=0;j<i;j++){
    max = std::max(length[j],max);
  }
  std::cout<<max<<std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: array must be initialized with a brace-enclosed initializer
    8 |   int length[20]=0;
      |                  ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:63: error: 's1' undeclared (first use in this function); did you mean 'a1'?
    8 |                 if(s[c]=='A'||s[c]=='T'||s[c]=='G'||s[c]=='C')s1++;
      |                                                               ^~
      |                                                               a1
main.c:8:63: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:25: error: 's2' undeclared (first use in this function); did you mean 'a2'?
    9 |                 else if(s2<s1) a2=s1,s1=0;
      |                         ^~
      |                         a2
Language: C++

#include <iostream>
#include <cstring>

using namespace std;

int i=0;

class string_S
{
public:
	string_S();
	void check();
private:
	char S[20];
	int countC = 0;
	int count = 0;
};

string_S::string_S()
{
	char temp[20];
	cin >> temp;
	strcpy_s(S, 20,temp);
}

void string_S::check()
{
	for (i = 0; i < 10; i++) {
		if (S[i] == 'A' || S[i] == 'T' || S[i] == 'G' || S[i] == 'C') {
			countC++;
		}
		else
		{
			if (count < countC)count = countC;
			countC = 0;
		}
	}
	cout << count<<"\n";
}

int main() {

	string_S ob;
	ob.check();
	system("pause");
	return 0;
}

Compiler output:
a.cc: In constructor 'string_S::string_S()':
a.cc:23:9: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   23 |         strcpy_s(S, 20,temp);
      |         ^~~~~~~~
      |         strcpy
Language: C

#include <iostream>
using namespace std;
int main(void){
    char x;
    cin >> x;
    if(x=='T'){
        cout << "A" << endl;
    }else if(x=='A'){
        cout << "T" << endl;
    }else if(x=='C'){
        cout << "G" << endl;
    }else{
        cout << "C" << endl;
    }
}

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

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

static int max( int a, int b );
static int issATCG( int ca );
static int cntATCGstr( char *str );

void main()
{
    char str[10+1];
    int  len;
    int  strlen_max;
    scanf( "%s", str );
    len = strlen( str );
    strlen_max = 0;
    for( int i = 0; i < len; i++ ){
        if( !issATCG( str[ i ] ) ) continue;
        strlen_max = max( strlen_max, cntATCGstr( &str[ i ] ) );
    }
    printf("%d\n", strlen_max );
    exit(0);
}
static int max( int a, int b )
{
    return (a >= b)?a:b;
}
static int issATCG( int ch )
{
    if( ca == 'A' || ca == 'T'|| ca == 'C' || ca == 'G' ){
        return 1;
    }
    return 0;
}
static int cntATCGstr( char *str )
{
    int i;
    for( i = 0; issATCGATCG( str[ i ] ); i++ );
    return i;
}


Compiler output:
main.c: In function 'issATCG':
main.c:30:9: error: 'ca' undeclared (first use in this function); did you mean 'ch'?
   30 |     if( ca == 'A' || ca == 'T'|| ca == 'C' || ca == 'G' ){
      |         ^~
      |         ch
main.c:30:9: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'cntATCGstr':
main.c:38:17: error: implicit declaration of function 'issATCGATCG'; did you mean 'issATCG'? [-Wimplicit-function-declaration]
   38 |     for( i = 0; issATCGATCG( str[ i ] ); i++ );
      |                 ^~~~~~~~~~~
      |                 issATCG
Language: C++

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

string check = "AGCT";
int main() {
  string str; cin >> str;
  int res = 0;
  for (int i = 0; i < str.size(); ++i) {
    for (int j = i + 1; j <= str.size(); ++j) {
      bool ok = true;
      for (int k = i; k < j; ++k) {
        bool ok2 = false;
        for (auto c : check) if (str[k] == c) ok2 = true;
        if (!ok2) ok = false;
      }
      if (ok) res = max(res, j - i);
    }
  }
  cout << res << endl;

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

#include <iostream>
#include <string>

using namespace std;
int main(){
  string S;cin >> S;
  int n[10],current=0,ans=0,streak=0;for(int i=0;i<S.length();i++)n[i]=0;
  for(int i=0;i<S.length();i++){
    if (S[i] == 'A' && S[i] == 'C' && S[i] == 'G' && S[i] == 'T')n[i]++
  }
  for(int i=0;i<S.length();i++){
    streak=0;
    cureent = i;
    if (n[i] == 1){
      while(current>10 or n[current+1]==0){
        streak ++;
        current ++;
      }
      if(ans < streak)ans =streak;
    }
  }
  cout << ans <<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:72: error: expected ';' before '}' token
    9 |     if (S[i] == 'A' && S[i] == 'C' && S[i] == 'G' && S[i] == 'T')n[i]++
      |                                                                        ^
      |                                                                        ;
   10 |   }
      |   ~                                                                     
a.cc:13:5: error: 'cureent' was not declared in this scope; did you mean 'current'?
   13 |     cureent = i;
      |     ^~~~~~~
      |     current
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	String word = scan.next();
      	int subWordLength = 0;
      	int longestWordLength = 0;
      	for(int i=0; i < word.length(); i++){
        	String x = word.substring(i,i+1);
          	if(x.equarls("A")||x.equarls("C")||x.equarls("G")||x.equarls("T")){
            	subWordLength++;
            } else {
            	if(longestWordLength < subWordLength){
                	longestWordLength = subWordLength;
                }
              	subWordLength = 0;
            }
        }
      	System.out.println(longestWordLength);
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
          	if(x.equarls("A")||x.equarls("C")||x.equarls("G")||x.equarls("T")){
          	    ^
  symbol:   method equarls(String)
  location: variable x of type String
Main.java:11: error: cannot find symbol
          	if(x.equarls("A")||x.equarls("C")||x.equarls("G")||x.equarls("T")){
          	                    ^
  symbol:   method equarls(String)
  location: variable x of type String
Main.java:11: error: cannot find symbol
          	if(x.equarls("A")||x.equarls("C")||x.equarls("G")||x.equarls("T")){
          	                                    ^
  symbol:   method equarls(String)
  location: variable x of type String
Main.java:11: error: cannot find symbol
          	if(x.equarls("A")||x.equarls("C")||x.equarls("G")||x.equarls("T")){
          	                                                    ^
  symbol:   method equarls(String)
  location: variable x of type String
4 errors
Language: C++

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

int main(){
  string str;
  cin >> str;
    
  int lc = 0;
  int max_lc = 0;
  for(int i = 0 ; i < int(str.size()) ;++i){
    if( str[i]=='A' || str[i] =='C' || str[i] =='G' || str[i]=='T'){
      lc++;
    }
    else{
      if (lc > max_lc){
        max_lc=lc;
    }
      lc = 0;
  }
  if (lc > max_lc){
 	max_lc=lc;
  }
 cout << max_lc;  
}

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

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

int main(){
  string str;
  cin >> str;
    
  int lc = 0;
  int max_lc = 0;
  for(int i = 0 ; i < int(str.size()) ;++i){
    if( str[i]=='A' || str[i] =='C' || str[i] =='G' || str[i]=='T'){
      lc++
    }
    else{
      if (lc > max_lc){
        max_lc=lc;
    }
      lc = 0;
  }
  if (lc > max_lc){
 	max_lc=lc;
  }
 cout << max_lc;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: expected ';' before '}' token
   13 |       lc++
      |           ^
      |           ;
   14 |     }
      |     ~      
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
  string str;
  cin >> str;
    
  int lc = 0;
  int max_lc = 0;
  for(int i = 0 ; i < int(str.size()) ;++i){
    if( str[i]=='A' || str[i] =='C' || str[i] =='G' || str[i]=='T'){
      lc++
    }
    else{
      if (lc > max_lc){
        max_lc=lc;
      }
      lc = 0;
    }
  }
  if (lc > max_lc){
 	max_lc=lc;
  }
 cout << max_lc;  
}

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

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

int main(){
  string str;
  cin >> str;
    
  int lc = 0;
  int max_lc = 0;
  for(int i = 0 ; i < int(str.size()) ;++i){
    if( str[i]=="A" || str[i] =="C" || str[i] =="G" || str[i]=="T"){
      lc++
    }
    else{
      if (lc > max_lc){
        max_lc=lc;
      }
      lc = 0;
    }
  }
  if (lc > max_lc){
 	max_lc=lc;
  }
 cout << max_lc;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if( str[i]=="A" || str[i] =="C" || str[i] =="G" || str[i]=="T"){
a.cc:12:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if( str[i]=="A" || str[i] =="C" || str[i] =="G" || str[i]=="T"){
a.cc:12:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if( str[i]=="A" || str[i] =="C" || str[i] =="G" || str[i]=="T"){
a.cc:12:62: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if( str[i]=="A" || str[i] =="C" || str[i] =="G" || str[i]=="T"){
a.cc:13:11: error: expected ';' before '}' token
   13 |       lc++
      |           ^
      |           ;
   14 |     }
      |     ~
Language: C++

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

int main(){
  string str;
  cin >> str;
    
  int lc = 0;
  int max_lc = 0;
  for(int i = 0 ; i < int(s.size()) ;++i){
    char s = str[i]; 
    if( x=="A" || x =="C" || x =="G" || x=="T"){
      lc++
    }
    else{
      if (lc > max_lc){
        max_lc=lc;
      }
      lc = 0;
    }
  }
  if (lc > max_lc){
 	max_lc=lc;
  }
 cout << max_lc;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: 's' was not declared in this scope
   11 |   for(int i = 0 ; i < int(s.size()) ;++i){
      |                           ^
a.cc:13:9: error: 'x' was not declared in this scope
   13 |     if( x=="A" || x =="C" || x =="G" || x=="T"){
      |         ^
a.cc:14:11: error: expected ';' before '}' token
   14 |       lc++
      |           ^
      |           ;
   15 |     }
      |     ~
Language: C++

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

int main(){
  cin >> string str;
    
  int lc = 0;
  int max_lc = 0;
  for(int i = 0 ; i < int(s.size()) ;++i){
    char s = str[i]; 
    if( x=="A" || x =="C" || x =="G" || x=="T"){
      lc++
    }
    else{
      if (lc > max_lc){
        max_lc=lc;
      }
      lc = 0;
    }
  }
  if (lc > max_lc){
 	max_lc=lc;
  }
 cout << max_lc;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected primary-expression before 'str'
    6 |   cin >> string str;
      |                 ^~~
a.cc:10:27: error: 's' was not declared in this scope
   10 |   for(int i = 0 ; i < int(s.size()) ;++i){
      |                           ^
a.cc:11:14: error: 'str' was not declared in this scope; did you mean 'std'?
   11 |     char s = str[i];
      |              ^~~
      |              std
a.cc:12:9: error: 'x' was not declared in this scope
   12 |     if( x=="A" || x =="C" || x =="G" || x=="T"){
      |         ^
a.cc:13:11: error: expected ';' before '}' token
   13 |       lc++
      |           ^
      |           ;
   14 |     }
      |     ~