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

#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <cmath>

using namespace std;

#define REP(i,n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
typedef pair<int, int> pint;

const int SIZE = 100000 + 10;
const ll MOD = 1000000000 + 7;
ll dp[SIZE][4];
// DP                                                                           
int main() {
  string S; cin>>S;
  int len = S.length();
  dp[0][0] = 1;
  for(int i = 0; i < len; i++) {
    for(int j = 0; j < 4; j++) {
      dp[i+1][j] = dp[i][j] * (S[i] == '?' ? 3 : 1);
    }
    if(S[i] == 'A' || S[i] == '?') {
      dp[i+1][1] += dp[i][0];
    }
    if(S[i] == 'B' || S[i] == '?') {
      dp[i+1][2] += dp[i][1];
    }
    if(S[i] == 'C' || S[i] == '?') {
      dp[i+1][3] += dp[i][2];
    }
#ifdef DEBUG
    cout << i+1;
    REP(j,4) {
      dp[i+1][j] %= MOD;
      cout << "," << dp[i+1][j];
    }
    cout << endl;
  }
#endif
  ll ans = dp[len][3];
  cout << ans << endl;
  return 0;
}


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

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 1000000000
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    int R;
    cin >> R;
    if(R < 1200) cout<< "ABC" << endl;
    else(R < 2800) cout << "ARC" << endl;
    else cout << "AGC" <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: expected ';' before 'cout'
   26 |     else(R < 2800) cout << "ARC" << endl;
      |                   ^~~~~
      |                   ;
a.cc:27:5: error: 'else' without a previous 'if'
   27 |     else cout << "AGC" <<endl;
      |     ^~~~
Language: C++

#!/usr/bin/env bash
read R;[ $R -lt 1200 ]&&echo ABC||[ $R -lt 2800 ]&&echo ARC||echo AGC

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env bash
      |  ^
a.cc:2:1: error: 'read' does not name a type
    2 | read R;[ $R -lt 1200 ]&&echo ABC||[ $R -lt 2800 ]&&echo ARC||echo AGC
      | ^~~~
a.cc:2:8: error: expected unqualified-id before '[' token
    2 | read R;[ $R -lt 1200 ]&&echo ABC||[ $R -lt 2800 ]&&echo ARC||echo AGC
      |        ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  if(n < 1200 ){cout << "ABC" << endl;}
  if else(n < 2800){cout << "ARC" << endl;}
  else{cout << "AGC" << endl;}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected '(' before 'else'
    8 |   if else(n < 2800){cout << "ARC" << endl;}
      |      ^~~~
      |      (
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else{cout << "AGC" << endl;}
      |   ^~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
	int R;
  	cin >> R;
  	if(R < 1200){
      cout << "ABC";
    }else if(1200 <= && R < 2800){
      cout << "ARC";
    }else{
      cout << "AGC";
    }
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     }else if(1200 <= && R < 2800){
      |              ~~~~~^~~~~~~
a.cc:11:25: error: label 'R' used but not defined
   11 |     }else if(1200 <= && R < 2800){
      |                         ^
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Atcoder104B {
    public static void main(String[] args) throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String word = input.readLine();
        System.out.println(word.matches("$A[a-z]C[a-z]+^")?"AC":"WA");
    }
}


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

#include<iostream>
using namespace std;

