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

#include<iostream>
#include<string>

string s;

int main(){
  cin >> s;
  int n = stoi(s.substr(3));
  if(n < 1000) puts("ABC");
  else puts("ABD");
  return 0;
}

Compiler output:
a.cc:4:1: error: 'string' does not name a type; did you mean 'stdin'?
    4 | string s;
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> s;
      |   ^~~
      |   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
      |                  ^~~
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:8:11: error: 'stoi' was not declared in this scope; did you mean 'std::__cxx11::stoi'?
    8 |   int n = stoi(s.substr(3));
      |           ^~~~
      |           std::__cxx11::stoi
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/basic_string.h:4432:3: note: 'std::__cxx11::stoi' declared here
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
Language: C

int i;
scanf("%d",i);
if（i>999）printf("ABD");
else printf("ABC")

Compiler output:
main.c:2:7: error: expected declaration specifiers or '...' before string constant
    2 | scanf("%d",i);
      |       ^~~~
main.c:2:12: error: expected declaration specifiers or '...' before 'i'
    2 | scanf("%d",i);
      |            ^
main.c:3:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '>' token
    3 | if（i>999）printf("ABD");
      |      ^
main.c:3:7: error: invalid suffix "）printf" on integer constant
    3 | if（i>999）printf("ABD");
      |       ^~~~~~~~~~~
main.c:4:1: error: expected identifier or '(' before 'else'
    4 | else printf("ABC")
      | ^~~~
Language: C++

