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

#include <iostream>

using namespace std;

//const int MAX_N = 100000;

//long int table[MAX_N][MAX_N] = {};
long int n, m;
int a[MAX_N];

void solve() {
  // 対角線上の値決定
  long int ans = 0;
  // for (int i = 0; i < n; i++) {
  //   table[i][i] = a[i];
  //   if (table[i][i] % m == 0) ans++;
  // }

  // for (int from = 0; from < n; from++) {
  //   for (int to = from + 1; to < n; to++) {
  //     table[from][to] = table[from][to-1] + a[to];
  //     if (table[from][to] % m == 0) ans++;
  //   }
  // }

  long int tmp = 0;
  for (int from = 0; from < n; from++) {
    tmp = a[from];
    if (tmp % m == 0) ans++;
    for (int to = from + 1; to < n; to++) {
      tmp += a[to];
      if (tmp % m == 0) ans++;
    }
  }

  cout << ans << endl;

  return;
}

int main(void) {
  cin >> n;
  cin >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  solve();
}



Compiler output:
a.cc:9:7: error: 'MAX_N' was not declared in this scope
    9 | int a[MAX_N];
      |       ^~~~~
a.cc: In function 'void solve()':
a.cc:28:11: error: 'a' was not declared in this scope
   28 |     tmp = a[from];
      |           ^
a.cc: In function 'int main()':
a.cc:45:12: error: 'a' was not declared in this scope
   45 |     cin >> a[i];
      |            ^
Language: Java

import java.util.Scanner;














public class K4 {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		long m = stdin.nextLong();
		long count =0; 
		long sum = 0;
		
		long[] a = new long[n];
		for(int i = 0; i < n; i++){
			a[i] = stdin.nextLong();
		}
		
		//long[] pattern = new long[(n * n / 2) + n / 2];
		
		for(int i = 0; i < n; i++){
			for(int j = i; j < n; j++){
				sum = 0;
				for(int k = i; k <= j; k++){
					sum += a[k]; 
				}
				if(sum % m == 0){
					count += 1;
				}
			}
		}
		
		System.out.println(count);
		
	}

}


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