int main(){
    int r;
    cin >> r;

    int(r < 1200)       cout << "ABC" << endl;
    else if(r < 2800)   cout << "ARC" << endl;
    else                cout << "AGC" << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before 'cout'
    8 |     int(r < 1200)       cout << "ABC" << endl;
      |                  ^      ~~~~
      |                  ;
a.cc:9:5: error: 'else' without a previous 'if'
    9 |     else if(r < 2800)   cout << "ARC" << endl;
      |     ^~~~
Language: C++

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

sinCout(string str){
	cout << str << endl;
}

int main(){
	int R;
	cin >> R;

	if(R < 1200) sinCout("ABC");
	else if(1200 <= R && R < 2800) sinCout("ARC");
	else sinCout("AGC");
}


Compiler output:
a.cc:5:1: error: ISO C++ forbids declaration of 'sinCout' with no type [-fpermissive]
    5 | sinCout(string str){
      | ^~~~~~~
a.cc: In function 'int sinCout(std::string)':
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
    7 | }
      | ^
Language: C++

define,input D,G,p[D],c[D]        //入力

repeat_end = 1 << D               //2^D回ループ
ans = INF                         //答えは解答問題数の最小値

repeat k: 0 to repeat_end - 1     //2^D回ループ

define copy_p[D] = p[D]           //pをコピーしておく

define copy_k = k                 //ループの添え字もコピー
define sum = 0                    //得点の和
define cnt = 0                    //解答問題数

repeat j: 0 to D - 1              //スコアの違う問題を順番に

if copy_k & 1                     //ビットでパーフェクトの組合せを再現
sum += copy_p[j] * (j+1) * 100 + c[j]
                                  //パーフェクトの得点
cnt += copy_p[j]                  //全部解答する
copy_p[j] = 0                     //解答したので残りの問題数は0

copy_k = copy_k >> 1              //ビットシフト

if s >= G                         //Gより大きいなら即終了
goto END

repeat j: D-1 to 0                //スコアの高い問題から

while copy_p[j] > 1               //パーフェクトにならないように

copy_p[j]--                       //残りの問題数は1減る
sum += (j+1)*100                  //一問解く
cnt++                             //解答問題数は1増える

if sum >= G                       //Gより大きいなら即終了
goto END

continue                          //Gより小さいなら次のループへ
CL:
ans = min(ans,cnt)                //Gより大きいなら解答問題数の最小化

output ans                        //出力


Compiler output:
a.cc:1:1: error: 'define' does not name a type
    1 | define,input D,G,p[D],c[D]        //入力
      | ^~~~~~
Language: C++

#include "iostream"
using namespace std;
int maim(){
  int n;
  cin>>n;
  if(n<=2800)cout<<"AGC"<<endl;
  else if(n<=1200)cout<<"ARC"<<endl;
  else cout<<"ABC"<<endl;
  return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int R = ac.nextInt();
      	if(R=<1199){
          System.out.println("ABC")
        }{else if(R=>2800){
          System.out.println("AGC")
        }{else{
          System.out.println("ARC")
        }
     }
}     

Compiler output:
Main.java:6: error: illegal start of type
      	if(R=<1199){
      	      ^
Main.java:6: error: ';' expected
      	if(R=<1199){
      	          ^
Main.java:7: error: ';' expected
          System.out.println("ABC")
                                   ^
Main.java:8: error: illegal start of expression
        }{else if(R=>2800){
                    ^
Main.java:9: error: ';' expected
          System.out.println("AGC")
                                   ^
Main.java:8: error: 'else' without 'if'
        }{else if(R=>2800){
          ^
Main.java:11: error: ';' expected
          System.out.println("ARC")
                                   ^
Main.java:10: error: 'else' without 'if'
        }{else{
          ^
Main.java:14: error: reached end of file while parsing
}     
 ^
9 errors
Language: C++

#include<iostream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
  string s;
  cin >> s;
  int x,z;
  int y = s.length()-1;
  if (s[0] == 'A'){
    x=1;
  }
  for(int i = 2; i < y; i++){
    if (s[i] == 'C'){
    	if (x=1){x=2;z=i;}
    }
    if ((s.length - z) != 'A'){cout << "AC";}
  }
  	else{cout << "WA";}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |     if ((s.length - z) != 'A'){cout << "AC";}
      |          ~~^~~~~~
      |                  ()
a.cc:19:9: error: 'else' without a previous 'if'
   19 |         else{cout << "WA";}
      |         ^~~~
Language: C++

#include<iostream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
  string s;
  cin >> s;
  int x,z;
  int y = s.lenth()-1;
  if (s[0] == 'A'){
    x=1;
  }
  for(int i = 2; i < y; i++){
    if (s[i] == 'C'){
    	if (x=1){x=2;z=i;}
    }
    if (s.length - z != 'A'){cout << "AC";}
  }
  else{cout << "WA";}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenth'; did you mean 'length'?
    9 |   int y = s.lenth()-1;
      |             ^~~~~
      |             length
a.cc:17:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |     if (s.length - z != 'A'){cout << "AC";}
      |         ~~^~~~~~
      |                 ()
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else{cout << "WA";}
      |   ^~~~
Language: C++

define,input D,G,p[D],c[D]		//入力

repeat_end = 1 << D				//2^D回ループ
ans = INF						//答えは解答問題数の最小値
  
repeat k: 0 to repeat_end - 1	//2^D回ループ
      
    define copy_p[D] = p[D]		//pをコピーしておく
  
    define copy_k = k			//ループの添え字もコピー
    define sum = 0				//得点の和
    define cnt = 0				//解答問題数
      
    repeat j: 0 to D - 1		//スコアの違う問題を順番に
          
        if copy_k & 1			//ビットでパーフェクトの組合せを再現
            sum += copy_p[j] * (j+1) * 100 + c[j]
            					//パーフェクトの得点
            cnt += copy_p[j]	//全部解答する
            copy_p[j] = 0		//解答したので残りの問題数は0
            
        copy_k = copy_k >> 1	//ビットシフト
              
        if s >= G				//Gより大きいなら即終了
            goto END      
      
    repeat j: D-1 to 0 			//スコアの高い問題から
          
        while copy_p[j] > 1 	//パーフェクトにならないように
              
            copy_p[j]--			//残りの問題数は1減る
            sum += (j+1)*100	//一問解く
            cnt++				//解答問題数は1増える
              
            if sum >= G 		//Gより大きいなら即終了
                goto END
            
        continue				//Gより小さいなら次のループへ
    CL:
        ans = min(ans,cnt)		//Gより大きいなら解答問題数の最小化
          
output ans						//出力


Compiler output:
a.cc:1:1: error: 'define' does not name a type
    1 | define,input D,G,p[D],c[D]              //入力
      | ^~~~~~
Language: Java

import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main1{
	public static void main(String[] args){
		FastScanner sc = new FastScanner();
		int R = sc.nextInt();
		if(R < 1200){
			System.out.println("ABC");
		}else if (R < 2800){
			System.out.println("ARC");
		}else{
			System.out.println("AGC");
		}
	}
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}

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

#include<iostream>
using namespace std;
int main(){
  int a;
  cin >> a;
  if (a < 1200){
    cout << "ABC";
  }
  else if ((a => 1200)&&(a < 2800)){
  	cout << "ARC";
  }
  else if ((a => 2800)&&(a <= 4208)){
  	cout << "AGC";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected primary-expression before '>' token
    9 |   else if ((a => 1200)&&(a < 2800)){
      |                ^
a.cc:12:16: error: expected primary-expression before '>' token
   12 |   else if ((a => 2800)&&(a <= 4208)){
      |                ^
Language: C++

#include <iostream>

int n;

int main(){
  std::cin >> n;
  
  if(n<1200) 
    std::cout << "ABC" << '\n';
  else if (n<2800)
    std::cout << "ARC" << '\n';
  else
    std::cout << "AGC" << '\n';

Compiler output:
a.cc: In function 'int main()':
a.cc:13:32: error: expected '}' at end of input
   13 |     std::cout << "AGC" << '\n';
      |                                ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define GIO ios_base::sync_with_stdio(0);cin.tie(0);
 
/*----------------------------------------------Take input Tamplate-----------------------------------------*/
 
template<typename tp> inline void read(tp &x) {
  x = 0;char c = getchar();bool f = 0;
  for(; c < '0' || c > '9'; f |= (c == '-'), c = getchar());
  for(; c >= '0' && c <= '9'; x = (x << 3) + (x << 1) + c - '0', c = getchar());
  if(f) x = -x;
}
 
 
int main()
{ GIO;
 int a;
cin>>a;
 if(a<1200) cout<<"ABC"<<"\n";
 else if a<2800) cout<<"ARC"<<"\n";
 else cout<<"ARG"<<"\n";
   
 
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:10: error: expected '(' before 'a'
   21 |  else if a<2800) cout<<"ARC"<<"\n";
      |          ^
      |          (
a.cc:22:2: error: 'else' without a previous 'if'
   22 |  else cout<<"ARG"<<"\n";
      |  ^~~~
Language: C

#include <stdio.h>

int main(){
int R;

scanf(%d",&R);

if(R < 1200){
printf("ABC\n");
}else if (R<2800){
printf("ARC\n");
}else{
printf("AGC\n");
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: expected expression before '%' token
    6 | scanf(%d",&R);
      |       ^
main.c:6:9: warning: missing terminating " character
    6 | scanf(%d",&R);
      |         ^
main.c:6:9: error: missing terminating " character
    6 | scanf(%d",&R);
      |         ^~~~~~
main.c:16:10: error: expected ';' before '}' token
   16 | return 0;
      |          ^
      |          ;
   17 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define GIO ios_base::sync_with_stdio(0);cin.tie(0);

/*----------------------------------------------Take input Tamplate-----------------------------------------*/

template<typename tp> inline void read(tp &x) {
  x = 0;char c = getchar();bool f = 0;
  for(; c < '0' || c > '9'; f |= (c == '-'), c = getchar());
  for(; c >= '0' && c <= '9'; x = (x << 3) + (x << 1) + c - '0', c = getchar());
  if(f) x = -x;
}


int main()
{ GIO;
 int a;
 read(a);
 if(a<1200) cout<<"ABC"<<""\n;
 else if(1200<=a &&a<2800) cout<<"ARC"<<"\n";
 else cout<<"ARG"<<"\n";
   

return 0;
}

Compiler output:
a.cc:20:28: error: stray '\' in program
   20 |  if(a<1200) cout<<"ABC"<<""\n;
      |                            ^
a.cc: In function 'int main()':
a.cc:20:28: error: expected ';' before 'n'
   20 |  if(a<1200) cout<<"ABC"<<""\n;
      |                            ^~
      |                            ;
Language: C

#include <stdio.h>

int main(){
int R;

scanf(%d",&R);

if(R < 1200){
printf("ABC");
}else if (R<2800){
printf("ARC");
}else{
printf("AGC");
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: expected expression before '%' token
    6 | scanf(%d",&R);
      |       ^
main.c:6:9: warning: missing terminating " character
    6 | scanf(%d",&R);
      |         ^
main.c:6:9: error: missing terminating " character
    6 | scanf(%d",&R);
      |         ^~~~~~
main.c:16:10: error: expected ';' before '}' token
   16 | return 0;
      |          ^
      |          ;
   17 | }
      | ~
Language: C

#include <stdio.h>

int main(){
int a;

scanf(%d",&a);

if(a < 1200){
printf("ABC");
}else if (a<2800){
printf("ARC");
}else{
printf("AGC");
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: expected expression before '%' token
    6 | scanf(%d",&a);
      |       ^
main.c:6:9: warning: missing terminating " character
    6 | scanf(%d",&a);
      |         ^
main.c:6:9: error: missing terminating " character
    6 | scanf(%d",&a);
      |         ^~~~~~
main.c:16:10: error: expected ';' before '}' token
   16 | return 0;
      |          ^
      |          ;
   17 | }
      | ~
Language: C

#include <stdio.h>

int main(){
int a;

scanf(%d",&a);

if(a < 1200){
printf("ABC");
}else if (a<2800){
printf("ARC");
}else{
printf(AGC);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: expected expression before '%' token
    6 | scanf(%d",&a);
      |       ^
main.c:6:9: warning: missing terminating " character
    6 | scanf(%d",&a);
      |         ^
main.c:6:9: error: missing terminating " character
    6 | scanf(%d",&a);
      |         ^~~~~~
main.c:16:10: error: expected ';' before '}' token
   16 | return 0;
      |          ^
      |          ;
   17 | }
      | ~
Language: C++

#include <biys/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  if (a < 1200) cout << "ABC" << endl;
  else if (a < 2800) cout << "ARC" << endl;
  else cout << "AGC" << endl;
}

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

import java.util.Scanner;
class SearchString{
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
String n = stdIn.next();
String s1 = "AtCoder";
if (n == s1)
System.out.println("AC");
}
System.out.println("WA");
}

Compiler output:
Main.java:10: error: <identifier> expected
System.out.println("WA");
                  ^
Main.java:10: error: illegal start of type
System.out.println("WA");
                   ^
2 errors
Language: Java

import java.util.Scanner;
class SearchString{
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
String n = stdIn.next();
String s1 = "AtCoder";
if (n == s1)
System.out.println("AC");
else 
System.out.println("WA");


Compiler output:
Main.java:10: error: reached end of file while parsing
System.out.println("WA");
                         ^
1 error
Language: C++

#include<iostream>
using namespace std;
char S[10];
int AC;

int main(){
AC=0;
for(int i=0;i<10;i++){
cin>>S[i];
}

for(int i=2;i<10;i++){
  if(S[i]=="C"){
   AC=1;
   
}
}

if(AC=1)[
cout<<"AC";
}



return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if(S[i]=="C"){
      |      ~~~~^~~~~
a.cc:20:1: warning: capture of variable 'std::cout' with non-automatic storage duration
   20 | cout<<"AC";
      | ^~~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::ostream std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:5: error: expected ',' before '<<' token
   20 | cout<<"AC";
      |     ^~
      |     ,
a.cc:20:5: error: expected identifier before '<<' token
   20 | cout<<"AC";
      |     ^~
a.cc:20:11: error: expected ']' before ';' token
   20 | cout<<"AC";
      |           ^
      |           ]
a.cc: In lambda function:
a.cc:20:11: error: expected '{' before ';' token
a.cc: At global scope:
a.cc:25:1: error: expected unqualified-id before 'return'
   25 | return 0;
      | ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C

#include<stdio.h>
int main(){
  int R;
  scanf("%d\n",&R );
  if(0<=R<1200){
    printf("ABC\n");
  }
  else if(1200<=R<2800){
    printf("ARC\n");
  }
  else　if(2800<=R<=4208){
  printf("AGC\n");
}
}


Compiler output:
main.c: In function 'main':
main.c:11:7: error: stray '\343' in program
   11 |   else<U+3000>if(2800<=R<=4208){
      |       ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int r;
	cin>>r;
	if(r<1200)
	cout<<"ABC";
	else if(r>=1200&&a<2800)
	cout<<"ARC";
	else
	cout<<"AGC";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'a' was not declared in this scope
    9 |         else if(r>=1200&&a<2800)
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int r;
	cin>>r;
	if(r<1200)
	cout<<"ABC";
	else if(a>=1200&&a<2800)
	cout<<"ARC";
	else
	cout<<"AGC"
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'a' was not declared in this scope
    9 |         else if(a>=1200&&a<2800)
      |                 ^
a.cc:12:20: error: expected ';' before 'return'
   12 |         cout<<"AGC"
      |                    ^
      |                    ;
   13 |         return 0;
      |         ~~~~~~
Language: C

#include<stdio.h>
int main(){
  int R;
  scanf("%d\n",&R );
  if(R<1200){
    printf("ABC\n");
  }
  else if(1200<=R<2800){
    printf("ARC\n");
  }
  else　if(2800<=R<=4208){
  printf("AGC\n");
}
}


Compiler output:
main.c: In function 'main':
main.c:11:7: error: stray '\343' in program
   11 |   else<U+3000>if(2800<=R<=4208){
      |       ^~~~~~~~
Language: C

#include<stdio.h>
int main(){
  int R;
  scanf("%d\n",&R );
  if(R<1200){
    printf("ABC\n");
  }
  else if(1199<R<2800){
    printf("ARC\n");
  }
  else　if(2799<R<4209){
  printf("AGC\n");
}
}


Compiler output:
main.c: In function 'main':
main.c:11:7: error: stray '\343' in program
   11 |   else<U+3000>if(2799<R<4209){
      |       ^~~~~~~~
Language: C

#include<stdio.h>
int main(){
  int R;
  scanf("%d\n",&R );
  if(R<=1199){
    printf("ABC\n");
  }
  else if(1200<=R<=2799){
    printf("ARC\n");
  }
  else　if(2800<=R){
  printf("AGC\n");
}
}


Compiler output:
main.c: In function 'main':
main.c:11:7: error: stray '\343' in program
   11 |   else<U+3000>if(2800<=R){
      |       ^~~~~~~~
Language: C

#include<stdio.h>
int main(){
  int R;
  scanf("%d\n",&R );
  if(R<=1199){
    printf("ABC\n");
  }
  else if(1200<=R<=2799){
    printf("ARC\n");
  }
  else　if(2800<=R){
  printf("ARC\n");
}
}


Compiler output:
main.c: In function 'main':
main.c:11:7: error: stray '\343' in program
   11 |   else<U+3000>if(2800<=R){
      |       ^~~~~~~~
Language: Java

import java.util.Scanner;
public class RatedForMe
{
    public static void main(String args[]){
        Scanner R = new Scanner(System.in);
        int rate = R.nextInt();
        if(rate >= 0 && rate < 1200){
            System.out.println("ABC");
        }
        else if (rate >= 1200 && rate < 2800){
            System.out.println("ARC");
        }
        else if (rate >= 2800){
            System.out.println("AGC");
        }
        
    }
    
}


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

#include <iostream>

int main(){
 int r = 0;
cin >> r;
if(r < 1200){

}

 return 0;
}
/*
The next contest on AtCode is called ABC, which is rated for contestants with ratings less than 1200.

The contest after the ABC is called ARC, which is rated for contestants with ratings less than 2800.

The contest after the ARC is called AGC, which is rated for all contestants.
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin >> r;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <ctype.h>
using namespace std;

int main(int argc, char** argv) {
  string s;
  cin >> s;

  if (s[0] != 'A') {
    cout << "WA";
    return 0;
  }

  int c_count = 0;
  int c_pos = 2;
  for (int i = 2; i < s.size() - 2; i++) {
    if (s[i] == 'C') {
      c_count++;
      c_pos = i;
    }

  if (c_count != 1) {
    cout << "WA";
    return 0;
  }

  for (int i = 0; i < s.size(); i++) {
    if (i == c_pos || i == 0) {
      continue;
    }
    if (isupper(s[i]) == 0) {
      cout << "WA";
      return 0;
    }
  }
  cout << "AC";
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:40:2: error: expected '}' at end of input
   40 | }
      |  ^
a.cc:7:33: note: to match this '{'
    7 | int main(int argc, char** argv) {
      |                                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	scanf("%d",&n);
	if(n<=1200)
		printf("ABC");
	else id(n<=2800)
		printf("ARC");
	else
		printf("AGC");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'id' was not declared in this scope
    9 |         else id(n<=2800)
      |              ^~
a.cc:11:9: error: 'else' without a previous 'if'
   11 |         else
      |         ^~~~
Language: C

#include <stdio.h> 
 
int main(void){
	int R;
 
	scanf("%d",&R);
	if(R < 1200)	printf("ABC\n");
	else if(R < 2800)	printf("ARC\n");
	else if	printf("AGC\n");
 
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: expected '(' before 'printf'
    9 |         else if printf("AGC\n");
      |                 ^~~~~~
      |                 (
Language: C

#include <stdio.h> 

int main(void){
int R;

scanf("%d",&R);
if(R < 1200)	printf("ABC\n");
else if(R < 2800)	printf("ARC\n");
else if	printf("AGC\n");

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: expected '(' before 'printf'
    9 | else if printf("AGC\n");
      |         ^~~~~~
      |         (
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    
    
    if (a＜1200) {
      System.out.println("ABC");
    } else if (a＜2800) {
      System.out.println("ARC");
    } else {
      System.out.println("AGC");
    }
  }
}


Compiler output:
Main.java:9: error: illegal character: '\uff1c'
    if (a?1200) {
         ^
Main.java:11: error: illegal character: '\uff1c'
    } else if (a?2800) {
                ^
Main.java:11: error: 'else' without 'if'
    } else if (a?2800) {
      ^
Main.java:13: error: 'else' without 'if'
    } else {
      ^
4 errors
Language: C++

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

int main(){
    	string s;cin>>s; int flag=1, i;
      	for(i=0; i<s.length()-1; i++){
        	if(i == 0 && s[i] != 'A') break;
          	else if(i == 1)
              	if(s[i] >=65 && s[i] <97 ) break;
          	else if(s[i] >= 65 && s[i]<97 && flag){
            	if(s[i] == 'C') flag = 0;
              	else break;
            }
       	}	
      	if(i != s.length()-1 || (s[s.length()-1] >= 65 && s[n-1] < 97)) cout<<"WA";
        else cout<<"AC";
      	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:61: error: 'n' was not declared in this scope
   15 |         if(i != s.length()-1 || (s[s.length()-1] >= 65 && s[n-1] < 97)) cout<<"WA";
      |                                                             ^
Language: C++

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

int main(){
    	string s;cin>>s; int flag=1, i;
      	for(i=0; i<s.length()-1; i++){
        	if(i == 0 && s[i] != 'A') break;
          	else if(i == 1)
              	if(s[i] >=65 && s[i] <97 ) break;
          	else if(s[i] >= 65 && s[i]<97 && flag){
            	if(s[i] == 'C') flag = 0;
              	else break;
            }
       	}	
      	if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97)) cout<<"WA";
        else cout<<"AC";
      	return 0;
           }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:36: error: 'n' was not declared in this scope
   15 |         if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97)) cout<<"WA";
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    	int s;cin>>s; int flag=1, i;
      	for(i=0; i<s.length()-1; i++){
        	if(i == 0 && s[i] != 'A') break;
          	else if(i == 1)
              	if(s[i] >=65 && s[i] <97 ) break;
          	else if(s[i] >= 65 && s[i]<97 && flag){
            	if(s[i] == 'C') flag = 0;
              	else break;
            }
       	}	
      	if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
        else cout<<"AC";
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:22: error: request for member 'length' in 's', which is of non-class type 'int'
    5 |         for(i=0; i<s.length()-1; i++){
      |                      ^~~~~~
a.cc:6:31: error: invalid types 'int[int]' for array subscript
    6 |                 if(i == 0 && s[i] != 'A') break;
      |                               ^
a.cc:8:21: error: invalid types 'int[int]' for array subscript
    8 |                 if(s[i] >=65 && s[i] <97 ) break;
      |                     ^
a.cc:8:34: error: invalid types 'int[int]' for array subscript
    8 |                 if(s[i] >=65 && s[i] <97 ) break;
      |                                  ^
a.cc:9:26: error: invalid types 'int[int]' for array subscript
    9 |                 else if(s[i] >= 65 && s[i]<97 && flag){
      |                          ^
a.cc:9:40: error: invalid types 'int[int]' for array subscript
    9 |                 else if(s[i] >= 65 && s[i]<97 && flag){
      |                                        ^
a.cc:10:21: error: invalid types 'int[int]' for array subscript
   10 |                 if(s[i] == 'C') flag = 0;
      |                     ^
a.cc:14:19: error: request for member 'length' in 's', which is of non-class type 'int'
   14 |         if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
      |                   ^~~~~~
a.cc:14:36: error: 'n' was not declared in this scope
   14 |         if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
      |                                    ^
a.cc:15:9: error: expected primary-expression before 'else'
   15 |         else cout<<"AC";
      |         ^~~~
a.cc:14:74: error: expected ')' before 'else'
   14 |         if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
      |           ~                                                              ^
      |                                                                          )
   15 |         else cout<<"AC";
      |         ~~~~
Language: C++

int main(){
    	string s;cin>>s; int flag=1, i;
      	for(i=0; i<s.length()-1; i++){
        	if(i == 0 && s[i] != 'A') break;
          	else if(i == 1)
              	if(s[i] >=65 && s[i] <97 ) break;
          	else if(s[i] >= 65 && s[i]<97 && flag){
            	if(s[i] == 'C') flag = 0;
              	else break;
            }
       	}	
      	if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
        else cout<<"AC";
      	return 0;
           }

Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'string' was not declared in this scope
    2 |         string s;cin>>s; int flag=1, i;
      |         ^~~~~~
a.cc:2:18: error: 'cin' was not declared in this scope
    2 |         string s;cin>>s; int flag=1, i;
      |                  ^~~
a.cc:2:23: error: 's' was not declared in this scope
    2 |         string s;cin>>s; int flag=1, i;
      |                       ^
a.cc:12:36: error: 'n' was not declared in this scope
   12 |         if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
      |                                    ^
a.cc:13:9: error: expected primary-expression before 'else'
   13 |         else cout<<"AC";
      |         ^~~~
a.cc:12:74: error: expected ')' before 'else'
   12 |         if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
      |           ~                                                              ^
      |                                                                          )
   13 |         else cout<<"AC";
      |         ~~~~
Language: C

#include <stdio.h>

int main(){
int a;
scanf("%d",&a);
if(a<1200){
printf("ABC")
}else{
if (a<2800){
printf("ARC")
}else{
printf("AGC")
}
}
return 0
}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected ';' before '}' token
    7 | printf("ABC")
      |              ^
      |              ;
    8 | }else{
      | ~             
main.c:10:14: error: expected ';' before '}' token
   10 | printf("ARC")
      |              ^
      |              ;
   11 | }else{
      | ~             
main.c:12:14: error: expected ';' before '}' token
   12 | printf("AGC")
      |              ^
      |              ;
   13 | }
      | ~             
main.c:15:9: error: expected ';' before '}' token
   15 | return 0
      |         ^
      |         ;
   16 | }
      | ~
Language: C

#include <stdio.h>

int main(void){
int a;
scanf("%d",&a);
if(a<1200){
printf("ABC")
}else{
if (a<2800){
printf("ARC")
}else{
printf("AGC")
}
}
return 0
}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected ';' before '}' token
    7 | printf("ABC")
      |              ^
      |              ;
    8 | }else{
      | ~             
main.c:10:14: error: expected ';' before '}' token
   10 | printf("ARC")
      |              ^
      |              ;
   11 | }else{
      | ~             
main.c:12:14: error: expected ';' before '}' token
   12 | printf("AGC")
      |              ^
      |              ;
   13 | }
      | ~             
main.c:15:9: error: expected ';' before '}' token
   15 | return 0
      |         ^
      |         ;
   16 | }
      | ~
Language: C

#include <stdio.h>

void main(){
int a;
scanf("%d",&a);
if(a<1200){
printf("ABC")
}else{
if (a<2800){
printf("ARC")
}else{
printf("AGC")
}
}
  return 0

Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected ';' before '}' token
    7 | printf("ABC")
      |              ^
      |              ;
    8 | }else{
      | ~             
main.c:10:14: error: expected ';' before '}' token
   10 | printf("ARC")
      |              ^
      |              ;
   11 | }else{
      | ~             
main.c:12:14: error: expected ';' before '}' token
   12 | printf("AGC")
      |              ^
      |              ;
   13 | }
      | ~             
main.c:15:10: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   15 |   return 0
      |          ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
main.c:15:11: error: expected ';' at end of input
   15 |   return 0
      |           ^
      |           ;
main.c:15:3: error: expected declaration or statement at end of input
   15 |   return 0
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
     ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int d,g;
    cin>>d>>g;
    vector<pair<long long int,long long int> >ar(d);
    for(int i=0;i<d;i++)
       {
           cin>>ar[i].first>>ar[i].second;
 
       }
    long long int y=0;long long int ans=0;
    for(int i=d-1;i>=0;i--)
    {
        y=ar[i].first*(i+1)*100;y+=ar[i].second;
        if(g>y){ans+=ar[i].first;g-=y;continue;}
        if(g==y){ans+=ar[i].first;g-=y;break;}
 
        long long int v=g/(100*(i+1));
        if(g%(100*(i+1)))v++;
        v=min(v,ar[i].first);
        ans+=v;
        g-=(100*i*v);
        break;
    }
    cout<<ans<<"\n";
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:31:10: error: expected '}' at end of input
   31 | return 0;
      |          ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int R;
 cin >> R;
 if(R<1200){
  cout << "ABC";
 }else if(R<2800){
  cout<<"ARC";
}else{
  cout ,, "AGC"
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: expected primary-expression before ',' token
   12 |   cout ,, "AGC"
      |         ^
Language: C++

R = input()
if R < 1200:
	print('ABC')
elif R < 2800:
	print('ARC')
else:
	print('AGC')

Compiler output:
a.cc:3:15: warning: multi-character character constant [-Wmultichar]
    3 |         print('ABC')
      |               ^~~~~
a.cc:5:15: warning: multi-character character constant [-Wmultichar]
    5 |         print('ARC')
      |               ^~~~~
a.cc:7:15: warning: multi-character character constant [-Wmultichar]
    7 |         print('AGC')
      |               ^~~~~
a.cc:1:1: error: 'R' does not name a type
    1 | R = input()
      | ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int r = sc.nextInt();
		if(r < 1200){
		    System.out.println(“ABC”);
}else if(r < 2800){
System.out.println(“ARC”);
}else
System.out.println(“AGC”);
	}
}

Compiler output:
Main.java:8: error: illegal character: '\u201c'
		    System.out.println(?ABC?);
		                       ^
Main.java:8: error: illegal character: '\u201d'
		    System.out.println(?ABC?);
		                           ^
Main.java:8: error: not a statement
		    System.out.println(?ABC?);
		                        ^
Main.java:10: error: illegal character: '\u201c'
System.out.println(?ARC?);
                   ^
Main.java:10: error: illegal character: '\u201d'
System.out.println(?ARC?);
                       ^
Main.java:10: error: not a statement
System.out.println(?ARC?);
                    ^
Main.java:12: error: illegal character: '\u201c'
System.out.println(?AGC?);
                   ^
Main.java:12: error: illegal character: '\u201d'
System.out.println(?AGC?);
                       ^
Main.java:12: error: not a statement
System.out.println(?AGC?);
                    ^
9 errors
Language: C++

//A - Rated for Me
#include<iostream>
#include<ctdio>
using namespace std;
int main(void){
	int i,j;
	scanf("%d",&i);
	if(i>=2800) printf("AGC");
	if(i>=1200&&i<2800) printf("ARC");
	if(i<1200) printf("ABC");
	return 0;
}

Compiler output:
a.cc:3:9: fatal error: ctdio: No such file or directory
    3 | #include<ctdio>
      |         ^~~~~~~
compilation terminated.
Language: C++

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

using namespace std;
 
int main(){
    int a;
    cin >> a;
    if(r < 1200)
        cout << "ABC" << endl;
    else if( r < 2800)
        cout << "ARC" << endl;
    else 
        cout << "AGC" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'r' was not declared in this scope
   10 |     if(r < 1200)
      |        ^
Language: Java

pubic class Main{
  public static void main(String[] args){

    int R = new java.util.Scanner(System.in).nextInt();
    
    if (0 <= R < 1200) {
      System.out.println("ABC");
    } else (1200 <= R < 2800 {
      System.out.println("ARC");
    } else (2800 <= R <= 4208) {
      System.out.println("AGC");  
  }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
pubic class Main{
^
Main.java:8: error: ')' expected
    } else (1200 <= R < 2800 {
                            ^
Main.java:8: error: not a statement
    } else (1200 <= R < 2800 {
           ^
Main.java:10: error: not a statement
    } else (2800 <= R <= 4208) {
           ^
Main.java:10: error: ';' expected
    } else (2800 <= R <= 4208) {
                              ^
Main.java:10: error: 'else' without 'if'
    } else (2800 <= R <= 4208) {
      ^
Main.java:13: error: reached end of file while parsing
}
 ^
7 errors
Language: C++

#include "stdafx.h"
#include<iostream>
using namespace std;

int main(){
	int R;
	cin >> R;

	if (R >= 2800){ cout << "AGC" << endl; }
	else if (R >= 1200){ cout << "ARC" << endl; }
	else{ cout << "ABC" << endl; }

	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
public class Test1 {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int rate = sc.nextInt();

    String contest;
    if( rate < 1200 ){
      contest = "ABC";
    }else if(rate <  2800){
      contest = "ARC";
    }else {
      contest = "AGC";
    }

    System.out.println(contest);
  }
}


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

#include"cstdlib"
#include"iostream"
using namespace std;
int main()
{
	int a;
	cin>>a;
	if(a<1200)
	cout<<ABC;
	if(a>1200;a<2800)
	cout<<ARC;
	if(a>2800)
	cout<<AGC;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'ABC' was not declared in this scope
    9 |         cout<<ABC;
      |               ^~~
a.cc:11:15: error: 'ARC' was not declared in this scope
   11 |         cout<<ARC;
      |               ^~~
a.cc:13:15: error: 'AGC' was not declared in this scope
   13 |         cout<<AGC;
      |               ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <map>
#include <vector>
#include <queue>
#include <functional>
#include <string>
#include <stack>
#include <set>
#include <sstream>
#include <iomanip>
#include <limits>
#include <cstring>
 
using namespace std;
 
 
int main(){
	int R;
	cin >> R;
    if(R<1200){
        cout << "ABC";
    }else if(R<2800){
        cout << "ARC";
    }else{
        cout << "AGC"
    }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:22: error: expected ';' before '}' token
   27 |         cout << "AGC"
      |                      ^
      |                      ;
   28 |     }
      |     ~
Language: Java

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;

public class Solution {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		// 입력
		int r = Integer.parseInt(br.readLine());

		if(r < 1200){
			bw.write("ABC");
		}else if(r < 2800){
			bw.write("ARC");		
		}else{
			bw.write("AGC");
		}
		
		bw.flush();
		bw.close();
		br.close();
	}
}

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

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
const ll MOD=1e9+7;           /*******MOD***********超过long long 一点不要紧*****/

const int maxn = 123456;
typedef pair<int,int> pii;


char a[maxn], b[maxn];
int main(){
    int n ;
    string s;
    cin >> s;
    n = s.size();
    int sum = 0;
    if(s[0] != 'A' || s[1] == 'C'){cout << "WA" << endl;
        return 0;}
    for (int i = 2; i < n; ++i) {
        if(s[i] == 'C')sum ++;
        else if(s[i] < 'a' || s[i] > 'z') endl;
    }
    if(sum > 1)cout << "WA" << endl;
    else cout << "AC" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:47: error: statement cannot resolve address of overloaded function
   22 |         else if(s[i] < 'a' || s[i] > 'z') endl;
      |                                               ^
Language: C

#include <stdio.h>

int main() {
	int r = 0;
	scanf("%d", &r);
	
	if (r < 1200) {
		printf("ABC");
	}else if (r < 2800) {
		printf("ARC");
	}
	else {
		printf("AGC")
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:30: error: expected ';' before '}' token
   13 |                 printf("AGC")
      |                              ^
      |                              ;
   14 |         }
      |         ~
Language: C

#include <stdio.h>
int main()
{
  int r;
  scanf("%d",&r);
  if(r<1200)
  {
    printf("ABC");
  }
  else if(r<2800)
  {
    printf("ARC")
  }
  else
  {
    printf("AGC");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:18: error: expected ';' before '}' token
   12 |     printf("ARC")
      |                  ^
      |                  ;
   13 |   }
      |   ~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class main {
	
	public static void main(String[] args) throws IOException{
		
		InputStreamReader inputStreamReader = new InputStreamReader(System.in);
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
		
		String input = bufferedReader.readLine();
		int r = Integer.parseInt(input);
		
		String result = "AGC";
		
		if(r < 1200) {
			result = "ABC";
		}else if(r < 2800) {
			result = "ARC";
		}
		
		print(result);
	}
	
	public static void print(String string) {
		System.out.println(string);
	}

}


Compiler output:
Main.java:5: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: Java

import java.util.Scanner;
import java.util.Arrays;

public class AtCoderA104
{

	public static void main(String[] args)
	{	Scanner s = new Scanner(System.in);
                int n = s.nextInt();
                if(n<1200){
                    System.out.println("ABC");
                }else if(n>= 1200 && n<2800){
                    System.out.println("ARC");
                }else{
                    System.out.println("AGC");
                }
                
	}
}


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

#include<iostream>
using namespace std

int mian()
{

}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int mian()
      | ~~~                 
a.cc: In function 'int mian()':
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
    7 | }
      | ^