#include <algorithm>
#include <math.h> 
#include <string>
#include <iomanip>
#include <queue>
using namespace std;
int main(){
    int n;
    cin >> n;
    if(n > 999) cout << "ABD" << endl;
    if(n <= 999) cout << "ABC" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> n;
      |     ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include <queue>
  +++ |+#include <iostream>
    6 | using namespace std;
a.cc:10:17: error: 'cout' was not declared in this scope
   10 |     if(n > 999) cout << "ABD" << endl;
      |                 ^~~~
a.cc:10:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:18: error: 'cout' was not declared in this scope
   11 |     if(n <= 999) cout << "ABC" << endl;
      |                  ^~~~
a.cc:11:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main (void){
    int N
    cin >> N;
        if(N<1000)
            cout << "ABD" << endl;
        else
            cout << "ABC" << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected initializer before 'cin'
    5 |     cin >> N;
      |     ^~~
a.cc:6:12: error: 'N' was not declared in this scope
    6 |         if(N<1000)
      |            ^
Language: C++

import itertools

n, c = map(int, input().split())
color = [list(map(int, input().split()))for i in range(c)]  
grid = [list(map(int, input().split()))for i in range(n)]  
ans = 1000000000
cnt = 0
li = []
for i in range(c):
    li.append(i+1)
for mark in list(itertools.permutations(li, 3)):
    x = mark[0]  
    y = mark[1]
    z = mark[2]
    for i in range(n):
        for j in range(n):
            if (i+j) % 3 == 0:
                cnt += color[grid[i][j]-1][x-1]
            elif (i+j) % 3 == 1:
                cnt += color[grid[i][j]-1][y-1]
            elif (i+j) % 3 == 2:
                cnt += color[grid[i][j]-1][z-1]
    if cnt < ans:
        ans = cnt
    cnt = 0
print(ans)




Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import itertools
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
	ll n,d,a,s=0,td;
	cin>>n;
	string t=n+'0';
	d=n-pow(9,t.size());
	td=d;
	s+=t.size();
	int i=1;
	while(pow(6,i)>=d)
	{
		td=d-pow(6,i);
		i++;
	}
	s+=i;
	s+=td;
	cout<<s<<endl; 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: conversion from 'll' {aka 'long long int'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |         string t=n+'0';
      |                  ~^~~~
Language: C++

#include <iostrem>
using namespace std;

int main()
{
    int i;

    cin >> i;

    if (i < 1000){
        cout << "ABC" << endl;
    }
    else {
        cout << "ABD" << endl;
    }
    return 0;
}

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

int main(void)
{
    int n;
    scanf("%d",&n);
    if(n<1000) printf("ABC\n");
    else printf("ABD\n");

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'scanf' was not declared in this scope
    4 |     scanf("%d",&n);
      |     ^~~~~
a.cc:5:16: error: 'printf' was not declared in this scope
    5 |     if(n<1000) printf("ABC\n");
      |                ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
a.cc:6:10: error: 'printf' was not declared in this scope
    6 |     else printf("ABD\n");
      |          ^~~~~~
a.cc:6:10: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#inclue <iostream>
using namespace std;

int main(){
int N;
cin >> N;
if(N>=1 && N<=999){
cout << "ABC\n";
}
else if(N>=1000 && N<=1998){
cout << "ABD\n";
}
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue <iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin >> N;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclue <iostream>
a.cc:8:1: error: 'cout' was not declared in this scope
    8 | cout << "ABC\n";
      | ^~~~
a.cc:8:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:1: error: 'cout' was not declared in this scope
   11 | cout << "ABD\n";
      | ^~~~
a.cc:11:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include <stdio.h>
int main(){
 int n;
  scanf("%d",&n);
  if(n<999){
   printf(""ABC); 
  }
  else{
   printf("ABD"); 
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: expected ')' before 'ABC'
    6 |    printf(""ABC);
      |          ~  ^~~
      |             )
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int a;
    cin >> a;
    if(a<1000)
        cout << "ABC"
    else 
        cout << "ABD"
}


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

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

int main{ 
int n;
cin >> n;
if(n<1000)cout << "ABD"<< endl;
else cout << "ABC" << endl;
return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:1: error: expected primary-expression before 'int'
    5 | int n;
      | ^~~
a.cc:5:1: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> n;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'if'
    7 | if(n<1000)cout << "ABD"<< endl;
      | ^~
a.cc:8:1: error: expected unqualified-id before 'else'
    8 | else cout << "ABC" << endl;
      | ^~~~
a.cc:9:1: error: expected unqualified-id before 'return'
    9 | return 0;
      | ^~~~~~
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

#include<iostream>

int main(){ 
int n;
cin >> n;
if(n<1000)cout << "ABD"<< endl;
else cout << "ABC" << endl;
return 0;
}

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 >> n;
      | ^~~
      | 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
      |                  ^~~
a.cc:6:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 | if(n<1000)cout << "ABD"<< endl;
      |           ^~~~
      |           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 | if(n<1000)cout << "ABD"<< endl;
      |                           ^~~~
      |                           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:7:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 | else cout << "ABC" << endl;
      |      ^~~~
      |      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 | else cout << "ABC" << endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;

using pll = pair<ll, ll>;
using vll = vector<ll>;
using vpll = vector<pll>;
using gr = vector<vll>;
using wgr = vector<vpll>;

#define pb push_back
#define FOR(i, m, n) for (ll i(m); i < n; i++)
#define REP(i, n) FOR(i, 0, n)
#define F(n) REP(i, n)
#define FF(n) REP(j, n)
struct d_ {
    template<typename T> d_ & operator ,(const T & x) { cerr << ' ' <<  x; return *this;}
    template<typename T> d_ & operator ,(const vector<T> & x) { for(auto x: x) cerr << ' ' <<  x; return *this;}
} d_t;
#define dbg(args ...) { d_t,"|",__LINE__,"|",":",args,"\n"; }
#define EPS (1e-10)
#define INF (1LL<<61)
#define CL(A,I) (memset(A,I,sizeof(A)))
#define all(x) begin(x),end(x)
#define IN(n) ll n;cin >> n;
#define x first
#define y second

int main(void) {
    ios_base::sync_with_stdio(false);
    int n; cin >> n;
    if(n>999) cout << "ABD" << endl;
    else cout << "ABC" << enld;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:27: error: 'enld' was not declared in this scope
   36 |     else cout << "ABC" << enld;
      |                           ^~~~
Language: C++

include <iostream>
int main() {
int N;
std::cin >> N;
if(N<=999) {
std::cout << "ABC" << std::endl;
}
else {
std::cout  << "ABD" << std::endl;
}
 return 0;
 }


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
Language: C++

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

int main(void) {
  int N;
  cin >> N;
  if(N < 10000) cout << "ABC";
  else cout << "ABD";
  cout << endl;
}

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

#include<stdio.h>
int main(void)
{
        int n;
        scanf("%d",&n);
        if(n>=1)&&(n<=999) printf("ABC\n");
        else printf("ABD\n");
        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected identifier before '(' token
    6 |         if(n>=1)&&(n<=999) printf("ABC\n");
      |                   ^
Language: C++

#include<stdio.h>

using namespace std;

int main()
{
 int n;
  cin>>n;
  if(n<1000)
    cout<<"ABC"<<endl;
  else
    cout<<"ABD"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>n;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdio.h>
  +++ |+#include <iostream>
    2 | 
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout<<"ABC"<<endl;
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:18: error: 'endl' was not declared in this scope
   10 |     cout<<"ABC"<<endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<stdio.h>
  +++ |+#include <ostream>
    2 | 
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout<<"ABD"<<endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:18: error: 'endl' was not declared in this scope
   12 |     cout<<"ABD"<<endl;
      |                  ^~~~
a.cc:12:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);    //整数の入力
      int N = sc.nextInt();
      if(N <= 8 999){
        System.out.println("ABC");
      } else {
        System.out.println("ABD");
      }
  }
} 

Compiler output:
Main.java:6: error: ')' expected
      if(N <= 8 999){
               ^
Main.java:6: error: not a statement
      if(N <= 8 999){
                ^
Main.java:6: error: ';' expected
      if(N <= 8 999){
                   ^
Main.java:8: error: 'else' without 'if'
      } else {
        ^
4 errors
Language: C++

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

int main() {
  int n;
  cin >> n;
  if (N <= 999) puts("ABC");
  else puts("ABD");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'N' was not declared in this scope
   11 |   if (N <= 999) puts("ABC");
      |       ^
Language: Java

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

if(n<=999){
System.out.println(“ABC”);
}else {
System.out.println(“ABD”);
}

}
}




Compiler output:
Main.java:9: error: illegal character: '\u201c'
System.out.println(?ABC?);
                   ^
Main.java:9: error: illegal character: '\u201d'
System.out.println(?ABC?);
                       ^
Main.java:9: error: not a statement
System.out.println(?ABC?);
                    ^
Main.java:11: error: illegal character: '\u201c'
System.out.println(?ABD?);
                   ^
Main.java:11: error: illegal character: '\u201d'
System.out.println(?ABD?);
                       ^
Main.java:11: error: not a statement
System.out.println(?ABD?);
                    ^
6 errors
Language: Java

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

if(n<=999){
System.out.println(“ABC”);
}else {
System.out.println(“ABD”);
}

}
}


Compiler output:
Main.java:9: error: illegal character: '\u201c'
System.out.println(?ABC?);
                   ^
Main.java:9: error: illegal character: '\u201d'
System.out.println(?ABC?);
                       ^
Main.java:9: error: not a statement
System.out.println(?ABC?);
                    ^
Main.java:11: error: illegal character: '\u201c'
System.out.println(?ABD?);
                   ^
Main.java:11: error: illegal character: '\u201d'
System.out.println(?ABD?);
                       ^
Main.java:11: error: not a statement
System.out.println(?ABD?);
                    ^
6 errors
Language: Java

import java.util.*;
 
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n=Integer.parseInt(sc.next);
 
if(n<=999){
System.out.println(“ABC”);
}else {
System.out.println(“ABD”);
}
}
import java.util.*;

public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n=Integer.parseInt(sc.next);

if(n<=999){
System.out.println(“ABC”);
}else {
System.out.println(“ABD”);
}
}
}

Compiler output:
Main.java:9: error: illegal character: '\u201c'
System.out.println(?ABC?);
                   ^
Main.java:9: error: illegal character: '\u201d'
System.out.println(?ABC?);
                       ^
Main.java:9: error: not a statement
System.out.println(?ABC?);
                    ^
Main.java:11: error: illegal character: '\u201c'
System.out.println(?ABD?);
                   ^
Main.java:11: error: illegal character: '\u201d'
System.out.println(?ABD?);
                       ^
Main.java:11: error: not a statement
System.out.println(?ABD?);
                    ^
Main.java:14: error: illegal start of type
import java.util.*;
^
Main.java:14: error: <identifier> expected
import java.util.*;
                 ^
Main.java:22: error: illegal character: '\u201c'
System.out.println(?ABC?);
                   ^
Main.java:22: error: illegal character: '\u201d'
System.out.println(?ABC?);
                       ^
Main.java:22: error: not a statement
System.out.println(?ABC?);
                    ^
Main.java:24: error: illegal character: '\u201c'
System.out.println(?ABD?);
                   ^
Main.java:24: error: illegal character: '\u201d'
System.out.println(?ABD?);
                       ^
Main.java:24: error: not a statement
System.out.println(?ABD?);
                    ^
Main.java:27: error: reached end of file while parsing
}
 ^
15 errors
Language: Java

import java.util.*;

public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n=Integer.parseInt(sc.next);

if(n<=999){
System.out.println(“ABC”);
}else {
System.out.println(“ABD”);
}
}

Compiler output:
Main.java:9: error: illegal character: '\u201c'
System.out.println(?ABC?);
                   ^
Main.java:9: error: illegal character: '\u201d'
System.out.println(?ABC?);
                       ^
Main.java:9: error: not a statement
System.out.println(?ABC?);
                    ^
Main.java:11: error: illegal character: '\u201c'
System.out.println(?ABD?);
                   ^
Main.java:11: error: illegal character: '\u201d'
System.out.println(?ABD?);
                       ^
Main.java:11: error: not a statement
System.out.println(?ABD?);
                    ^
Main.java:13: error: reached end of file while parsing
}
 ^
