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

#include <iostream>

int main(int argc, char** argv)
{
    int A, B, C;
    std::cin >> A >> B >> C;

    int ans = (C-(A-B));
    if (ans < 0) = 0;
    
    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:9:18: error: expected primary-expression before '=' token
    9 |     if (ans < 0) = 0;
      |                  ^
Language: C++

#include <iostream>
using namespace std;

int main(){

    int a;
    int b;
    int c;
    cin >> a >> b >>c;    

    int tmp = c - (a-b)

    if(tmp < 0){

        tmp = 0;
    }

    cout << tmp <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected ',' or ';' before 'if'
   13 |     if(tmp < 0){
      |     ^~
Language: C++

    #include<bits/stdc++.h>
         
        using namespace std;
         
        int main(){
          int n;
          cin >> n;
          int count = 0;
          int ecount = 0;
          vector<int> h(n);
          for(int i = 0;i < n;i++){
            cin >> h[i];
          }
          //int temp = h[0];
          for(int j = 1;j < n-1;j++){
            if(h[j] > h[j-1]){
              h[i]--;
            }
            if(h[j] > h[j+1]){
              cout << "No" << endl;
              return 0;
            }
          }
          cout << "Yes" << endl;
          return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'i' was not declared in this scope
   17 |               h[i]--;
      |                 ^
Language: C++

        #include<bits/stdc++.h>
         
        using namespace std;
         
        int main(){
          int n,ans = 0;
          int keta = 0;
          cin >> n;
          
          while(n >= pow(10, keta)){
            keta++;
          }
          if(keta % 2 == 0){
            while(keta > 0){
              ans += 9 * (pow(10, keta));
              keta -= 2;
            }
          }
          
          else{
            ans += (n-pow(10,keta)));
            keta--;
            while(keta > 0){
              ans += 9 * (pow(10, keta));
              keta -= 2;
            }
          }
          
          cout << ans << endl;
          return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:21:36: error: expected ';' before ')' token
   21 |             ans += (n-pow(10,keta)));
      |                                    ^
      |                                    ;
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(){
    int a, b, c;
    cin >> a >> b >> c;
    if (c - (a - b)) < 0{
        cout << 0 << endl;
    }else{
        cout << c - (a - b) << endl;
    }return 0;
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected primary-expression before '<' token
    9 |     if (c - (a - b)) < 0{
      |                      ^
Language: C++

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

int main(){
  int A, B, C; cin >> A >> B >> C;
  int D=0;
  
  if(B+C < A){cout << D << endll;}
  else { cout << B + C -A << endl;}
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: 'endll' was not declared in this scope
    8 |   if(B+C < A){cout << D << endll;}
      |                            ^~~~~
Language: C++

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

int main() {
  int A , B , C;
  cin A>>B>>C;
  
  if(B+C-A <= 0){
    cout << "0" << endl;
  }
  else{
    cout << B+C-A << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'A'
    6 |   cin A>>B>>C;
      |      ^~
      |      ;
Language: Java

import java.util.Scanner;
public class abc136 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		if(c-(a-b)<0)
			System.out.print(0);
		else
		    System.out.print(c-(a-b));

	}

}

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

#include<stdio.h>
#include<stdlib.h>
int main ()
{
  int A,B,C;
  scanf("%d",&A);
  scanf("%d",&B);
  scanf("%d",&C);
  D=C-A+B;
  if(D<0)
  {
    D=0;
  }
  printf("%d",D);
}


Compiler output:
main.c: In function 'main':
main.c:9:3: error: 'D' undeclared (first use in this function)
    9 |   D=C-A+B;
      |   ^
main.c:9:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

	long long a , b , c;
    cin >> a >> b >> c;
  	cout << min(c - (a - b) , 0) << endl; 
 	return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: no matching function for call to 'min(long long int, int)'
    8 |         cout << min(c - (a - b) , 0) << endl;
      |                 ~~~^~~~~~~~~~~~~~~~~
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:8:20: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
    8 |         cout << min(c - (a - b) , 0) << endl;
      |                 ~~~^~~~~~~~~~~~~~~~~
/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:8:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
    8 |         cout << min(c - (a - b) , 0) << endl;
      |                 ~~~^~~~~~~~~~~~~~~~~
Language: C

int main(void)
{
  int a,b,c,x;
  scanf("%d %d %d",&a,&b,&c);
  x=a-b;
  if(c>x) printf("%d\n"c-x);
  else return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d %d %d",&a,&b,&c);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d %d",&a,&b,&c);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:11: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |   if(c>x) printf("%d\n"c-x);
      |           ^~~~~~
main.c:6:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:11: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:24: error: expected ')' before 'c'
    6 |   if(c>x) printf("%d\n"c-x);
      |                 ~      ^
      |                        )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,ab;
  cin >> a;
  cin >> b;
  cin >> c;

  ab = a - b;
  if (ab=0){
    cout << c;
  } else if(ab > c){
    cout << 0
  } else{
    cout << c-ab << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: expected ';' before '}' token
   14 |     cout << 0
      |              ^
      |              ;
   15 |   } else{
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,ab;
  cin >> a;
  cin >> b;
  cin >> c;

  ab = a - b;
  if (ab=0){
    cout << c;
  }else if(ab > c){
    cout << 0
  }else{
    cout << c-ab << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: expected ';' before '}' token
   14 |     cout << 0
      |              ^
      |              ;
   15 |   }else{
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,ab;
  cin >> a;
  cin >> b;
  cin >> c;

  a - b = ab;
  cout << c-ab << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: lvalue required as left operand of assignment
   10 |   a - b = ab;
      |   ~~^~~
Language: Java

import java.util.*;
import java.util.stream.*;

public class Main {
	Scanner sc;
	int A,B,C;
//=============
// constructor
//
	public Main() {
		sc = new Scanner(System.in);
	}
	
//==================
// instance methods
//
	/**
	 * アルゴリズム本体
	 */
	private void calc() {
		int remain = A-B;
		out(Math.max(0, C - remain));
	}
	
	private void out(Object o) {
		System.out.println(o);
		System.out.flush();
	}
	
	private void input() {
		A = sc.nextInt();
		B = sc.nextInt();
		C = sc.nextInt();
	}
	
//======
// main
//
	public static void main(String[] args) {
		Main m = new Main();
		m.input();
		m.calc();
		m.output();
	}

}

Compiler output:
Main.java:43: error: cannot find symbol
		m.output();
		 ^
  symbol:   method output()
  location: variable m of type Main
1 error
Language: C++

#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r| r.unwrap() as char)
                .skip_while(|c| c.is_whitespace())
                .take_while(|c| !c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};
    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    }
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt), * )) => {
        ( $(read_value!($next, $t)),* )
    };
    ($next:expr, [ $t:tt; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };
    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };
    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };
    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!(a:i32, b:i32, c:i32);
    let r = c - (a - b);
    if r > 0 {
        println!("{}", c - (a - b));
    }
    else {
        println!("{}", 0);
    }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #[
    1 | #[allow(unused_macros)]
      |  ^
a.cc:23:2: error: invalid preprocessing directive #[
   23 | #[allow(unused_macros)]
      |  ^
a.cc:33:2: error: invalid preprocessing directive #[
   33 | #[allow(unused_macros)]
      |  ^
a.cc:39:10: error: too many decimal points in number
   39 |         (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
      |          ^~~~~~~
a.cc:2:1: error: 'macro_rules' does not name a type
    2 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:24:1: error: 'macro_rules' does not name a type
   24 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:34:1: error: 'macro_rules' does not name a type
   34 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:52:1: error: 'fn' does not name a type
   52 | fn main() {
      | ^~
Language: C++


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

int main(){
    int A, B, C;
    cin >> A >> B >> C;

    int one;
    one = B + C;
    int two;
    two = one - A

    if (two <= 0){
        cout << "0" << endl;
    }

    else if (two >= 0){
        cout << two << endl;
    }



}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expected ';' before 'if'
   12 |     two = one - A
      |                  ^
      |                  ;
   13 | 
   14 |     if (two <= 0){
      |     ~~            
a.cc:18:5: error: 'else' without a previous 'if'
   18 |     else if (two >= 0){
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
   int a,b,c;
  cin>>a>>b>>c;
  if((a-b)>=c)
    cout<<"0";
  else
    cout<<c-(a-b);

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected '}' at end of input
   10 |     cout<<c-(a-b);
      |                   ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

int main(){
    int A, B, C;
    cin >> A >> B >> C;

    int one;
    one = B + C;
    int two;
    two = one - A

    if (two < 0){
        cout << "0" << endl;
    }

    else if (two > 0){
        cout << two << endl;
    }



}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before 'if'
   11 |     two = one - A
      |                  ^
      |                  ;
   12 | 
   13 |     if (two < 0){
      |     ~~            
a.cc:17:5: error: 'else' without a previous 'if'
   17 |     else if (two > 0){
      |     ^~~~
Language: C++

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

int main(){
    int A, B, C;
    cin >> A >> B >> C;

    int one;
    one = B + C;
    int two;
    two = one - A

    if(two < 0){
        cout << "0" << endl;
    }

    else if(two > 0){
        cout << two << endl;
    }



}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before 'if'
   11 |     two = one - A
      |                  ^
      |                  ;
   12 | 
   13 |     if(two < 0){
      |     ~~            
a.cc:17:5: error: 'else' without a previous 'if'
   17 |     else if(two > 0){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
using namespace std;
using ll = long long;

int main(){
  int a, b, c;
  cin >> a >> b >> c;
  int ans = max(0, c - (b-a)) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
   12 |   int ans = max(0, c - (b-a)) << endl;
      |             ~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

import java.io.PrintWriter;
import 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 c = sc.nextInt();
		sc.close();

		//処理
		int ans = Math.max(c - a + b, 0);
		
		//出力
		PrintWriter out = new PrintWriter(System.out);
		out.println(ans);
		out.flush();
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.PrintWriter;
      | ^~~~~~
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.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main{
      | ^~~~~~
Language: C++

#include 〈stdio.h〉
int main（）｛
int A,B,C;
scanf（"%d %d %d",&A,&B,&C）;
printf（"%d,"C－A＋B）;
return 0;
}

Compiler output:
a.cc:1:10: error: extended character 〈 is not valid in an identifier
    1 | #include 〈stdio.h〉
      |          ^
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include 〈stdio.h〉
      |          ^~~~~~~
a.cc:1:18: error: extended character 〉 is not valid in an identifier
    1 | #include 〈stdio.h〉
      |                  ^
a.cc:3:1: error: expected initializer before 'int'
    3 | int A,B,C;
      | ^~~
a.cc:4:1: error: 'scanf\U0000ff08' does not name a type
    4 | scanf（"%d %d %d",&A,&B,&C）;
      | ^~~~~~~
a.cc:5:1: error: 'printf\U0000ff08' does not name a type
    5 | printf（"%d,"C－A＋B）;
      | ^~~~~~~~
a.cc:6:1: error: expected unqualified-id before 'return'
    6 | return 0;
      | ^~~~~~
a.cc:7:1: error: expected declaration before '}' token
    7 | }
      | ^
Language: C++

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

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  int d= a-b;
  cout << c-d << endl;
  }
}

Compiler output:
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C

#include<stdio.h>

int main(){
    int A,B,C,W ;
    scanf("%d",&A) ;
    scanf("%d",&B) ;
    scanf("%d",&C) ;

    if(A<B){
      printf("A<B") ;
      break ;
    }

    W=C-(A-B) ;
    if (W < 0){
      printf("W<0") ;
      break ;
    }else{
      printf("%d",W);}
  }


Compiler output:
main.c: In function 'main':
main.c:11:7: error: break statement not within loop or switch
   11 |       break ;
      |       ^~~~~
main.c:17:7: error: break statement not within loop or switch
   17 |       break ;
      |       ^~~~~
Language: C++

#include<stdio.h>
int main();
int A,B,C;
scanf("%d,%d,%d",&A,&B,&C);
printf("%d",C-A+B);

return 0;

Compiler output:
a.cc:4:6: error: expected constructor, destructor, or type conversion before '(' token
    4 | scanf("%d,%d,%d",&A,&B,&C);
      |      ^
a.cc:5:7: error: expected constructor, destructor, or type conversion before '(' token
    5 | printf("%d",C-A+B);
      |       ^
a.cc:7:1: error: expected unqualified-id before 'return'
    7 | return 0;
      | ^~~~~~
Language: C++


#include <iostream>
#include<iomanip>
#include <iomanip>
//#include <math.h>

using namespace std;

void B(),C();
bool subC(int*, int);

int main()
{
	B();
}
void C() {
	int N; cin >> N;
	int* H = new int[N];
	for (int i = 0; i < N; i++) cin >> H[i];

	if (subC(H, N)) cout << "Yes" << endl;
	else cout << "No" << endl;

	delete[] H;
}
bool subC(int* H, int len) {
	int tempMax = 0;
	for (int i = 0; i < len - 1; i++) {
		tempMax = fmax(tempMax, H[i]);
		if (tempMax >= H[i + 1] + 2) return false;
	}
	return true;
}

void B() {
	int N; 
	cin >> N;
	int M = (N + 1) / 2;
	cout << M << endl;


}

Compiler output:
a.cc: In function 'bool subC(int*, int)':
a.cc:29:27: error: 'fmax' was not declared in this scope
   29 |                 tempMax = fmax(tempMax, H[i]);
      |                           ^~~~
Language: Java

import java.util.*;

public class Build_Stairs{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int h ;
    int[] a = new int[n];

    for(int i=0; i<n; i++){
      h = sc.nextInt();
      a[i] = h ;

    }
    //System.out.println(list);
    if(n==0){
      System.out.println("No");
    }else{
      for(int j=0; j<n-1; j++){
        if(a[j]>a[j+1]){
          a[j] = a[j]-1;
          if(j==0 && a[j]>a[j+1]){
            System.out.println("No");
            break ;
          }
          if(a[j-1]>a[j] || a[j]>a[j+1]){
            System.out.println("No");
            break ;
          }
        }
        //System.out.println(list);
      }
    System.out.println("Yes");
    }
  }
}

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


#include <iostream>
#include<iomanip>
#include <iomanip>
#include <math.h>

void C();
bool subC(int*, int);


void C() {
	int N; cin >> N;
	int* H = new int[N];
	for (int i = 0; i < N; i++) cin >> H[i];

	if (subC(H, N)) cout << "yes" << endl;
	else cout << "no" << endl;

	delete[] H;
}
bool subC(int* H, int len) {
	int tempMax = 0;
	for (int i = 0; i < len - 1; i++) {
		tempMax = fmax(tempMax, H[i]);
		if (tempMax >= H[i + 1] + 2) return false;
	}
	return true;
}


Compiler output:
a.cc: In function 'void C()':
a.cc:12:16: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   12 |         int N; cin >> N;
      |                ^~~
      |                std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |         if (subC(H, N)) cout << "yes" << 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:16:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |         if (subC(H, N)) cout << "yes" << 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:17:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |         else cout << "no" << 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:17:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |         else cout << "no" << 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<iostream>
#include<cmath>
using namespace std;
int main() {
	long long N,t=0,P,sum=0;
	cin >> N;
	P = N;
	do {
		t++;
		P/=10;
	} while (P);
	for (int i = 1; i <= t; i += 2)
	{
		if (i == t)
		sum += N - pow(10, (t - 1))+1;
		else
		sum += pow(10, i) - pow(10, (i - 1));
	}
	cout << long long(sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected primary-expression before 'long'
   19 |         cout << long long(sum);
      |                 ^~~~
Language: C++

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

int main(){
  int a, b, c, r;
  
  cin >> a >> b >> c;
  r = c - (a-b);
  r = (r < 0) 0: r;
  cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before numeric constant
    9 |   r = (r < 0) 0: r;
      |              ^~
      |              ;
Language: C++

include <iostream>

using namespace std;

int main()
{
    int A, B, C;

    cin >> A >> B >> C;

    cout << ((A-B) > C ? 0 : ( C-(A-B)) )<< endl;
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> A >> B >> C;
      |     ^~~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << ((A-B) > C ? 0 : ( C-(A-B)) )<< endl;
      |     ^~~~
a.cc:11:45: error: 'endl' was not declared in this scope
   11 |     cout << ((A-B) > C ? 0 : ( C-(A-B)) )<< endl;
      |                                             ^~~~
Language: C

#include <stdio.h>

int main()
{
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    ans=c-a+b;
    if(ans<0)ans=0;
    printf("%d",ans);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'ans' undeclared (first use in this function)
    7 |     ans=c-a+b;
      |     ^~~
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>

int main()
{
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    int ans=c+b-a;.
    if(ans<0)ans=0;
    printf("%d",ans);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected primary-expression before '.' token
    7 |     int ans=c+b-a;.
      |                   ^
a.cc:8:5: error: expected unqualified-id before 'if'
    8 |     if(ans<0)ans=0;
      |     ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
  int N;
  cin >> N;
  vector<int> data(N);
  for (int i = 0; i < N; i++) {
    cin >> data.at(i);
  }
  ll int low = (ll)data.at(0);
  rep(i,N){
    if(low > data.at(i) - 1){
      cout << No < endl;
      return 0;
    }else if(low == data.at(i) - 1){
      //nothing.do
    }else{
      low = (ll)data.at(i);
    }
  }
  cout << Yes << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: two or more data types in declaration of 'low'
   12 |   ll int low = (ll)data.at(0);
      |   ^~
a.cc:14:8: error: 'low' was not declared in this scope; did you mean 'pow'?
   14 |     if(low > data.at(i) - 1){
      |        ^~~
      |        pow
a.cc:15:15: error: 'No' was not declared in this scope; did you mean 'N'?
   15 |       cout << No < endl;
      |               ^~
      |               N
a.cc:23:11: error: 'Yes' was not declared in this scope
   23 |   cout << Yes << endl;
      |           ^~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a,b;
    cin >> a >> b >> c;
    int ans;
  if (a-b>c) ans=0;
  else ans=c-a+b;
    cout << ans <<endl;
    return 0;
}

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

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

int main() {
  int A, B, C;
  cin>>A>>B>>C;
  if(C-(A-B)>0){
    cout<<C-(A-B)<<endl;
}else{
  cout<<0<<endl;
}


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

#include<iostream>
using namespace std;
int main()
{
  int A,B,C;
  cin >> A >> B >> C;
  A,B,C=map(int,input(),split());
  if A-B<C;
  print(C-(A-B));
    else:print(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before 'int'
    7 |   A,B,C=map(int,input(),split());
      |             ^~~
a.cc:7:17: error: 'input' was not declared in this scope; did you mean 'int'?
    7 |   A,B,C=map(int,input(),split());
      |                 ^~~~~
      |                 int
a.cc:7:25: error: 'split' was not declared in this scope
    7 |   A,B,C=map(int,input(),split());
      |                         ^~~~~
a.cc:7:9: error: 'map' was not declared in this scope
    7 |   A,B,C=map(int,input(),split());
      |         ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include<iostream>
  +++ |+#include <map>
    2 | using namespace std;
a.cc:8:6: error: expected '(' before 'A'
    8 |   if A-B<C;
      |      ^
      |      (
a.cc:9:3: error: 'print' was not declared in this scope; did you mean 'printf'?
    9 |   print(C-(A-B));
      |   ^~~~~
      |   printf
a.cc:10:5: error: 'else' without a previous 'if'
   10 |     else:print(0);
      |     ^~~~
a.cc:10:9: error: expected primary-expression before ':' token
   10 |     else:print(0);
      |         ^
Language: C++

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

main(){
  int i,sum=0;
  string n;
  cin >> n;
  
  for(i=0;i<=100000;i++){
    if(length(n)%2==1){
      sum++;
    }
  }
  cout << sum << endl;
}
  
  

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:11:8: error: 'length' was not declared in this scope
   11 |     if(length(n)%2==1){
      |        ^~~~~~
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(Sysmtem.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int c = scan.nextInt();
      	int rest = a - b;
      	System.out.print(c - rest);
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
    	Scanner scan = new Scanner(Sysmtem.in);
    	                           ^
  symbol:   variable Sysmtem
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(Sysmte.in);
      	int a = scan.nextInt();
      	int b = scan.nextInt();
      	int c = scan.nextInt();
      	int rest = a - b;
      	System.out.print(c - rest);
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
    	Scanner scan = new Scanner(Sysmte.in);
    	                           ^
  symbol:   variable Sysmte
  location: class Main
1 error
Language: C++

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

int main(){
  int A, B, C;
  cin >> A >> B >> C;
  S = C - (A-B);
  if (S>=0){
  cout << S;
  }else{
  cout << 0;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'S' was not declared in this scope
    7 |   S = C - (A-B);
      |   ^
Language: C++

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

int main(){
  cin >> A >> B >> C;
  S = C - (A-B);
  if (S>=0){
  cout << S;
  }else{
  cout << 0;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'A' was not declared in this scope
    5 |   cin >> A >> B >> C;
      |          ^
a.cc:5:15: error: 'B' was not declared in this scope
    5 |   cin >> A >> B >> C;
      |               ^
a.cc:5:20: error: 'C' was not declared in this scope
    5 |   cin >> A >> B >> C;
      |                    ^
a.cc:6:3: error: 'S' was not declared in this scope
    6 |   S = C - (A-B);
      |   ^
Language: C++

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

int main() {
  int A,B,C;
  cin >> A >> B >> c ;
  
  if ( C > (A-B)){
    
  cout << C-(A-B) << endl;
  }
  else {
    cout << '0'<< endl;
  }
}
  
  
 



  
 




Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
    6 |   cin >> A >> B >> c ;
      |                    ^
Language: C++

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

int main() {
  int A,B,C;
  cin >> A >> B >> c ;
  
  if ( C > (A-B)){
    
  cout << C-(A-B) << endl;
  }
  else {
    cout << "0" << endl;
  }
}
  
  
 



  
 




Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
    6 |   cin >> A >> B >> c ;
      |                    ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
const ll mod = (1e+9) + 7;

int main() {
	int A, B, C;
	cin >> A >> B >> C;
	cout << max(C - A + B, 0) << endl;
	return 0;
}

Compiler output:
a.cc:4:7: error: 'll' does not name a type
    4 | const ll mod = (1e+9) + 7;
      |       ^~
Language: C++

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

int main() {
	int a,b,c;
  	cin >> a >> b >> c;
  	if(c-(a-b) < 0)
      cout << 0;
  	else
      cout c-(a-b);
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected ';' before 'c'
   11 |       cout c-(a-b);
      |           ^~
      |           ;
Language: C++

#include <bits/stdc++.h>

int main(){
  int a,b,c;
  cin >> a >> b >>c;
  if(b+c >=a)cout <<0<<endl;
  else cout << b + c - a <<endl;
          }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> b >>c;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   if(b+c >=a)cout <<0<<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:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   if(b+c >=a)cout <<0<<endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:7:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   else cout << b + c - a <<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:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   else cout << b + c - a <<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 <iostream>
#include <algorithm>
using namespace std;

int main()
{
  int a, b, c;
  cin >> a >> b >> c;
  cout << min({c, c-(a-b), 0})
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: expected ';' before '}' token
    9 |   cout << min({c, c-(a-b), 0})
      |                               ^
      |                               ;
   10 | }
      | ~
Language: C++

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

int main()
{
  int a, b, c;
  cin >> a >> b >> c;
  cout << min(c, c-(a-b))
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before '}' token
    9 |   cout << min(c, c-(a-b))
      |                          ^
      |                          ;
   10 | }
      | ~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i,n) for (int i=(int)(n)-1; i>=0; --i)
#define debug(x) cerr << #x << " = " << x << "\n"
#define debugv(x) rep(i, x.size()) cerr << x[i] << (i == x.size() - 1 ? "\n" : " ")
#define all(x) x.begin(),x.end()
#define int long long
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int INF = ((1LL << 30) + (1LL << 29));
const int MOD = 1000000007;

//=============================
int N,M,K;
string S,T;
vector<int> A;
vector<int> B;
//=============================
void input()
{
    cin>>N>>M>>K;
}
//=============================
void func(){}
//=============================
void solve()
{
    int a,b,c;
    a=N;b=M;c=K;
    int hairu = a-b;

    cout<<max(0,c-hairu)<<endl;
}
//=============================
signed main()
{
    input();
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:33:14: error: no matching function for call to 'max(int, long long int)'
   33 |     cout<<max(0,c-hairu)<<endl;
      |           ~~~^~~~~~~~~~~
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:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:33:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   33 |     cout<<max(0,c-hairu)<<endl;
      |           ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303: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:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:33:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   33 |     cout<<max(0,c-hairu)<<endl;
      |           ~~~^~~~~~~~~~~
Language: C++

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

int main(){
  int A, B, C;
  cin >> A >> B >> C;
  int gap=A-B;
  int use=min(C, gap);
  int ans=C-use;
  
  cout << ans;


  
  
  return(0);

}

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

#include <stdio.h>
 
int main()
{
/* 問題文
　左右一列にN個のマスが並んでおり、左からi番目のマスの高さは Hiです。
　あなたは各マスについて1度ずつ次のいずれかの操作を行います。
　マスの高さを 1低くする。何もしない。
　操作をうまく行うことでマスの高さを左から右に向かって単調非減少にできるか求めてください。
*/

        
   int i,N;
   int N_max = 100000; 
   int H[N_max]={0};

   
    scanf("%d", &N);
    if(N> 100000) N=100000; 
    if(N<1) N=1;
    
    // Hiの読み込み
    for(i=0;i<N;i++){
        scanf("%d", &H[i]);  
    }

    // 値の操作
    for(i=0;i<(N-1);i++){
        if(H[i]>H[i+1]){
            H[i]--;
        }  
    }
    
    // 短調非減少のチェック
    for(i=0;i<(N-1);i++){
        if(H[i]>H[i+1]){
            printf("Ng");
            return 0;
        }  
    }

    
    printf("Ok");
    
  return 0;  
}

Compiler output:
main.c: In function 'main':
main.c:15:17: error: variable-sized object may not be initialized except with an empty initializer
   15 |    int H[N_max]={0};
      |                 ^
Language: Java

import java.util.*;
public class TEST{
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int A=sc.nextInt();
        int B=sc.nextInt();
        int C=sc.nextInt();
        if(A>B) {
        	int cE=C-(A-B);
        	if(cE<0) {
        		cE=0;
        	}
        	System.out.println(cE);
        }else {
        	System.out.println(C);
        }
        
        
        
    }
}

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

function Main(input) {
  input = input.script(" ").map(Number);
  
  var A = input[0];
  var B = input[1];
  var C = input[2];
  
  var ans = C - (A - B);
  
  if (ans < 0) ans = 0;
  
  console.log(ans);
}

Compiler output:
a.cc:1:1: error: 'function' does not name a type; did you mean 'union'?
    1 | function Main(input) {
      | ^~~~~~~~
      | union
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int a, b, c, ret;
  cin >> a >> b >> c;
  ret = b + c - a;
  if (ret < 0) ret = 0
  cout << ret << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected ';' before 'cout'
    9 |   if (ret < 0) ret = 0
      |                       ^
      |                       ;
   10 |   cout << ret << endl;
      |   ~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
  int a b c;
  cin >> a >> b >> c;
  cout << max(0,c-a+b) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected initializer before 'b'
    6 |   int a b c;
      |         ^
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin >> a >> b >> c;
      |          ^
a.cc:7:15: error: 'b' was not declared in this scope
    7 |   cin >> a >> b >> c;
      |               ^
a.cc:7:20: error: 'c' was not declared in this scope
    7 |   cin >> a >> b >> c;
      |                    ^
Language: C

#include <stdio.h>
 
int main()
{
	  
   int N;
   int Ans;
   
    scanf("%d", &N);
    if(N> 100000) N=100000; 
    if(N<1) N=1;

   
    if(N==100000) Ans = 9 + (100*9) + (10000*9); // 90909
    else if(N >= 10000){
        Ans = 9 + 900 + N%10000 + 1;
    }
    else if(N>=100){
        Ans = 9 + N%100 + 1;
    }

  　printf("%d",C);
    
  return 0;  
}

Compiler output:
main.c: In function 'main':
main.c:22:3: error: stray '\343' in program
   22 |   <U+3000>printf("%d",C);
      |   ^~~~~~~~
main.c:22:17: error: 'C' undeclared (first use in this function)
   22 |   　printf("%d",C);
      |                 ^
main.c:22:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main()
{
	  
   int N;
   Int Ans;
   
    scanf("%d", &N);
    if(N> 100000) N=100000; 
    if(N<1) N=1;

   
    if(N==100000) Ans = 9 + (100*9) + (10000*9); // 90909
    else if(N >= 10000){
        Ans = 9 + 900 + N%10000 + 1;
    }
    else if(N>=100){
        Ans = 9 + N%100 + 1;
    }

  　printf("%d",C);
    
  return 0;  
}

Compiler output:
main.c: In function 'main':
main.c:7:4: error: unknown type name 'Int'; did you mean 'int'?
    7 |    Int Ans;
      |    ^~~
      |    int
main.c:22:3: error: stray '\343' in program
   22 |   <U+3000>printf("%d",C);
      |   ^~~~~~~~
main.c:22:17: error: 'C' undeclared (first use in this function)
   22 |   　printf("%d",C);
      |                 ^
main.c:22:17: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;

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

                int r=calc();
                System.out.println(r);
        }
        static int calc(){
                Scanner sc = new Scanner(System.in);
                int A=sc.nextInt();
                int B=sc.nextInt();
                int C=sc.nextInt();
                int result = C-(A-B);

                return result;
        }
}

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

import java.util.*;

public clas Main{
        public  static void main(String[] args){
                calc();
        }
        static int calc(){
                Scanner sc = new Scanner(System.in);
                int A=sc.nextInt();
                int B=sc.nextInt();
                int C=sc.nextInt();
                int result = C-A+B;

                return result;
        }
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public clas Main{
       ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
        public  static void main(String[] args){
                       ^
  (use --enable-preview to enable unnamed classes)
Main.java:16: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.*;

public class a{
        public  static void main(String[] args){
                calc();
        }
        static int calc(){
                Scanner sc = new Scanner(System.in);
                int A=sc.nextInt();
                int B=sc.nextInt();
                int C=sc.nextInt();
                int result = C-A+B;

                return result;
        }
}

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

#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main()
{
    int a, b, c;
    cin >> a >> b >> c;

    int ret;
    ret = c - a + b;
    if (ret < 0)
    {
        ret = 0
    }
    cout << ret << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: expected ';' before '}' token
   16 |         ret = 0
      |                ^
      |                ;
   17 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>

using namespace std;



int main() {
	
  int N,count;cin >> N;
  count = 0;
  string s;
  for(int i=1;i<=N;i++){
    s = to_string(N);
    int leng = s.length();
    if(leng%2=1) count++;
  }
  cout << count;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: lvalue required as left operand of assignment
   15 |     if(leng%2=1) count++;
      |        ~~~~^~
Language: C++

#include<iostream>
using namespace std

int main(){
    int N;
    cin>>N;
    a = min(9,N)+min(900,max(0,N-99))+min(90000,max(0,N-9999));
    cout<<a;
return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main(){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:7:5: error: 'a' was not declared in this scope
    7 |     a = min(9,N)+min(900,max(0,N-99))+min(90000,max(0,N-9999));
      |     ^
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
      long long int a,b,c;
      cin>>a>>b>>c;
      cout<<max(0,c-(a-b));
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: no matching function for call to 'max(int, long long int)'
    7 |       cout<<max(0,c-(a-b));
      |             ~~~^~~~~~~~~~~
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:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:7:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    7 |       cout<<max(0,c-(a-b));
      |             ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303: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:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:7:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    7 |       cout<<max(0,c-(a-b));
      |             ~~~^~~~~~~~~~~