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

#include <iostream>
using namespace std;

int main() {
  
  char b, c[128];
  c['A'] = 'G'
  c['G'] = 'A'  
  c['C'] = 'T'  
  c['T'] = 'C'
    cin >> b;
    cout << c[(int)b] <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'c'
    7 |   c['A'] = 'G'
      |               ^
      |               ;
    8 |   c['G'] = 'A'
      |   ~
Language: C++

#include <iostream>
using namespace std;

int main() {
  
  char b, c[128];
  c['A'] = 'G'
  c['G'] = 'A'  
  c['C'] = 'T'  
  c['T'] = 'C'
    cin >> b
    cout << c[(int)b] <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'c'
    7 |   c['A'] = 'G'
      |               ^
      |               ;
    8 |   c['G'] = 'A'
      |   ~
Language: C++

#include <iostream>
using namespace std;

int main() {
  
  char b,c[128];
  
  c['A'] = 'G'
  c['G'] = 'A'  
  c['C'] = 'T'  
  c['T'] = 'C'
    cin >> b
    cout << c[(int)b] <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before 'c'
    8 |   c['A'] = 'G'
      |               ^
      |               ;
    9 |   c['G'] = 'A'
      |   ~
Language: C++

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

int main() {
  
  char b,c[128];
  
  c['A'] = 'G'
  c['G'] = 'A'  
  c['C'] = 'T'  
  c['T'] = 'C'
    cin >> b
    cout << c[(int)b] <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before 'c'
    8 |   c['A'] = 'G'
      |               ^
      |               ;
    9 |   c['G'] = 'A'
      |   ~
Language: Java

import java.util.*;
public class atcoder {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		if(s.equals("A")) {
			System.out.println("T");
		}else if(s.equals("T")) {
			System.out.println("A");
		}else if(s.equals("C")) {
			System.out.println("G");
		}else if(s.equals("G")) {
			System.out.println("C");
		}
	}

}


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

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

int main() {
  
  int res;
  
  cout << "b" << endl;
  
  cin >> res;
  
  if (res == A){
    cout << "T" << endl;
    }
    
  else if(res == G){
    cout << "C" << endl;
    }
  
  return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'A' was not declared in this scope
   12 |   if (res == A){
      |              ^
a.cc:16:18: error: 'G' was not declared in this scope
   16 |   else if(res == G){
      |                  ^
Language: C++

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

int main() {
  
  int res;
  
  cout << "ｂ" << endl;
  
  cin >> res;
  
  if (res == A){
    cout << "T" << endl;
    }
    
  else if(res == G){
    cout << "C" << endl;
    }
  
  return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'A' was not declared in this scope
   12 |   if (res == A){
      |              ^
a.cc:16:18: error: 'G' was not declared in this scope
   16 |   else if(res == G){
      |                  ^
Language: C++

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

int main() {
  
  int res;
  
  cout << "ｂ" << endl;
  
  cin >> res;
  
  if (res == A){
    cout << "T" << endl;
    
  else if(res == G){
    cout << "C" << endl;
  
  return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'A' was not declared in this scope
   12 |   if (res == A){
      |              ^
a.cc:15:3: error: expected '}' before 'else'
   15 |   else if(res == G){
      |   ^~~~
a.cc:12:16: note: to match this '{'
   12 |   if (res == A){
      |                ^
a.cc:15:18: error: 'G' was not declared in this scope
   15 |   else if(res == G){
      |                  ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  
  int res;
  
  cout << "ｂ" << endl;
  
  cin >> res;
  
  switch(res){
  if (res == A){
    cout << "T" << endl;
    break;
    
  else if(res == G){
    cout << "C" << endl;
    break;
    }
  
  return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'A' was not declared in this scope
   13 |   if (res == A){
      |              ^
a.cc:17:3: error: expected '}' before 'else'
   17 |   else if(res == G){
      |   ^~~~
a.cc:13:16: note: to match this '{'
   13 |   if (res == A){
      |                ^
a.cc:17:18: error: 'G' was not declared in this scope
   17 |   else if(res == G){
      |                  ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
a.cc:22:10: warning: statement will never be executed [-Wswitch-unreachable]
   22 |   return 0;
      |          ^
Language: C++

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

int main() {
  
  int res;
  
  cout << "b" << endl;
  
  cin >> res;
  
  if (res == A){
    cout << "T" << endl;
    }
    
  else if(res == C){
    cout << "G" << endl;
    }
  
  return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'A' was not declared in this scope
   12 |   if (res == A){
      |              ^
a.cc:16:18: error: 'C' was not declared in this scope
   16 |   else if(res == C){
      |                  ^
Language: C++

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

int main() {
  
  int res;
  
  cout << "b" << endl;
  
  cin >> res;
  
  if (res ==A){
    cout << "T" << endl;
    }
    
  else if(res ==C){
    cout << "G" << endl;
    }
  
  return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'A' was not declared in this scope
   12 |   if (res ==A){
      |             ^
a.cc:16:17: error: 'C' was not declared in this scope
   16 |   else if(res ==C){
      |                 ^
Language: C++

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

int main() {
  
  int res;
  
  cout << "b" << endl;
  
  cin >> res;
  
  if (res ==A){
    cout << "T"  endl;
    }
    
  else if(res ==C){
    cout << "G" endl;
    }
  
  return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'A' was not declared in this scope
   12 |   if (res ==A){
      |             ^
a.cc:13:16: error: expected ';' before 'endl'
   13 |     cout << "T"  endl;
      |                ^ ~~~~
      |                ;
a.cc:16:17: error: 'C' was not declared in this scope
   16 |   else if(res ==C){
      |                 ^
a.cc:17:16: error: expected ';' before 'endl'
   17 |     cout << "G" endl;
      |                ^~~~~
      |                ;
Language: C++

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

int main() {
  
  int res;
  
  cout << "b" << endl;
  
  cin >> res;
  
  if (res ==A){
    cout << "T"  enfl;
    }
    
  else if(res ==C){
    cout << "G" endl;
    }
  
  return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'A' was not declared in this scope
   12 |   if (res ==A){
      |             ^
a.cc:13:16: error: expected ';' before 'enfl'
   13 |     cout << "T"  enfl;
      |                ^ ~~~~
      |                ;
a.cc:16:17: error: 'C' was not declared in this scope
   16 |   else if(res ==C){
      |                 ^
a.cc:17:16: error: expected ';' before 'endl'
   17 |     cout << "G" endl;
      |                ^~~~~
      |                ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  char c;
  cin>>c;
  if(c=='A')
    cout<<"T\n";
  else if(c=='T')
    cout<<"A\n");
  else if(c=='G')
    cout<<"C\n";
  else
    cout<<"G\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before ')' token
   11 |     cout<<"A\n");
      |                ^
      |                ;
Language: C++

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

int main() {
  
  int res;
  
  cout << "b" << endl;
  
  cin >> res;
  
  if (res ==A){
    cout << "T" << enfl;
    }
    
  else if(res ==C){
    cout << "G" <<endl;
    }
  
  return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'A' was not declared in this scope
   12 |   if (res ==A){
      |             ^
a.cc:13:20: error: 'enfl' was not declared in this scope; did you mean 'erfl'?
   13 |     cout << "T" << enfl;
      |                    ^~~~
      |                    erfl
a.cc:16:17: error: 'C' was not declared in this scope
   16 |   else if(res ==C){
      |                 ^
Language: C++

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

int main()
{
  char c;
  cin>>c;
  if(c=='A')
    cout<<"T\n";
  else if(c=='T')
    cout<<"A\n");
  else if(c=='G')
    cout<<"C\n";
  else
    cout<<"G\n";
  return 0;
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespacee'
    2 | using namespacee std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>c;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<"T\n";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout<<"A\n");
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout<<"C\n";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |     cout<<"G\n";
      |     ^~~~
      |     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 <bits/stdc++.h>
using namespace std;

int main() {
  
  int res;
  
  cout << "b" << endl;
  
  cin >> res;
  
  if (res ==A){
    cout << "T" << enfl;
    
  else if(res ==C){
    cout << "G" <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'A' was not declared in this scope
   12 |   if (res ==A){
      |             ^
a.cc:13:20: error: 'enfl' was not declared in this scope; did you mean 'erfl'?
   13 |     cout << "T" << enfl;
      |                    ^~~~
      |                    erfl
a.cc:15:3: error: expected '}' before 'else'
   15 |   else if(res ==C){
      |   ^~~~
a.cc:12:15: note: to match this '{'
   12 |   if (res ==A){
      |               ^
a.cc:15:17: error: 'C' was not declared in this scope
   15 |   else if(res ==C){
      |                 ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

#include <stdio.h>

int main(void){
  char b ='';
  scanf("%c",&b);
  switch(b){
    case 'A':printf("T");break;
    case 'T':printf("A");break;
    case 'C':printf("G");break;
    default:printf("C"); 
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:11: error: empty character constant
    4 |   char b ='';
      |           ^~
Language: C

#include <stdio.h>
int main() {
	char b;
		scanf("%s", &b);
	if (b == A) {
		printf("T\n");
	}
	if (b == T) {
		printf("A\n");
	}
	if (b == C) {
		printf("G\n");
	}
	if (b == G) {
		printf("C\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:18: error: 'A' undeclared (first use in this function)
    5 |         if (b == A) {
      |                  ^
main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:18: error: 'T' undeclared (first use in this function)
    8 |         if (b == T) {
      |                  ^
main.c:11:18: error: 'C' undeclared (first use in this function)
   11 |         if (b == C) {
      |                  ^
main.c:14:18: error: 'G' undeclared (first use in this function)
   14 |         if (b == G) {
      |                  ^
Language: C

#include <stdio.h>
int main() {
	char b;
		sacnf("%s", &b);
	if (b == A) {
		printf("T\n");
	}
	if (b == T) {
		printf("A\n");
	}
	if (b == C) {
		printf("G\n");
	}
	if (b == G) {
		printf("C\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:17: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |                 sacnf("%s", &b);
      |                 ^~~~~
      |                 scanf
main.c:5:18: error: 'A' undeclared (first use in this function)
    5 |         if (b == A) {
      |                  ^
main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:18: error: 'T' undeclared (first use in this function)
    8 |         if (b == T) {
      |                  ^
main.c:11:18: error: 'C' undeclared (first use in this function)
   11 |         if (b == C) {
      |                  ^
main.c:14:18: error: 'G' undeclared (first use in this function)
   14 |         if (b == G) {
      |                  ^
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
int main() {
  string s;cin >> s;
  if（s == "A"）cout << "T" << endl;
  else if(s == "T") cout << "A" << endl;
  else if(s == "C")cout << "G" << endl;
  else cout << "C" << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'if\U0000ff08s' was not declared in this scope
    7 |   if（s == "A"）cout << "T" << endl;
      |   ^~~~~
a.cc:7:12: error: unable to find string literal operator 'operator""\U0000ff09cout' with 'const char [2]', 'long unsigned int' arguments
    7 |   if（s == "A"）cout << "T" << endl;
      |            ^~~~~~~~~
a.cc:8:3: error: 'else' without a previous 'if'
    8 |   else if(s == "T") cout << "A" << endl;
      |   ^~~~
Language: C

#include <stdio.h>
int main(){
  int N, Q, i, j ,l ,r;
  scanf("%d %d", &N, &Q);
  int acnum[N];
  char S[N];
  scanf("%s",S);
  acnum[0]=0;
  for(i=1; i<N; i++){
    if(S[i] == 'C' && S[i-1] == 'A') {
        acnum[i]=acnum[i-1]+1;
    }else{
        acnum[i]=acnum[i-1];
    }
  }
  for(i=0; i<Q; i++){
    scanf("%d %d", &l, &r);
    printf("%d\n", acnum[r-1] - acnum[l-1]);
  }

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

#include <iostream>
using namespace std;

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

  String ans;
  if (S[0] == 'A') ans = 'T'; 
  else if (S[0] == 'T') ans = 'A'; 
  else if (S[0] == 'G') ans = 'G'; 
  else if (S[0] == 'C') ans = 'C'; 
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'String' was not declared in this scope
    5 |   String S;
      |   ^~~~~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
a.cc:8:9: error: expected ';' before 'ans'
    8 |   String ans;
      |         ^~~~
      |         ;
a.cc:9:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if (S[0] == 'A') ans = 'T';
      |                    ^~~
      |                    abs
a.cc:10:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   else if (S[0] == 'T') ans = 'A';
      |                         ^~~
      |                         abs
a.cc:11:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   else if (S[0] == 'G') ans = 'G';
      |                         ^~~
      |                         abs
a.cc:12:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |   else if (S[0] == 'C') ans = 'C';
      |                         ^~~
      |                         abs
a.cc:13:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C

#include <stdio.h>
int main()
{
  char n;
  scanf("%s", &n);
  if(n=='A'){
	printf("T\n");
  	}else if(n=='T'){
      printf("A\n");
    }else if(n=='C'){
      printf("G\n");
    }else{
      pritnf("C\n");
    }
    return 0;
  }


Compiler output:
main.c: In function 'main':
main.c:13:7: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 |       pritnf("C\n");
      |       ^~~~~~
      |       printf
Language: C

#include <stdio.h>
int main()
{
  char n;
  scanf("%s", &n);
  if(n=='A'){
	printf("T\n");
    else if(n=='T'){
      printf("A\n");
    }else if(n=='C'){
      printf("G\n");
    }else{
      pritnf("C\n");
    }
    return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:8:5: error: expected '}' before 'else'
    8 |     else if(n=='T'){
      |     ^~~~
main.c:13:7: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 |       pritnf("C\n");
      |       ^~~~~~
      |       printf
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
char b; cin>>b;
  if(b=='A') cout<<"T\n";
  else if(b=='T) cout<<"A\n";
  else if(b=='G') cout<<"C\n";
  else if(b=='C') cout<<"G\n";
 return 0;
          }

Compiler output:
a.cc:6:14: warning: missing terminating ' character
    6 |   else if(b=='T) cout<<"A\n";
      |              ^
a.cc:6:14: error: missing terminating ' character
    6 |   else if(b=='T) cout<<"A\n";
      |              ^~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: expected primary-expression before 'else'
    7 |   else if(b=='G') cout<<"C\n";
      |   ^~~~
a.cc:8:3: error: expected primary-expression before 'else'
    8 |   else if(b=='C') cout<<"G\n";
      |   ^~~~
a.cc:7:31: error: expected ')' before 'else'
    7 |   else if(b=='G') cout<<"C\n";
      |                               ^
      |                               )
    8 |   else if(b=='C') cout<<"G\n";
      |   ~~~~                         
a.cc:6:10: note: to match this '('
    6 |   else if(b=='T) cout<<"A\n";
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int n,q,l,r;
string s,ls,tmp;
  cin >> n >> q >> s;
  
for (int i=0;i<n-1;i++){
  tmp=s.substr(i,i+2);
  if (tmp=="AC")ls+="#";else ls+=".";
}
for (int que=0;que<q;que++){
  cin >> l >> r;
  tmp=ls.substr(l-1,r-1);
  tmp=tmp.replace(tmp.begin(),tmp.end(),".","")
  cout<<tmp.size()<<endl;
}}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:48: error: expected ';' before 'cout'
   15 |   tmp=tmp.replace(tmp.begin(),tmp.end(),".","")
      |                                                ^
      |                                                ;
   16 |   cout<<tmp.size()<<endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int n,q,l,r;
string s,ls,tmp;
  cin >> n >> q >> s;
  
for (int i=0;i<n-1;i++){
  tmp=s.substr(i,i+2);
  if (tmp=="AC")ls+="#";else ls+=".";
}
for (int que=0;que<q;que++){
  cin >> l >> r;
  tmp=ls.substr(l-1,r-1);
  cout<<replace(tmp.begin(),tmp.end(),".","").size()<<endl;
}}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: no matching function for call to 'replace(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, const char [2], const char [1])'
   15 |   cout<<replace(tmp.begin(),tmp.end(),".","").size()<<endl;
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4280:5: note: candidate: 'template<class _FIter, class _Tp> void std::replace(_FIter, _FIter, const _Tp&, const _Tp&)'
 4280 |     replace(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4280:5: note:   template argument deduction/substitution failed:
a.cc:15:16: note:   deduced conflicting types for parameter 'const _Tp' ('char [2]' and 'char [1]')
   15 |   cout<<replace(tmp.begin(),tmp.end(),".","").size()<<endl;
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:174:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::replace(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&, const _Tp&)'
  174 | replace(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value,
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:174:1: note:   candidate expects 5 arguments, 4 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int n,q,l,r;
string s,ls,tmp;
  cin >> n >> q >> s;
  
for (int i=0;i<n-1;i++){
  tmp=s.substr(i,i+2);
  if (tmp=="AC")ls+="#";else ls+=".";
}
for (int que=0;que<q;que++){
  cin >> l >> r;
  tmp=ls.substr(l-1,r-1);
  cout<<replace(tmp.begin(),tmp.end(),".","").length()<<endl;
}}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: no matching function for call to 'replace(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, const char [2], const char [1])'
   15 |   cout<<replace(tmp.begin(),tmp.end(),".","").length()<<endl;
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4280:5: note: candidate: 'template<class _FIter, class _Tp> void std::replace(_FIter, _FIter, const _Tp&, const _Tp&)'
 4280 |     replace(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4280:5: note:   template argument deduction/substitution failed:
a.cc:15:16: note:   deduced conflicting types for parameter 'const _Tp' ('char [2]' and 'char [1]')
   15 |   cout<<replace(tmp.begin(),tmp.end(),".","").length()<<endl;
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:174:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::replace(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&, const _Tp&)'
  174 | replace(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value,
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:174:1: note:   candidate expects 5 arguments, 4 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int n,q,l,r;
string s,ls,tmp;
  cin >> n >> q >> s;
  
for (int i=0;i<n-1;i++){
  tmp=s.substr(i,i+2)
  if (tmp=="AC")ls+="#";else ls+=".";
}
for (int que=0;que<q;que++)
  cin >> l >> r;
  tmp=ls.substr(l-1:r-1)
  print(replace(tmp.begin(),tmp.end(),".","").length())
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected ';' before 'if'
    9 |   tmp=s.substr(i,i+2)
      |                      ^
      |                      ;
   10 |   if (tmp=="AC")ls+="#";else ls+=".";
      |   ~~                  
a.cc:10:25: error: 'else' without a previous 'if'
   10 |   if (tmp=="AC")ls+="#";else ls+=".";
      |                         ^~~~
a.cc:14:20: error: expected ')' before ':' token
   14 |   tmp=ls.substr(l-1:r-1)
      |                ~   ^
      |                    )
a.cc:14:25: error: expected ';' before 'print'
   14 |   tmp=ls.substr(l-1:r-1)
      |                         ^
      |                         ;
   15 |   print(replace(tmp.begin(),tmp.end(),".","").length())
      |   ~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int x;
  cin >> x;
  
    if (x == A) {
      cout << "T" << endl;
    }
    else if (x == T) {
      cout << "A" << endl;
    }
    else if (x == C) {
      cout << "G" << endl;
    }
    else {
      cout << "C" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'A' was not declared in this scope
    8 |     if (x == A) {
      |              ^
a.cc:11:19: error: 'T' was not declared in this scope
   11 |     else if (x == T) {
      |                   ^
a.cc:14:19: error: 'C' was not declared in this scope
   14 |     else if (x == C) {
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int x;
  cin >> x;
  
    if (x == "A") {
      cout << "T" << endl;
    }
    else if (x == "T") {
      cout << "A" << endl;
    }
    else if (x == "C") {
      cout << "G" << endl;
    }
    else {
      cout << "C" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if (x == "A") {
      |         ~~^~~~~~
a.cc:11:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     else if (x == "T") {
      |              ~~^~~~~~
a.cc:14:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     else if (x == "C") {
      |              ~~^~~~~~
Language: C

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

// gcd(a,b)
int gcd(int a,int b){
	return (b == 0) ? a : gcd(b, a % b);
}

// lcm(a,b)
int lcm(int a,int b){
	return (a * b) / gcd(a,b);
}

int main(int argc, char const *argv[])
{
	char ch;
	scanf("%c",&ch);
	if(ch == 'A')	puts("T");
	else if(ch == 'G')	puts("C");
	else if(ch == 'T')	puts("A");
	else	puts("G");
	return 0;
}


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

int main () {
  char C ;
  cin >> C ;
  if(C=='A') cout << 'T' << endl ;
  if(C=='C') cout << 'G' << endl ;
  if(C=='G') cout << 'C' << endl ;
  if(C=='T') cout << 'A' << endl ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> C ;
      |   ^~~
a.cc:4:14: error: 'cout' was not declared in this scope
    4 |   if(C=='A') cout << 'T' << endl ;
      |              ^~~~
a.cc:4:29: error: 'endl' was not declared in this scope
    4 |   if(C=='A') cout << 'T' << endl ;
      |                             ^~~~
a.cc:5:14: error: 'cout' was not declared in this scope
    5 |   if(C=='C') cout << 'G' << endl ;
      |              ^~~~
a.cc:5:29: error: 'endl' was not declared in this scope
    5 |   if(C=='C') cout << 'G' << endl ;
      |                             ^~~~
a.cc:6:14: error: 'cout' was not declared in this scope
    6 |   if(C=='G') cout << 'C' << endl ;
      |              ^~~~
a.cc:6:29: error: 'endl' was not declared in this scope
    6 |   if(C=='G') cout << 'C' << endl ;
      |                             ^~~~
a.cc:7:14: error: 'cout' was not declared in this scope
    7 |   if(C=='T') cout << 'A' << endl ;
      |              ^~~~
a.cc:7:29: error: 'endl' was not declared in this scope
    7 |   if(C=='T') cout << 'A' << endl ;
      |                             ^~~~
Language: C++

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

Compiler output:
a.cc:22:30: error: extended character 　 is not valid in an identifier
   22 |                  max = count;　count = 0;
      |                              ^
a.cc: In function 'int main()':
a.cc:22:30: error: '\U00003000count' was not declared in this scope; did you mean 'count'?
   22 |                  max = count;　count = 0;
      |                              ^~~~~~~
      |                              count
Language: C++

#include <iostream>
using namespace std;

int main(){
  char b;cin >> B;
  if (b = 'A')cout << "G" <<endl;
  if (b = 'G')cout << "A" <<endl;
  if (b = 'T')cout << "C" <<endl;
  if (b = 'C')cout << "T" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'B' was not declared in this scope
    5 |   char b;cin >> B;
      |                 ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
 string s;
cin>>s;
if (s=="A")
  cout<<"T";
}else if (s=="T")
  cout<<"A";
}else if (s=="G")
  cout<<"C";
}else if (s=="C")
  cout<<"G";
}
return 0;
}

Compiler output:
a.cc:9:2: error: expected unqualified-id before 'else'
    9 | }else if (s=="T")
      |  ^~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }else if (s=="G")
      | ^
a.cc:11:2: error: expected unqualified-id before 'else'
   11 | }else if (s=="G")
      |  ^~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }else if (s=="C")
      | ^
a.cc:13:2: error: expected unqualified-id before 'else'
   13 | }else if (s=="C")
      |  ^~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
a.cc:16:1: error: expected unqualified-id before 'return'
   16 | return 0;
      | ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

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

int main()
{
    int N,Q,l,r,n=0;
    char s[100005];
    scanf("%d%d",&N,&Q);
    getchar();
    gets(s);
    for(int i=1;i<=Q;i++){//共有Q组数据,当前为第i组
        scanf("%d%d",&l,&r);//printf("l=%d r=%d\n",l,r);

        for(n=0;l<=r;l++){
            if(s[l-1]=='A' && s[l]=='C' && l<r){
                n++;
                l++;
            }//printf("l=%d n=%d\n",l,n);
        }
        printf("%d\n",n);
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |     gets(s);
      |     ^~~~
      |     getw
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String item = sc.next();
    if item.equals('A') {
        System.out.println('T');
    } else if item.equals('G') {
        System.out.println('C');
    }
  }
}

Compiler output:
Main.java:7: error: '(' expected
    if item.equals('A') {
      ^
Main.java:7: error: ')' expected
    if item.equals('A') {
                       ^
Main.java:9: error: '(' expected
    } else if item.equals('G') {
             ^
Main.java:9: error: ')' expected
    } else if item.equals('G') {
                              ^
4 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  char ch;
  cin>>ch;
  if(ch=='A'){
    ch = 'T';
  }else if(ch=='C'){
   ch = 'G'; 
  }else if(ch=='G'){
   ch = 'C' 
  }else{
    ch = 'A';
  }
  cout<<ch<<"\n";
 return 0; 
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str1, str2, str3, str4, str5;
  str1 = A;
  str2 = T;
  str3 = G;
  str4 = C;
  cin >> str5;
   if (str5 == str1) {
    cout << "T" << endl;
  }
  if (str5 == str2) {
    cout << "A" << endl;
  }
  if (str5 == str3) {
    cout << "C" << endl;
  }
  if (str5 == str4) {
    cout << "G" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   str1 = A;
      |          ^
a.cc:7:10: error: 'T' was not declared in this scope
    7 |   str2 = T;
      |          ^
a.cc:8:10: error: 'G' was not declared in this scope
    8 |   str3 = G;
      |          ^
a.cc:9:10: error: 'C' was not declared in this scope
    9 |   str4 = C;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str1, str2, str3, str4, str5;
  str1 = A;
  str2 = T;
  str3 = G;
  str4 = C;
  cin >> str5;
   if (str5 = str1) {
    cout << "T" << endl;
  }
  if (str5 = str2) {
    cout << "A" << endl;
  }
  if (str5 = str3) {
    cout << "C" << endl;
  }
  if (str5 = str4) {
    cout << "G" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   str1 = A;
      |          ^
a.cc:7:10: error: 'T' was not declared in this scope
    7 |   str2 = T;
      |          ^
a.cc:8:10: error: 'G' was not declared in this scope
    8 |   str3 = G;
      |          ^
a.cc:9:10: error: 'C' was not declared in this scope
    9 |   str4 = C;
      |          ^
a.cc:11:13: error: could not convert 'str5.std::__cxx11::basic_string<char>::operator=(str1)' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 |    if (str5 = str1) {
      |        ~~~~~^~~~~~
      |             |
      |             std::__cxx11::basic_string<char>
a.cc:14:12: error: could not convert 'str5.std::__cxx11::basic_string<char>::operator=(str2)' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   if (str5 = str2) {
      |       ~~~~~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:17:12: error: could not convert 'str5.std::__cxx11::basic_string<char>::operator=(str3)' from 'std::__cxx11::basic_string<char>' to 'bool'
   17 |   if (str5 = str3) {
      |       ~~~~~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:20:12: error: could not convert 'str5.std::__cxx11::basic_string<char>::operator=(str4)' from 'std::__cxx11::basic_string<char>' to 'bool'
   20 |   if (str5 = str4) {
      |       ~~~~~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str1, str2;
  str1 = A;
  str2 = T;
  str3 = G;
  str4 = C;
  cin >> X;
   if (X == str1) {
    cout << "T" << endl;
  }
  if (X == str2) {
    cout << "A" << endl;
  }
  if (X == str3) {
    cout << "C" << endl;
  }
  if (X == str4) {
    cout << "G" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   str1 = A;
      |          ^
a.cc:7:10: error: 'T' was not declared in this scope
    7 |   str2 = T;
      |          ^
a.cc:8:3: error: 'str3' was not declared in this scope; did you mean 'str2'?
    8 |   str3 = G;
      |   ^~~~
      |   str2
a.cc:8:10: error: 'G' was not declared in this scope
    8 |   str3 = G;
      |          ^
a.cc:9:3: error: 'str4' was not declared in this scope; did you mean 'str2'?
    9 |   str4 = C;
      |   ^~~~
      |   str2
a.cc:9:10: error: 'C' was not declared in this scope
    9 |   str4 = C;
      |          ^
a.cc:10:10: error: 'X' was not declared in this scope
   10 |   cin >> X;
      |          ^
Language: C++

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

int main()
{
    char ch;

    scanf("%c",&ch);

    if(ch=='A')
    {
        printf("T\n");
    }
    if else(ch=='G')
            printf("C\n");
    if else(ch=='T')
            printf("A\n");
    if else(ch=='C')
            printf("G\n");



    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: expected '(' before 'else'
   14 |     if else(ch=='G')
      |        ^~~~
      |        (
a.cc:16:8: error: expected '(' before 'else'
   16 |     if else(ch=='T')
      |        ^~~~
      |        (
a.cc:18:8: error: expected '(' before 'else'
   18 |     if else(ch=='C')
      |        ^~~~
      |        (
Language: C++

#include<bits/stc++.gh>
using namespace std;
int main ( )
{
	string a;
	char a;
	if(a="A")
	cout<<"T";
	if(a="T")
	cout<<"A";
	if(a="C")
	cout<<"G";
	if(a="G")
	cout<<"C";
	return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/stc++.gh: No such file or directory
    1 | #include<bits/stc++.gh>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int X;
  cin >> X;
   if (X == char A) {
    cout << "T" << endl;
  }
  if (X == char T) {
    cout << "A" << endl;
  }
  if (X == char G) {
    cout << "C" << endl;
  }
  if (X == char C) {
    cout << "G" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before 'char'
    7 |    if (X == char A) {
      |             ^~~~
a.cc:7:12: error: expected ')' before 'char'
    7 |    if (X == char A) {
      |       ~    ^~~~~
      |            )
a.cc:10:12: error: expected primary-expression before 'char'
   10 |   if (X == char T) {
      |            ^~~~
a.cc:10:11: error: expected ')' before 'char'
   10 |   if (X == char T) {
      |      ~    ^~~~~
      |           )
a.cc:13:12: error: expected primary-expression before 'char'
   13 |   if (X == char G) {
      |            ^~~~
a.cc:13:11: error: expected ')' before 'char'
   13 |   if (X == char G) {
      |      ~    ^~~~~
      |           )
a.cc:16:12: error: expected primary-expression before 'char'
   16 |   if (X == char C) {
      |            ^~~~
a.cc:16:11: error: expected ')' before 'char'
   16 |   if (X == char C) {
      |      ~    ^~~~~
      |           )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int X;
  cin >> X;
   if (X = char A) {
    cout << "T" << endl;
  }
  if (X = char T) {
    cout << "A" << endl;
  }
  if (X = char G) {
    cout << "C" << endl;
  }
  if (X = char C) {
    cout << "G" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before 'char'
    7 |    if (X = char A) {
      |            ^~~~
a.cc:7:11: error: expected ')' before 'char'
    7 |    if (X = char A) {
      |       ~   ^~~~~
      |           )
a.cc:10:11: error: expected primary-expression before 'char'
   10 |   if (X = char T) {
      |           ^~~~
a.cc:10:10: error: expected ')' before 'char'
   10 |   if (X = char T) {
      |      ~   ^~~~~
      |          )
a.cc:13:11: error: expected primary-expression before 'char'
   13 |   if (X = char G) {
      |           ^~~~
a.cc:13:10: error: expected ')' before 'char'
   13 |   if (X = char G) {
      |      ~   ^~~~~
      |          )
a.cc:16:11: error: expected primary-expression before 'char'
   16 |   if (X = char C) {
      |           ^~~~
a.cc:16:10: error: expected ')' before 'char'
   16 |   if (X = char C) {
      |      ~   ^~~~~
      |          )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  char X;
  cin >> X;
   if (X = "A") {
    cout << "T" << endl;
  }
  if (X = "T") {
    cout << "A" << endl;
  }
  if (X = "G") {
    cout << "C" << endl;
  }
  if (X = "C") {
    cout << "G" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    7 |    if (X = "A") {
      |            ^~~
      |            |
      |            const char*
a.cc:10:11: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   10 |   if (X = "T") {
      |           ^~~
      |           |
      |           const char*
a.cc:13:11: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   13 |   if (X = "G") {
      |           ^~~
      |           |
      |           const char*
a.cc:16:11: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   16 |   if (X = "C") {
      |           ^~~
      |           |
      |           const char*
Language: C++

#include <iostream>
using namespace std;
int main(){
  int A,T,C,G;
  cin >> b;
  if(b==A){
  cout << T\n;}
  if(b==T){
  cout << A\n;}
  if(b==G){
  cout << C\n;}
  if(b==C){
  cout << G\n;}
  return 0;
}



Compiler output:
a.cc:7:12: error: stray '\' in program
    7 |   cout << T\n;}
      |            ^
a.cc:9:12: error: stray '\' in program
    9 |   cout << A\n;}
      |            ^
a.cc:11:12: error: stray '\' in program
   11 |   cout << C\n;}
      |            ^
a.cc:13:12: error: stray '\' in program
   13 |   cout << G\n;}
      |            ^
a.cc: In function 'int main()':
a.cc:5:10: error: 'b' was not declared in this scope
    5 |   cin >> b;
      |          ^
a.cc:7:12: error: expected ';' before 'n'
    7 |   cout << T\n;}
      |            ^~
      |            ;
a.cc:9:12: error: expected ';' before 'n'
    9 |   cout << A\n;}
      |            ^~
      |            ;
a.cc:11:12: error: expected ';' before 'n'
   11 |   cout << C\n;}
      |            ^~
      |            ;
a.cc:13:12: error: expected ';' before 'n'
   13 |   cout << G\n;}
      |            ^~
      |            ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int X;
  cin >> X;
   if (X = "A") {
    cout << "T" << endl;
  }
  if (X = "T") {
    cout << "A" << endl;
  }
  if (X = "G") {
    cout << "C" << endl;
  }
  if (X = "C") {
    cout << "G" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    7 |    if (X = "A") {
      |            ^~~
      |            |
      |            const char*
a.cc:10:11: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   10 |   if (X = "T") {
      |           ^~~
      |           |
      |           const char*
a.cc:13:11: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   13 |   if (X = "G") {
      |           ^~~
      |           |
      |           const char*
a.cc:16:11: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   16 |   if (X = "C") {
      |           ^~~
      |           |
      |           const char*
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int X;
  cin >> X;
   if (X == "A") {
    cout << "T" << endl;
  }
  if (X == "T") {
    cout << "A" << endl;
  }
  if (X == "G") {
    cout << "C" << endl;
  }
  if (X == "C") {
    cout << "G" << endl;
  }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  cin >> X;
   if (X == A) {
    cout << "T" << endl;
  }
  if (X == T) {
    cout << "A" << endl;
  }
  if (X == G) {
    cout << "C" << endl;
  }
  if (X == C) {
    cout << "G" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'X' was not declared in this scope
    5 |   cin >> X;
      |          ^
a.cc:6:13: error: 'A' was not declared in this scope
    6 |    if (X == A) {
      |             ^
a.cc:9:12: error: 'T' was not declared in this scope
    9 |   if (X == T) {
      |            ^
a.cc:12:12: error: 'G' was not declared in this scope
   12 |   if (X == G) {
      |            ^
a.cc:15:12: error: 'C' was not declared in this scope
   15 |   if (X == C) {
      |            ^
Language: C++

#include <stdio.h>
#include <string.h>
int main()
{
   char a[12];int n,m,max=0,l=0,i;
   gets(a);
   m=strlen(a);
   for(n=0;n<=m-1;n++)//&&l<=m-n
   {
       if(a[n]=='A'||a[n]=='T'||a[n]=='C'||a[n]=='G')
       {
           for( l=1,i=n+1;i<m;i++)
           {
               if(a[i]=='A'||a[i]=='T'||a[i]=='C'||a[i]=='G')
                l++;
               else
                break;
           }
           if(l>max)
             max=l;
       }
   }
   printf("%d",max);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |    gets(a);
      |    ^~~~
      |    getw
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string X,ans;
  cin >> X;
  if (X=="A"){
    ans = "T";
  }else if (X=="T"){
    ans = "A";
  }else if (X=="G"){
    ans = "C";
  }else if (X=="C"){
    ans = "G"
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before '}' token
   13 |     ans = "G"
      |              ^
      |              ;
   14 |   }
      |   ~
Language: Java

import java.util.Scanner;
public class Helix{
 
 public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
  String b = sc.next();
   if(b == "A"){
   System.out.print("T");
   }else if(b == "T"){
   System.out.print("A");
   }else if(b == "C"){
   System.out.print("G");
   }else if(b == "G"){
   System.out.print("C");
   }else{
     System.out.print("Input Error");
   }
 }
}

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

#include <stdio.h>
int main()
{
  char b;
  scanf("%c",&b);
  if(b=='A')
    printf("T\n");
  if(b=='T')
    printf("A\n");
  if(b=='C')
    printf("G\n");
  if(b=="G")
    printf("C\n);
           return 0;
           }

Compiler output:
main.c: In function 'main':
main.c:12:7: warning: comparison between pointer and integer
   12 |   if(b=="G")
      |       ^~
main.c:13:12: warning: missing terminating " character
   13 |     printf("C\n);
      |            ^
main.c:13:12: error: missing terminating " character
   13 |     printf("C\n);
      |            ^~~~~~
main.c:14:12: error: expected expression before 'return'
   14 |            return 0;
      |            ^~~~~~
main.c:14:21: error: expected ';' before '}' token
   14 |            return 0;
      |                     ^
      |                     ;
   15 |            }
      |            ~
Language: C

#include<stdio.h>
int main(void){
  char b;
  scanf("%s",b);
  if(b==A){
    printf("T\n");
  }
  if(b==T){
    printf("A\n");
  }
  if(b==C){
    printf("G\n");
  }
  if(b==G){
    printf("C\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'A' undeclared (first use in this function)
    5 |   if(b==A){
      |         ^
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:9: error: 'T' undeclared (first use in this function)
    8 |   if(b==T){
      |         ^
main.c:11:9: error: 'C' undeclared (first use in this function)
   11 |   if(b==C){
      |         ^
main.c:14:9: error: 'G' undeclared (first use in this function)
   14 |   if(b==G){
      |         ^
Language: Java

import java.util.Scanner;
public class Helix{
 
 public static void main(String[] args){
 　Scanner sc = new Scanner(System.in);
 　String b = sc.next();
   if(b == "A"){
   System.out.print("T");
   }else if(b == "T"){
   System.out.print("A");
   }else if(b == "C"){
   System.out.print("G");
   }else if(b == "G"){
   System.out.print("C");
   }else{
     System.out.print("Input Error");
   }
 }
}

Compiler output:
Main.java:5: error: illegal character: '\u3000'
 ?Scanner sc = new Scanner(System.in);
 ^
Main.java:6: error: illegal character: '\u3000'
 ?String b = sc.next();
 ^
2 errors