7 errors
Language: C++

#include <iostream>
using namespace std;

int main() {
    cin >> n;
    if (n >= 1000) {
        cout << "ABD" << endl;
    }
    else 
        cout << "ABC" << endl;
    return 0;
}

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

#inclide<iostream>
using namespace std;
int main(){
int a,b;
int c=a*a/2-a*b+b*b/2-a/2+b/2;
cin>>a>>b;
cout<<c-b<<endl;
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclide; did you mean #include?
    1 | #inclide<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin>>a>>b;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclide<iostream>
a.cc:7:1: error: 'cout' was not declared in this scope
    7 | cout<<c-b<<endl;
      | ^~~~
a.cc:7:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:12: error: 'endl' was not declared in this scope
    7 | cout<<c-b<<endl;
      |            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inclide<iostream>
Language: C++

#include <iostream>
using namespace std;


int main() {
    int a, b, x;
    cin >> a >> b;
    int lower = 0;
    for (int i = 1; i < b - a; ++i) {
        lower += i;
    }
    cout << lower - al;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'al' was not declared in this scope; did you mean 'a'?
   12 |     cout << lower - al;
      |                     ^~
      |                     a
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define MAXN 3
#define MAXN 31
#define INF 0x3f3f3f3f
using namespace std;
int N, C;
int grid[MAXN][MAXN], ans[MAXM][MAXN];
ll good = INF;

int main () {
cin >> N >> C;
for (int i=1; i<=C; i++) {
for (int j=1; j<=C; j++) {
cin >> grid[i][j];
}
}
for (int i=1, x; i<=N; i++) {
for (int j=1; j<=N; j++) {
cin >> x;
for (int k=1; k<=C; k++)  ans[(i + j) % 3][k] += x;
}
}
for (int i=1; i<=C; i++) {
for (int j=1; j<=C; j++) {
for (int k=1; k<=C; k++) {
if (i == j || i == k || j == k) continue;
good = min(good, ans[0][i] + ans[1][j] + ans[2][k]);
}
}
}
cout << good << endl;
  return 0;
}

Compiler output:
a.cc:4:9: warning: "MAXN" redefined
    4 | #define MAXN 31
      |         ^~~~
a.cc:3:9: note: this is the location of the previous definition
    3 | #define MAXN 3
      |         ^~~~
a.cc:8:27: error: 'MAXM' was not declared in this scope; did you mean 'MAXN'?
    8 | int grid[MAXN][MAXN], ans[MAXM][MAXN];
      |                           ^~~~
      |                           MAXN
a.cc: In function 'int main()':
a.cc:21:27: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 | for (int k=1; k<=C; k++)  ans[(i + j) % 3][k] += x;
      |                           ^~~
      |                           abs
a.cc:28:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 | good = min(good, ans[0][i] + ans[1][j] + ans[2][k]);
      |                  ^~~
      |                  abs
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define MAXN 100010
#define INF 0x3f3f3f3f
using namespace std;
int N, C;
int grid[MAXN][MAXN], ans[MAXN][MAXN];
ll good = INF;

int main () {
cin >> N >> C;
for (int i=1; i<=C; i++) {
for (int j=1; j<=C; j++) {
cin >> grid[i][j];
}
}
for (int i=1, x; i<=N; i++) {
for (int j=1; j<=N; j++) {
cin >> x;
for (int k=1; k<=C; k++)  ans[(i + j) % 3][k] += x;
}
}
for (int i=1; i<=C; i++) {
for (int j=1; j<=C; j++) {
for (int k=1; k<=C; k++) {
if (i == j || i == k || j == k) continue;
good = min(good, ans[0][i] + ans[1][j] + ans[2][k]);
}
}
}
cout << good << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: no matching function for call to 'min(long long int&, int)'
   27 | good = min(good, ans[0][i] + ans[1][j] + ans[2][k]);
      |        ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:27:11: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   27 | good = min(good, ans[0][i] + ans[1][j] + ans[2][k]);
      |        ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:27:11: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   27 | good = min(good, ans[0][i] + ans[1][j] + ans[2][k]);
      |        ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(void){
    int n;
    cin >> n;
    if(n < 1000){
        cout << "ABC";
    }else{
        cout << "ABD"
    }
    return 0;
}


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


import java.util.Scanner;

public class main{

	public static void main(String[] args) {
		
		Scanner sin = new Scanner(System.in);
		int n = sin.nextInt();
		if(n<=999) {
			System.out.println("ABC");
		}
		else {
			System.out.println("ABD");
		}
		

	}

}


Compiler output:
Main.java:4: 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 ABC {

	public static void main(String[] args) {
		
		Scanner sin = new Scanner(System.in);
		int n = sin.nextInt();
		if(n<=999) {
			System.out.println("ABC");
		}
		else {
			System.out.println("ABD");
		}
		

	}

}


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

#include<stdio.h>
int main()
{int a,b;
 scanf("%d %d",&a &b);
  int j=0;

for(int i=1;i<=b-a;i++)
{ j=j+i;}
printf("%d",j-b);
return 0;}
  







Compiler output:
main.c: In function 'main':
main.c:4:19: error: invalid operands to binary & (have 'int *' and 'int')
    4 |  scanf("%d %d",&a &b);
      |                ~~ ^
      |                |
      |                int *
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <cmath>
#include <sstream>
#include <map>
#include <deque>
#include <queue>
#include <set>
using namespace std;
int main(){
	int n;
	cin>>n;
	if(n<=999) cout<<"ABC"<<endal;
	else cout<<"ABD"<<endl; 
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: 'endal' was not declared in this scope
   16 |         if(n<=999) cout<<"ABC"<<endal;
      |                                 ^~~~~
Language: C++

# include < cstdio >
# define rep (i , n ) for ( int i =0; i < n ; i ++)
int N ,C , X ;
int D [30][39];
int t [3][30];
int main ()
{
scanf ("% d % d " ,&N ,& C );
rep (i , C ) rep (j , C ) scanf ("% d " ,& D [ i ][ j ]);
rep (i , N ) rep (j , N ) scanf ("% d " ,& X ) , t [( i + j )%3][ X -1]++;
int res =1 < <30;
rep (i , C ) 
{
int tt =0;
rep (l , C ) tt += D [ l ][ i ]* t [0][ l ];
rep (l , C ) tt += D [ l ][ i ]* t [1][ l ];
rep (l , C ) tt += D [ l ][ i ]* t [2][ l ];
if ( tt < res ) res = tt ;
}
printf ("% d \ n " , res );
}

Compiler output:
a.cc:1:11: fatal error:  cstdio : No such file or directory
    1 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.
Language: C

include<stdio.h>

int main(void){
	int a,b,c,i,a1 = 0;
	scanf("%d",&a);
	scanf("%d",&b);

	c = b - a;

	for(i = 1;i <= c;i++){
		a1 = a1 + i;
	}

	printf("%d",a1 - b);


	return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include<stdio.h>

int main{
	int N;
	scanf("%d",&N);
	if (N >= 1 && N <1000)
		printf("ABC");
	else if (N >= 1000 && N <1999)
		printf("ABD");

	return 0;
}

Compiler output:
main.c:3:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | int main{
      |         ^
Language: C++

int main(){
int a;
cin >> a;
cout << ((a<1000)? "ABC":"ABD") << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:1: error: 'cin' was not declared in this scope
    3 | cin >> a;
      | ^~~
a.cc:4:1: error: 'cout' was not declared in this scope
    4 | cout << ((a<1000)? "ABC":"ABD") << endl;
      | ^~~~
a.cc:4:36: error: 'endl' was not declared in this scope
    4 | cout << ((a<1000)? "ABC":"ABD") << endl;
      |                                    ^~~~
Language: Java

port java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int ans = solve2(a, b);
        System.out.println(ans);
    }

    private static int solve(int a, int b) {
        int d = b - a;
        int sum = 0;

        for (int i=1; i<d; i++) {
            sum += i;
        }

        return sum - a;
    }

    private static int solve2(int a, int b) {
        int d = b-a;

        return d*(d-1)/2;
    }
}


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

    import java.util.Scanner;
     
    public class Main{
        public static void main(String[] args){
            Scanner input = new Scanner(System.in);
            
            while(input.hasNext()){
                 int round = input.nextInt();
     
                 if(round > 999){
                     System.out.println("ABC");
                 } else {
                     System.out.println("ABD");
                 }
            }
        }
    }

import java.util.Scanner;

public class Main{
    public static void Main(String[] args){
        Scanner input = new Scanner(System.in);
        
        while(input.hasNext()){
             int round = input.nextInt();

             if(round > 999){
                 System.out.println("ABC");
             } else {
                 System.out.println("ABD");
             }
        }
    }
}



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

#include <cstdio > int N; int main() { scanf("%d",&N); if(N<=999)puts("ABC"); else puts("ABD"); }


Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | #include <cstdio > int N; int main() { scanf("%d",&N); if(N<=999)puts("ABC"); else puts("ABD"); }
      |                    ^~~
main.c:1:10: fatal error: cstdio : No such file or directory
    1 | #include <cstdio > int N; int main() { scanf("%d",&N); if(N<=999)puts("ABC"); else puts("ABD"); }
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#inlcude <stdio.h>
int main()
{
  int n; scanf("%d",&n);
  if(n<1000) return !printf("ABC");
  return !printf("ABD");

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude <stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:10: error: 'scanf' was not declared in this scope
    4 |   int n; scanf("%d",&n);
      |          ^~~~~
a.cc:5:22: error: 'printf' was not declared in this scope
    5 |   if(n<1000) return !printf("ABC");
      |                      ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #inlcude <stdio.h>
a.cc:6:11: error: 'printf' was not declared in this scope
    6 |   return !printf("ABD");
      |           ^~~~~~
a.cc:6:11: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:6:25: error: expected '}' at end of input
    6 |   return !printf("ABD");
      |                         ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <iostream>

int main(void) 
{
	int inN ;
	cin >> inN ;

	if (inN < 1 || inN > 1998) {
		cout << "error\n" ;
		return -1 ;
	}

	if (inN <= 999)
		cout << "ABC\n" ;
	else
		cout << "ABD\n" ;

	return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> inN ;
      |         ^~~
      |         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
      |                  ^~~
a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |                 cout << "error\n" ;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |                 cout << "ABC\n" ;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |                 cout << "ABD\n" ;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>

int main(void) 
{
	int inN ;
	cin << inN ;

	if (inN < 1 || inN > 1998) {
		cout >> "error\n" ;
		return -1 ;
	}
	
	if (inN <= 999)
		cout >> "ABC\n" ;
	else
		cout >> "ABD\n" ;

	return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin << inN ;
      |         ^~~
      |         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
      |                  ^~~
a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |                 cout >> "error\n" ;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |                 cout >> "ABC\n" ;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |                 cout >> "ABD\n" ;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
	int a[30000];
	int n,x;
	for(int i=0;i<30000;i++){
		cin>>n>>x;
		if (n=0&&x=0){
			break;
		}
		for(int j=0;j
	return 0;
}		
		


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: lvalue required as left operand of assignment
    8 |                 if (n=0&&x=0){
      |                       ~^~~
a.cc:11:30: error: expected ';' before 'return'
   11 |                 for(int j=0;j
      |                              ^
      |                              ;
   12 |         return 0;
      |         ~~~~~~                
a.cc:12:9: error: expected primary-expression before 'return'
   12 |         return 0;
      |         ^~~~~~
a.cc:11:30: error: expected ')' before 'return'
   11 |                 for(int j=0;j
      |                    ~         ^
      |                              )
   12 |         return 0;
      |         ~~~~~~                
a.cc:13:8: error: expected '}' at end of input
   13 | }
      |  ^      
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#inlclude <iostream>
using namespace std;
 
int main(){
  int n;
  cin>>n;
  ((n<1000)? cout<<"ABC"<<endl : cout<<"ABD"<<endl);
  return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlclude; did you mean #include?
    1 | #inlclude <iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlclude <iostream>
a.cc:7:14: error: 'cout' was not declared in this scope
    7 |   ((n<1000)? cout<<"ABC"<<endl : cout<<"ABD"<<endl);
      |              ^~~~
a.cc:7:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:27: error: 'endl' was not declared in this scope
    7 |   ((n<1000)? cout<<"ABC"<<endl : cout<<"ABD"<<endl);
      |                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inlclude <iostream>
Language: C++

#inlclude <iostrream>
using namespace std;

int main(){
  int n;
  cin>>n;
  ((n<1000)? cout<<"ABC"<<endl : cout<<"ABD"<<endl);
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlclude; did you mean #include?
    1 | #inlclude <iostrream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlclude <iostrream>
a.cc:7:14: error: 'cout' was not declared in this scope
    7 |   ((n<1000)? cout<<"ABC"<<endl : cout<<"ABD"<<endl);
      |              ^~~~
a.cc:7:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:27: error: 'endl' was not declared in this scope
    7 |   ((n<1000)? cout<<"ABC"<<endl : cout<<"ABD"<<endl);
      |                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inlclude <iostrream>
Language: C++

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

int main(){
    int a;
    cin>>a;
    if(a<1000) cout<<'ABC'
    else cout<<'ABD';

    return 0;
}

Compiler output:
a.cc:7:22: warning: multi-character character constant [-Wmultichar]
    7 |     if(a<1000) cout<<'ABC'
      |                      ^~~~~
a.cc:8:16: warning: multi-character character constant [-Wmultichar]
    8 |     else cout<<'ABD';
      |                ^~~~~
a.cc: In function 'int main()':
a.cc:7:27: error: expected ';' before 'else'
    7 |     if(a<1000) cout<<'ABC'
      |                           ^
      |                           ;
    8 |     else cout<<'ABD';
      |     ~~~~
Language: C++

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

void main(void){
    int N; cin>>N;
    if(N<1000) cout<<"ABC"<<endl;
    else cout<<"ABD"<<endl;

}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(void){
      | ^~~~
Language: C++

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

void main(void){
    int N; cin>>N;
    if(N<1000) cout<<"ABC"<<endl;
    else cout<<"ABD"<<endl;

}

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

# include < cstdio >
int N ;
int main ()
{
scanf ("% d " ,& N );
int res = N ;
for ( int i =0; i <= N ; i ++)
{
int cc =0;
int t = i ;
while (t >0) cc += t %6 , t /=6;
t=N - i ;
while (t >0) cc += t %9 , t /=9;
if ( res > cc ) res = cc ;
}
printf ("% d \ n " , res );
}

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

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		
	Scanner  sc = new Scanner(System.in);
	int n = sc.nextInt();  
            
            if(n < 1000){ 
                    System.out.println("ABC");	
            }
            
            else{
            	System.out.println("ABD");
            }
	
		// your code goes here
	}
}

Compiler output:
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.lang.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.io.*;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:15: error: expected ':' before 'static'
   10 |         public static void main (String[] args) throws java.lang.Exception
      |               ^~~~~~~
      |               :
a.cc:10:34: error: 'String' has not been declared
   10 |         public static void main (String[] args) throws java.lang.Exception
      |                                  ^~~~~~
a.cc:10:43: error: expected ',' or '...' before 'args'
   10 |         public static void main (String[] args) throws java.lang.Exception
      |                                           ^~~~
a.cc:10:47: error: expected ';' at end of member declaration
   10 |         public static void main (String[] args) throws java.lang.Exception
      |                                               ^
      |                                                ;
a.cc:10:49: error: 'throws' does not name a type
   10 |         public static void main (String[] args) throws java.lang.Exception
      |                                                 ^~~~~~
a.cc:26:2: error: expected ';' after class definition
   26 | }
      |  ^
      |  ;
Language: C++

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		if ( n < 1000 ){
			System.out.println("ABC");
		} 
		else {
			System.out.println("ABD");
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.lang.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:15: error: expected ':' before 'static'
    8 |         public static void main (String[] args) throws java.lang.Exception
      |               ^~~~~~~
      |               :
a.cc:8:34: error: 'String' has not been declared
    8 |         public static void main (String[] args) throws java.lang.Exception
      |                                  ^~~~~~
a.cc:8:43: error: expected ',' or '...' before 'args'
    8 |         public static void main (String[] args) throws java.lang.Exception
      |                                           ^~~~
a.cc:8:47: error: expected ';' at end of member declaration
    8 |         public static void main (String[] args) throws java.lang.Exception
      |                                               ^
      |                                                ;
a.cc:8:49: error: 'throws' does not name a type
    8 |         public static void main (String[] args) throws java.lang.Exception
      |                                                 ^~~~~~
a.cc:19:2: error: expected ';' after class definition
   19 | }
      |  ^
      |  ;
Language: C++

#include <bits/stdc++.h>
#define fore(x,a,b) for(int x=a, qwerty=b; x<qwerty; x++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define pb push_back
#define fst first
#define snd second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;


int main(){	FIN;
	int n;
	cin>>n;
	if(n<=999)cout<<"ABC\n";
	else cout<<"ABD\n;
}

Compiler output:
a.cc:19:20: warning: missing terminating " character
   19 |         else cout<<"ABD\n;
      |                    ^
a.cc:19:20: error: missing terminating " character
   19 |         else cout<<"ABD\n;
      |                    ^~~~~~~
a.cc: In function 'int main()':
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C++

import java.util.Scanner;

public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = 0;
    String result = null;
    k = n / 1000;
    if(k<1){
      result = "ABC";
    }else
    if(1<k){
      result = "ABD";
    }
    System.out.println(result);
  }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

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

int main()
{
    int n;
cin>>n;
if(i<=999)cout<<"ABC";
else cout<<"ABD";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: 'i' was not declared in this scope
    8 | if(i<=999)cout<<"ABC";
      |    ^
Language: C++

#include<iostream>

int main(){
    int n;
    scanf("%d",&n);
    if(0 < n && n 1000){
        printf("ABC\n");
    }
    else if(1000 <= n && n < 1999 ){
        printf("ABD\n");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected ')' before numeric constant
    6 |     if(0 < n && n 1000){
      |       ~          ^~~~~
      |                  )
Language: C

#include<stdio.h>

int main(void)
{
   int a;

   scanf("%d", &a);
      if(1 <= a <= 999)
         printf("ABC");
      else if(1000 <= a <= 1998)
         printf("ABD");

   return 0;
}
~                                                                               
~                                                                               
~                

Compiler output:
main.c:15:1: error: expected identifier or '(' before '~' token
   15 | ~
      | ^