#include<cstdio>
#include<unordered_map>
int main(){
using u64=unsigned long long;
unsigned int n,m;
scanf("%u%u",&n,&m);
std::unordered_map<unsigned int,unsigned int> mp;
unsigned int a=0,b;
u64 cnt=0;
mp[0]=1;
while(nｰｰ){
scanf("%u",&b);
a=(a+b)%m;
cnt+=mp[a]++;
}
printf("llu\n",cnt);
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'n\U0000ff70\U0000ff70' was not declared in this scope
   11 | while(nｰｰ){
      |       ^~~
Language: C++

#include <iostream>

using namespace std;

const int MAX_N = 100000;

long int table[MAX_N][MAX_N] = {};
long int n, m;
int a[MAX_N];

void solve() {
  // 対角線上の値決定
  long int ans = 0;
  for (int i = 0; i < n; i++) {
    table[i][i] = a[i];
    if (table[i][i] % m == 0) ans++;
  }

  for (int from = 0; from < n; from++) {
    for (int to = from + 1; to < n; to++) {
      table[from][to] = table[from][to-1] + a[to];
      if (table[from][to] % m == 0) ans++;
    }
  }

  cout << ans << endl;

  return;
}

int main(void) {
  cin >> n;
  cin >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  solve();
}



Compiler output:
/tmp/ccQF6SRY.o: in function `solve()':
a.cc:(.text+0x29): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccQF6SRY.o
a.cc:(.text+0x64): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccQF6SRY.o
a.cc:(.text+0x8a): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQF6SRY.o
a.cc:(.text+0xe8): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccQF6SRY.o
a.cc:(.text+0x148): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccQF6SRY.o
a.cc:(.text+0x16e): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQF6SRY.o
a.cc:(.text+0x188): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQF6SRY.o
/tmp/ccQF6SRY.o: in function `main':
a.cc:(.text+0x1cb): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQF6SRY.o
a.cc:(.text+0x1e4): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccQF6SRY.o
a.cc:(.text+0x213): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccQF6SRY.o
a.cc:(.text+0x239): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

using namespace std;

const int MAX_N = 100000;

long long int table[MAX_N][MAX_N] = {};
long long int n, m;
int a[MAX_N];

void solve() {
  // 対角線上の値決定
  long long int ans = 0;
  for (int i = 0; i < n; i++) {
    table[i][i] = a[i];
    if (table[i][i] % m == 0) ans++;
  }

  for (int from = 0; from < n; from++) {
    for (int to = from + 1; to < n; to++) {
      table[from][to] = table[from][to-1] + a[to];
      if (table[from][to] % m == 0) ans++;
    }
  }

  cout << ans << endl;

  return;
}

int main(void) {
  cin >> n;
  cin >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  solve();
}



Compiler output:
/tmp/cccYoS3w.o: in function `solve()':
a.cc:(.text+0x29): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/cccYoS3w.o
a.cc:(.text+0x64): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cccYoS3w.o
a.cc:(.text+0x8a): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccYoS3w.o
a.cc:(.text+0xe8): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/cccYoS3w.o
a.cc:(.text+0x148): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cccYoS3w.o
a.cc:(.text+0x16e): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccYoS3w.o
a.cc:(.text+0x188): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccYoS3w.o
/tmp/cccYoS3w.o: in function `main':
a.cc:(.text+0x1cb): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cccYoS3w.o
a.cc:(.text+0x1e4): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cccYoS3w.o
a.cc:(.text+0x213): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/cccYoS3w.o
a.cc:(.text+0x239): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

using namespace std;

const int MAX_N = 100000;

long long int memo[MAX_N][MAX_N] = {};
long long int n, m;
int a[MAX_N];

void solve() {
  // 対角線上の値決定
  long long int ans = 0;
  for (int i = 0; i < n; i++) {
    memo[i][i] = a[i];
    if (memo[i][i] % m == 0) ans++;
  }

  for (int from = 0; from < n; from++) {
    for (int to = from + 1; to < n; to++) {
      memo[from][to] = memo[from][to-1] + a[to];
      if (memo[from][to] % m == 0) ans++;
    }
  }

  cout << ans << endl;

  return;
}

int main(void) {
  cin >> n;
  cin >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  solve();
}



Compiler output:
/tmp/ccowu788.o: in function `solve()':
a.cc:(.text+0x29): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccowu788.o
a.cc:(.text+0x64): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccowu788.o
a.cc:(.text+0x8a): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccowu788.o
a.cc:(.text+0xe8): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccowu788.o
a.cc:(.text+0x148): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccowu788.o
a.cc:(.text+0x16e): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccowu788.o
a.cc:(.text+0x188): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccowu788.o
/tmp/ccowu788.o: in function `main':
a.cc:(.text+0x1cb): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccowu788.o
a.cc:(.text+0x1e4): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccowu788.o
a.cc:(.text+0x213): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccowu788.o
a.cc:(.text+0x239): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <vector>

using namespace std;

int As[110000];

int main() {
    int N, M;
    long long c;

    scanf("%d %d", &N, &M);

    As[0] = 0;
    for (int i = 0; i < N; i++) {
        int t;
        scanf("%d", &t);
        As[i + 1] = (As[i] + t) % M;
    }

    c = 0;
    for (int l = 0; l < N; l++) {
        for (int r = l + 1; r < N + 1; r++) {
            if ((As[r] - As[l] + M) % M == 0) c++;
        }
    }

    printf("%lld\n", c);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'scanf' was not declared in this scope
   11 |     scanf("%d %d", &N, &M);
      |     ^~~~~
a.cc:27:5: error: 'printf' was not declared in this scope
   27 |     printf("%lld\n", c);
      |     ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include <vector>
  +++ |+#include <cstdio>
    2 |
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long subCount(long long arr[], long long n, long long k)
{
    // create auxiliary hash array to count frequency
    // of remainders
    long long mod[k];
    memset(mod, 0, sizeof(mod));
 
    // Traverse original array and compute cumulative
    // sum take remainder of this current cumulative
    // sum and increase count by 1 for this remainder
    // in mod[] array
    long long cumSum = 0;
    for (long long i = 0; i < n; i++) {
        cumSum += arr[i];
 
        // as the sum can be negative, taking modulo twice
        mod[((cumSum % k) + k) % k]++;
    }
 
    long long result = 0; // Initialize result
 
    // Traverse mod[]
    for (long long i = 0; i < k; i++)
 
        // If there are more than one prefix subarrays
        // with a particular mod value.
        if (mod[i] > 1)
            result += (mod[i] * (mod[i] - 1)) / 2;
 
    // add the elements which are divisible by k itself
    // i.e., the elements whose sum = 0
    result += mod[0];
 
    return result;
}

int main(){
	long long n,k;
	long long long a[n];
	for(long long i=0;i<n;i++)cin>>a[i];
	cout<<subCount(a,n,k)<<"\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:19: error: 'long long long' is too long for GCC
   41 |         long long long a[n];
      |                   ^~~~
Language: C++

#include<studio.h>
#include<stdlib.h>
int compare(const void *a,const void *b){
return *(int*)a-*(int*)b;
}
int main(){
int n,m,a,sum[111111];
scanf("%d%d",&n,&m);
int i;
for(i=0;i<n;i++){
scanf("%d",&a);
if(i==0)
sum[0]=a;
else{
sum[i]=sum[i-1]+a;
if(sum[i]>=m)
sum[i]-=m;
}
}
qsort(sum,n,sizeof(int),compare);
long count=1,memory=sum[0],ans=0;
for(i=1;i<n;i++){
if(sum[i]!=memory){
ans+=n*(n-1)/2;
count=1;
memory=sum[i];
}
else
count++;
}
ans+=n*(n-1)/2;
printf("%ld\n",ans);
return 0;
}

Compiler output:
a.cc:1:9: fatal error: studio.h: No such file or directory
    1 | #include<studio.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: Java

public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int R;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.R = sc.nextInt();
    }
    
    //解答処理
    private String solve() {
        String answer = "ABC";
        
        if (1200 <= R && R < 2800) {
        	answer = "ARC";
        } else if (2800 <= R) {
        	answer = "AGC";
        }
        
        return answer;
    }
    
    //出力
    public void show(String answer) {
        System.out.println(answer);
    }

}


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws Exception {
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:13: error: class, interface, enum, or record expected
    Main(Scanner sc) {
    ^
Main.java:15: error: class, interface, enum, or record expected
        this.R = sc.nextInt();
        ^
Main.java:16: error: class, interface, enum, or record expected
    }
    ^
Main.java:22: error: class, interface, enum, or record expected
        if (1200 <= R && R < 2800) {
        ^
Main.java:24: error: class, interface, enum, or record expected
        } else if (2800 <= R) {
        ^
Main.java:26: error: class, interface, enum, or record expected
        }
        ^
Main.java:29: error: class, interface, enum, or record expected
    }
    ^
Main.java:36: error: class, interface, enum, or record expected
}
^
9 errors
Language: C++

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

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

#include<iostream>
using namespace std;
int main ()
{
int n ;
cin>>n ;
if (n<1200 ) {
 cout <<ABC ;
}
else if 
 ( n<2800) cout <<ARC ;

else  cout << AGC <<endl ;
return 0 ;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: expected '(' before '{' token
   11 | {
      | ^
      | (
a.cc: At global scope:
a.cc:15:1: error: expected unqualified-id before 'else'
   15 | else
      | ^~~~
a.cc:19:1: error: expected unqualified-id before 'return'
   19 | return 0 ;
      | ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: expected '(' before '{' token
   11 | {
      | ^
      | (
a.cc: At global scope:
a.cc:15:1: error: expected unqualified-id before 'else'
   15 | else
      | ^~~~
a.cc:19:1: error: expected unqualified-id before 'return'
   19 | return 0 ;
      | ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected '(' before '{' token
   10 | else if {
      |         ^
      |         (
a.cc: At global scope:
a.cc:14:1: error: expected unqualified-id before 'else'
   14 | else {
      | ^~~~
a.cc:17:1: error: expected unqualified-id before 'return'
   17 | return 0 ;
      | ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'ABC' was not declared in this scope
    8 |  cout <<ABC ;
      |         ^~~
a.cc:10:9: error: expected '(' before '{' token
   10 | else if {
      |         ^
      |         (
a.cc:13:1: error: 'else' without a previous 'if'
   13 | else {
      | ^~~~
a.cc:14:9: error: 'AGC' was not declared in this scope
   14 | cout << AGC <<endl ;
      |         ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'ABC' was not declared in this scope
    8 |  cout <<ABC ;
      |         ^~~
a.cc:10:9: error: expected '(' before '{' token
   10 | else if {
      |         ^
      |         (
a.cc: At global scope:
a.cc:14:1: error: expected unqualified-id before 'else'
   14 | else {
      | ^~~~
a.cc:17:1: error: expected unqualified-id before 'return'
   17 | return 0 ;
      | ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'ABC' was not declared in this scope
    7 | if (n<1200 ) cout <<ABC ;
      |                     ^~~
a.cc:8:26: error: 'ARC' was not declared in this scope
    8 | else if ( n<2800) cout <<ARC ;
      |                          ^~~
a.cc:9:14: error: 'AGC' was not declared in this scope
    9 | else cout << AGC <<endl ;
      |              ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'ABC' was not declared in this scope
    7 | if (n<1200 ) cout <<ABC ;
      |                     ^~~
a.cc:8:25: error: 'ARC' was not declared in this scope
    8 | else if (n<2800) cout <<ARC ;
      |                         ^~~
a.cc:9:14: error: 'AGC' was not declared in this scope
    9 | else cout << AGC <<endl;
      |              ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'ABC' was not declared in this scope
    7 | if (n<1200 ) cout <<ABC ;
      |                     ^~~
a.cc:8:26: error: 'ARC' was not declared in this scope
    8 | else if ( n<2800) cout <<ARC ;
      |                          ^~~
a.cc:9:14: error: 'AGC' was not declared in this scope
    9 | else cout << AGC <<endl;
      |              ^~~
Language: Java

mport java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int r = sc.nextInt();
		sc.close();

		if (r < 1200) {
			System.out.println("ABC");
		} else if (r < 2800) {
			System.out.println("ARC");
		} else {
			System.out.println("AGC");
		}
	}
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int r;
  cin>>r;
  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:7:24: error: expected ';' before string constant
    7 |   else if (r<2800){cout"ARC"<<endl;}
      |                        ^~~~~
      |                        ;
Language: C++

#include <bits/stdc++.h>

using namespace std;
using Graph = vector<vector<int>>;
using Grid= vector<vector<char>>;
using vin= vector<int>;
using ll=long long;
using vll= vector<ll>;
using vbl=vector<boool>;
using vch=vector<char>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define sort(x) sort(x.begin(), x.end());
#define rese(x) reverse(x.begin(), x.end());

int main() {
  

}

Compiler output:
a.cc:9:18: error: 'boool' was not declared in this scope; did you mean 'bool'?
    9 | using vbl=vector<boool>;
      |                  ^~~~~
      |                  bool
a.cc:9:23: error: template argument 1 is invalid
    9 | using vbl=vector<boool>;
      |                       ^
a.cc:9:23: error: template argument 2 is invalid
Language: Java

import java.lang.reflect.Array;
import java.util.*;
import java.lang.*;

public final class Solution {

    static Scanner in = new Scanner(System.in);

    static int min(int... a) {
        int min = a[0];
        for (int x : a) {
            if (x < min) min = x;
        }
        return min;
    }

    static int max(int... a) {
        int max = a[0];
        for (int x : a) {
            if (x > max) max = x;
        }
        return max;
    }

    static int gcd(int a, int b) {
        int r;
        while (b != 0) {
            r = a % b;
            a = b;
            b = r;
        }
        return a;
    }

    static int[] calcZ(String s) {
        int n = s.length();
        int[] z = new int[(int) n];
        int l = 0, r = 0;
        for (int i = 1; i < n; i++) {
            if (r >= i) z[i] = min(z[i - l], r - i + 1);
            while (z[i] + i < n && s.charAt(z[i]) == s.charAt(z[i] + i)) z[i]++;
            if (i + z[i] - 1 > r) {
                l = i;
                r = i + z[i] - 1;
            }
        }
        return z;
    }

    static int in() {
        return in.nextInt();
    }

    static long inL(){
        return in.nextLong();
    }

    static void println(Object obj) {
        System.out.println(obj);
    }

    static void println() {
        System.out.println();
    }

    static void print(Object obj) {
        System.out.print(obj);
    }

    static int abs(int a) {
        return Math.abs(a);
    }

    static void printf(String s, Object... args) {
        System.out.printf(s, args);
    }

    static void solve() {
        int r = in();
        String ans;
        if (r < 1200) ans = "ABC";
        else if (r < 2800) ans = "ARC";
        else ans = "AGC";
        System.out.println(ans);
    }

    public static void main(String... args) {
        int t = 1;
        //t = in.nextInt();


        while (t-- > 0) {
            solve();
        }
    }
}

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

class Solution {
    public List<List<String>> displayTable(List<List<String>> orders) {
        var r = new ArrayList<ArrayList<String>>();
        
        r.add(new ArrayList<String>());
        
        
    }
}


Compiler output:
Main.java:2: error: cannot find symbol
    public List<List<String>> displayTable(List<List<String>> orders) {
                                           ^
  symbol:   class List
  location: class Solution
Main.java:2: error: cannot find symbol
    public List<List<String>> displayTable(List<List<String>> orders) {
                                                ^
  symbol:   class List
  location: class Solution
Main.java:2: error: cannot find symbol
    public List<List<String>> displayTable(List<List<String>> orders) {
           ^
  symbol:   class List
  location: class Solution
Main.java:2: error: cannot find symbol
    public List<List<String>> displayTable(List<List<String>> orders) {
                ^
  symbol:   class List
  location: class Solution
Main.java:3: error: cannot find symbol
        var r = new ArrayList<ArrayList<String>>();
                    ^
  symbol:   class ArrayList
  location: class Solution
Main.java:3: error: cannot find symbol
        var r = new ArrayList<ArrayList<String>>();
                              ^
  symbol:   class ArrayList
  location: class Solution
Main.java:5: error: cannot find symbol
        r.add(new ArrayList<String>());
                  ^
  symbol:   class ArrayList
  location: class Solution
7 errors
Language: Java

import java.util.Scanner;
import java.util.*;


public class code {

	public static void main(String[] args){
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int intNum = sc.nextInt();

		if(intNum<1200)
		{
			System.out.println("ABC");

			return;
		}

		if(intNum<2800)
		{
			System.out.println("ARC");

			return;
		}

		System.out.println("AGC");


	}

}


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

import java.util.Scanner;


public class code {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int intNum = sc.nextInt();

		if(intNum<1200)
		{
			System.out.println("ABC");

			return;
		}

		if(intNum<2800)
		{
			System.out.println("ARC");

			return;
		}

		System.out.println("AGC");


	}

}


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

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

//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007    //10^9+7:合同式の法
#define MAXR 100000       //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first      //pairの一つ目の要素
#define S second     //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= ll(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= ll(b); i--)
#define FORA(i, I) for (const auto &i : I)

// vector
#define ALL(x) x.begin(), x.end()

// output
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
  cout << a;
  ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
  cout << a << ' ';
  pr(b);
}

int ans = 0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

int main()
{
  cin >> ans;
  if (ans < 1200)
    pr("ABC");
  else if (ans < 2800)
    pr("ARC");
  else
    ipr("AGC");

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:65:5: error: 'ipr' was not declared in this scope; did you mean 'pr'?
   65 |     ipr("AGC");
      |     ^~~
      |     pr
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N ;
  cin >> N ;
  cout << ( N < 1200 ? "ABC" : N <2800 ? "ARC" :"AGC")
    << endl:
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before ':' token
    8 |     << endl:
      |            ^
      |            ;
Language: C++

#include <iostream>
using namespace std;

// Caleb Faith Adnaka XI105
int main() {

    int R;
    cin >> R;
    
    if (R < 1200){
        cout << "ABC\n";
    }
    else if (R < 2800){
        cout << "ARC\n";
    }
    else{
        cout << "AGC\n";
    }


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before '}' token
   12 |     cout<<"AGC"<<endl
      |                      ^
      |                      ;
   13 |     }
      |     ~
Language: C++

#include <iostream>

using namespace std;

int main() {

  cin >> n;
  if(n <= 1800){
    cout << "ABC";
  }else if(n <= 2800){
    cout << "ARC";
  }else{
    cout << "AGC";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'n' was not declared in this scope
    7 |   cin >> n;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define pli pair<ll, int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
#define endl '\n'
const int inf = 1000000007;
const ll INF = 1e18;
// int mod = 998244353;
int mod = 1000000007;
#define abs(x) (x >= 0 ? x : -(x))
#define lb(v, x) (int)(lower_bound(all(v), x) - v.begin())
#define ub(v, x) (int)(upper_bound(all(v), x) - v.begin())
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; }
ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
template<typename T, typename U> T pow_(T a, U b) { return b ? pow_(a * a, b / 2) * (b % 2 ? a : 1) : 1; }
ll modpow(ll a, ll b, ll _mod) { return b ? modpow(a * a % _mod, b / 2, _mod) * (b % 2 ? a : 1) % _mod : 1; }
template<class T, class U> ostream& operator << (ostream& os, const pair<T, U>& p) { os << p.F << " " << p.S; return os; }
template<class T> ostream& operator << (ostream& os, const vector<T>& vec) { rep(i, sz(vec)) { if (i) os << " "; os << vec[i]; } return os; }
template<typename T> inline istream& operator >> (istream& is, vector<T>& v) { rep(j, sz(v)) is >> v[j]; return is; }
template<class T, class T2> inline void add(T &a, T2 b) { a += b % mod; if (a >= mod) a -= mod; }
template<class T> void operator += (vector<T>& v, vector<T> v2) { rep(i, sz(v2)) v.eb(v2[i]); }

void solve();

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(12); // debuged
    int T;
    T = 1;
    while (T--) solve();
}

void solve() {
    int n;
    cin >> n;
    if (n < 1200) cout << "ABC" << endl;
    else cif (n < 2800) cout << "ARC" << endl;
    else cout << "AGC" << endl;
}



Compiler output:
a.cc: In function 'void solve()':
a.cc:51:10: error: 'cif' was not declared in this scope
   51 |     else cif (n < 2800) cout << "ARC" << endl;
      |          ^~~
a.cc:52:5: error: 'else' without a previous 'if'
   52 |     else cout << "AGC" << endl;
      |     ^~~~
Language: C++

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

int main() {
  int a;
  cin >> a;
  if(a < 1200) cout << "ABC\n";
  else of(a < 2800) cout << "ARC\n";
  else cout << "AGC\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'of' was not declared in this scope
    9 |   else of(a < 2800) cout << "ARC\n";
      |        ^~
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else cout << "AGC\n";
      |   ^~~~
Language: C++

#inclulde <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  if (a<1200) {
    cout << "ABC" << endl;
  }
  if (a>=1200 || a<2800) {
    cout << "ARC" << endl;
  }
  if (a > 2799) {
    cout << "AGC" << endl;
  }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclulde; did you mean #include?
    1 | #inclulde <bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclulde <bits/stdc++.h>
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout << "ABC" << endl;
      |     ^~~~
a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:22: error: 'endl' was not declared in this scope
    7 |     cout << "ABC" << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inclulde <bits/stdc++.h>
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout << "ARC" << endl;
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:22: error: 'endl' was not declared in this scope
   10 |     cout << "ARC" << endl;
      |                      ^~~~
a.cc:10:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << "AGC" << endl;
      |     ^~~~
a.cc:13:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:22: error: 'endl' was not declared in this scope
   13 |     cout << "AGC" << endl;
      |                      ^~~~
a.cc:13:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expected ';' before 'cout'
   12 |     else(r <2800) cout<<"ARC";
      |                  ^~~~~
      |                  ;
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else cout<<"AGC";
      |     ^~~~
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:8:22: error: expected ';' before 'printf'
    8 |         else (R>2800)printf("ARC\n");
      |                      ^~~~~~
      |                      ;
main.c:9:9: error: 'else' without a previous 'if'
    9 |         else printf("AGC\n");
      |         ^~~~
Language: Java

import java.util.Scanner;

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:3: 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;

public class App {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        final int iNum = sc.nextInt();
        String sResult;
        if (iNum < 1200) {
            sResult = "ABC";
        } else if (iNum < 2800) {
            sResult = "ARC";
        } else {
            sResult = "AGC";
        }
        System.out.print(sResult);
    }
}


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

import java.util.Scanner;

public class Main {

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

		}
	}


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

#include <bits/stdc++.h>
#define INF 2e9
#define MOD 1000000007
#define MOD9 998244353
#define intMAX 51000;
#define PI 3.14159265359
using namespace std;
typedef long long llong;
// typedef long double ldouble;

using Graph = vector<vector<int>>;

// int ctoi(const char c){
//   if('0' <= c && c <= '9') return (c-'0');
//   return -1;
// }

// int gcd(int a, int b){
//   int ma = max(a,b);
//   int mi = min(a,b);
//   if(mi == 0) return ma;

//   return gcd(mi, ma%mi);
// }

// llong POW(llong a, llong b){
//   if(b == 0) return 1;
//   else{
//     if(b%2 == 0) return POW(a * a % MOD, b / 2) % MOD;
//     else return a * POW(a * a % MOD, b / 2) % MOD;
//   }
// }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:38:24: error: 'ARC' was not declared in this scope
   38 |   else if(1200 <= R && ARC < 2800) cout << "ARC" << endl;
      |                        ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define All(a) a.begin(),a.end()
#define INF 1000000007
const int MOD = 1000000007;
//accumulate(vec.begin(), vec.end(), 0)
//std::sort(v.begin(), v.end(), std::greater<Type>());
//set_intersection(x, x+7, y, y+6, back_inserter(v));
//set_union(x, x+7, y, y+6, back_inserter(v));
//set_difference(x, x+7, y, y+6, back_inserter(v));

int gcd(int x,int y){
  if(x%y==0) return y;
  else return gcd(y,x%y);
}

bool isPrime(int n){
  if(n < 2) return false;
  else if(n == 2) return true;
  else if(n%2==0) return false;

  for(int i=3;i<=sqrt(n);i++){
    if(n%i==0) return false;
  }
  return true;
}


int main(){
  int r;
  cin >> r:
  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:33:11: error: expected ';' before ':' token
   33 |   cin >> r:
      |           ^
      |           ;
a.cc:35:3: error: 'else' without a previous 'if'
   35 |   else if(r<2800) cout<< "ARC" <<endl;
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define All(a) a.begin(),a.end()
#define INF 1000000007
const int MOD = 1000000007;
//accumulate(vec.begin(), vec.end(), 0)
//std::sort(v.begin(), v.end(), std::greater<Type>());
//set_intersection(x, x+7, y, y+6, back_inserter(v));
//set_union(x, x+7, y, y+6, back_inserter(v));
//set_difference(x, x+7, y, y+6, back_inserter(v));

int gcd(int x,int y){
  if(x%y==0) return y;
  else return gcd(y,x%y);
}

bool isPrime(int n){
  if(n < 2) return false;
  else if(n == 2) return true;
  else if(n%2==0) return false;

  for(int i=3;i<=sqrt(n);i++){
    if(n%i==0) return false;
  }
  return true;
}

int main(){
  int n;
  ll ans = 0;
  cin >> n;
  for(int i=0;i<n;i++){
    int a;
    cin >> a;
    ans += (a-1);
  }
  cout<< ans <<endl;
}

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

Compiler output:
a.cc:42:5: error: redefinition of 'int main()'
   42 | int main(){
      |     ^~~~
a.cc:30:5: note: 'int main()' previously defined here
   30 | int main(){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:44:11: error: expected ';' before ':' token
   44 |   cin >> r:
      |           ^
      |           ;
a.cc:46:3: error: 'else' without a previous 'if'
   46 |   else if(r<2800) cout<< "ARC" <<endl;
      |   ^~~~
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:18: error: expected ';' before '}' token
   12 |     cout << "AGC"
      |                  ^
      |                  ;
   13 | }
      | ~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   14 |     return;
      |     ^~~~~~
Language: Java

import java.util.Scanner;
public class Thur0514 {

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

}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'cotu' was not declared in this scope
    8 |   else if(r<2800) cotu << "ARC" << endl;
      |                   ^~~~
Language: C++

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

int main() {
  int R;
  cin>>R;
  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:11:9: error: expected ';' before string constant
   11 |     cout"ARC"<<endl;
      |         ^~~~~
      |         ;
Language: C++

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

int main() {
  int A;
  cin >> A;
  if(A > 1200){
    cout << "ABC" << endl;
  }

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


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

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

int main() {
  int A;
  cin >> A;
  if(A > 1200){
    cout << "ABC" << endl;
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: expected primary-expression before '<' token
   11 |   if (< A < 2800 && A => 1200){
      |       ^
a.cc:11:24: error: expected primary-expression before '>' token
   11 |   if (< A < 2800 && A => 1200){
      |                        ^
Language: C++

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

int main() {
  int A;
  cin >> A;
  if(A > 1200){
    cout << "ABC" << endl;
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: expected primary-expression before '<' token
   11 |   if (< A > 2800 && A =< 1200){
      |       ^
a.cc:11:24: error: expected primary-expression before '<' token
   11 |   if (< A > 2800 && A =< 1200){
      |                        ^
Language: C++

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

int main(){
  cin >> r;
  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:5:10: error: 'r' was not declared in this scope
    5 |   cin >> r;
      |          ^
Language: C++

#include<bits/stdc++.h>
#define INF 2000000000
#define MOD 1000000007
#define EPS (1e-10)

using namespace std;

int main(int argc, char *argv[]) {

	int N; cin >> N;

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


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:8:34: note: to match this '{'
    8 | int main(int argc, char *argv[]) {
      |                                  ^
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int D = Integer.parseInt(sc.next());
    int G = Integer.parseInt(sc.next());
    int[] p = new int[D];
    int[] c = new int[D];

    for (int i=0; i < D; i++) {
      p[i] = Integer.parseInt(sc.next());
      c[i] = Integer.parseInt(sc.next());
    }
    int min = Integer.MAX_VALUE;
    out : for(int i=0; i<Math.pow(2,D); i++){
      boolean flag[] = new boolean[D];
      Arrays.fill(flag, false);
      int sum = 0; // 点数の合計
      int num = 0;//  解いた問題の合計
      for(int j=0; j<D; j++){
        if((i>>j&1)==1){
          num = num + p[j];
          sum = sum + p[j]*(j+1)*100 + c[j];
          flag[j] = true;
        }
      }
      if(sum >= G ){
        min = Math.min(min, num);
        continue out;
      }
      in : for(int j=D-1; j>=0; j--){
        if(!flag[j]){
					for(int k = 1; k < p[j] -1 ; k++) {
						sum += 100 * (j+1);
						num++;
						if(sum >= G) {
							min = Math.min(min, num);
							break in;
						}
          }    
        }    
        
      }
		// 	in : for(int j = 0; j < D; j++) {
		// 		if(!flag[D - 1 - j]) {
		// 			for(int k = 0; k < p[D - 1 - j]; k++) {
		// 				sum += 100 * (D - j);
		// 				num++;
		// 				if(sum >= G) {
		// 					min = Math.min(num, min);
    //           break in;
    //         }
		// 			}
		// 		}
		// 	}
    // }
    System.out.println(min);
    return;
  }
}




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

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#include <math.h>
#include <queue>
#include <deque>
#include <map>
const int MOD = 1e9+7;
typedef long long ll;
using namespace std;

bool key[100000][13];


int main(){
	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:21:24: error: expected ';' before 'cout'
   21 |         else (r < 2800) cout << "ARC" << endl;
      |                        ^~~~~
      |                        ;
a.cc:22:9: error: 'else' without a previous 'if'
   22 |         else cout << "AGC" << endl;
      |         ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'return'
    9 |  else cout<<"AGC"
      |                  ^
      |                  ;
   10 | return 0;
      | ~~~~~~
Language: C

#include<stdio.h>
int main(void){
  int r;
  scanf("%d",&r);
  char ans[101];
  if(r<1200){
    ans="ABC";
  }else if(r<2800){
    ans="ARC";
  }else{
    ans="AGC";
  }
  printf("%s",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:8: error: assignment to expression with array type
    7 |     ans="ABC";
      |        ^
main.c:9:8: error: assignment to expression with array type
    9 |     ans="ARC";
      |        ^
main.c:11:8: error: assignment to expression with array type
   11 |     ans="AGC";
      |        ^