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

#includde<iostream>
using namespace std;
int main()
{
	ll a,b,c;
	cin>>a>>b>>c;
	a=a-b;
	c=c-a;
	if(c<0)
	{
		c=0;
	}
	cout<<c;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includde; did you mean #include?
    1 | #includde<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll a,b,c;
      |         ^~
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a>>b>>c;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #includde<iostream>
a.cc:6:14: error: 'a' was not declared in this scope
    6 |         cin>>a>>b>>c;
      |              ^
a.cc:6:17: error: 'b' was not declared in this scope
    6 |         cin>>a>>b>>c;
      |                 ^
a.cc:6:20: error: 'c' was not declared in this scope
    6 |         cin>>a>>b>>c;
      |                    ^
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout<<c;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include <stdio.h>

 int main(void)
{

int a, b, c, s;


 scanf("%d %d %d",&a,&b,&c);

 s=(c-(a-b));

printf("%d" ,s);

return 0;
   


Compiler output:
main.c: In function 'main':
main.c:15:1: error: expected declaration or statement at end of input
   15 | return 0;
      | ^~~~~~
Language: Java

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();
		
		System.out.println(c-(a-b));
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main() {
  int A, B, C;
  cin >> A >> B >> C;
  cout << C-(A-B) << 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<iostream>
#define rep(i,n) for(int i = 0; i < n; ++i)
using namespace std;
int main(){
    int n;
    cin >> n;
    vector<int> a;
    rep(i,n) cin >> a[i];
    int pre = -999;
    rep(i,n){
        if(pre <= a[-1]){
            pre = a[i]-1;
        }else if(pre <= a[i]){
            pre = a[i];
        }else{
            puts("No");
            return 0;
        }
    } 
    puts("Yes");
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int> a;
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #define rep(i,n) for(int i = 0; i < n; ++i)
a.cc:7:12: error: expected primary-expression before 'int'
    7 |     vector<int> a;
      |            ^~~
a.cc:8:21: error: 'a' was not declared in this scope
    8 |     rep(i,n) cin >> a[i];
      |                     ^
a.cc:11:19: error: 'a' was not declared in this scope
   11 |         if(pre <= a[-1]){
      |                   ^
Language: C

#include <stdio.h>
#include <stdlib.h>
int main()
{
	int a,b,c,d;
	scanf("%d" "%d" "%d",&a,&b,&c);
	d = a - (b + c);
	print("%d",abs(d));
	

}


Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |         print("%d",abs(d));
      |         ^~~~~
      |         printf
Language: Java

import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class Practice {
	
	   static class FastReader
	   {
		   BufferedReader br;
		   StringTokenizer st;
		   public FastReader()
		   {
			   br = new BufferedReader(new InputStreamReader(System.in));
		   }
		   
		   
		   String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } 
		   
		   
		   int nextInt()
		   {
			   return Integer.parseInt(next());
		   }
		   long nextLong()
		   {
			   return Long.parseLong(next());
		   }
		   double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } 
		   
		   String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } 
	   }

		public static void main(String []args) throws Exception
		{
			//Scanner sc=new Scanner(System.in);
			FastReader in =new FastReader();
			PrintWriter pw = new PrintWriter(System.out);
			//System.out.println
			//int A=in.nextInt();
			int a=in.nextInt();
		//	ArrayList<Integer> a=new ArrayList<Integer>();
			int b=in.nextInt();
			int c=in.nextInt();
			
			int d=a-b;
			
			if(d>c)
			{
				pw.print(0);
			}
			else
			{
				pw.print(c-d);
			}

			
			
            pw.flush();
			pw.close();
			
	}
		
}		
		
		
		
		

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

#include "bits/stdc++.h"
#pragma GCC optimize "03"
using namespace std;

#define int long long int
#define pb push_back
#define pii pair<int,int>
#define fi first
#define se second
#define rep(i,a,b) for (int i = a; i < b; ++i)
#define dbg(x) { cerr<<"> "<<#x<<": "<<x<< endl; }
#define dbg2(x,y) { cerr<<"> "<<#x<<": "<<x<<" , "<<#y<<": "<<y<<endl; }
#define dbg3(x,y,z) { cerr<<"> "<<#x<<": "<<x<<" , "<<#y<<": "<<y<<" , "<<#z<<": "<<z<<endl; }
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#ifndef LOCAL
#define endl '\n'
#endif
const int inf = INT_MAX;
const int MOD = 1e9 + 7;



signed main(){
    #ifdef LOCAL
        freopen("input.txt", "r", stdin);
        //freopen("output.txt", "w", stdout);
    #endif  
    IOS;

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

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

import java.util.Random;

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

        int A = ThreadLocalRandom.current().nextInt(1,  20);
        int B = ThreadLocalRandom.current().nextInt(1,  A);

        int differnce = A-B;

        int C = ThreadLocalRandom.current().nextInt(1,  20);

        if (c > differnce) {
            System.out.println(c-differnce);
        } else {
            System.out.println(0);
        }

    }
}

Compiler output:
Main.java:6: error: cannot find symbol
        int A = ThreadLocalRandom.current().nextInt(1,  20);
                ^
  symbol:   variable ThreadLocalRandom
  location: class Main
Main.java:7: error: cannot find symbol
        int B = ThreadLocalRandom.current().nextInt(1,  A);
                ^
  symbol:   variable ThreadLocalRandom
  location: class Main
Main.java:11: error: cannot find symbol
        int C = ThreadLocalRandom.current().nextInt(1,  20);
                ^
  symbol:   variable ThreadLocalRandom
  location: class Main
Main.java:13: error: cannot find symbol
        if (c > differnce) {
            ^
  symbol:   variable c
  location: class Main
Main.java:14: error: cannot find symbol
            System.out.println(c-differnce);
                               ^
  symbol:   variable c
  location: class Main
5 errors
Language: Java


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

public class Atcoder
{
	public static void main(String []args)throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
		String []s=br.readLine().split(" ");
		int a=Integer.parseInt(s[0]);
		int b=Integer.parseInt(s[1]);
		int c=Integer.parseInt(s[2]);
		
		c-=(a-b);
		if(c<0)
			System.out.println(0);
		else
			System.out.println(c);		
	}
}




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

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


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

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

#define int long long
#define endl "\n"
#define REP(i,a,n) for(int i=a;i<n;++i)
#define REPR(i,a,n) for(int i=a;i>n;--i)
#define RUP(a,b) ((a+b-1)/(b))
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define mp make_pair
#define mt make_tuple

typedef long long ll;
typedef pair<int,int> Pii;
typedef tuple<int,int,int> Tiii;
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef vector<Pii> VPii;
typedef vector<string> Vs;

template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T> void YesNo(T a) {cout<<(a?"Yes":"No")<<endl;}
template<class T> void YESNO(T a) {cout<<(a?"YES":"NO")<<endl;}
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}
void uniq(Vi &v){sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end());}
const int MOD=1000000007;
const int INF=LLONG_MAX/2;

signed main() {cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);
    int a,b,c;
    cin>>a>>b>>c;
    cout<<max(0,b+c-a)<<endl;
    return 0;
}


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before '}' token
    9 |     ans = 0
      |            ^
      |            ;
   10 |   }
      |   ~
Language: Java


package Beginner20190804;

import java.util.Scanner;


public class Main {

	/**
	 * @param args
	 */
	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();
		int d = c-a+b;
		if(d>0)System.out.println(d);
		else System.out.println(0);
	}

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

#include <iostream>
#include <sstream>
struct Scanner {
  std::string pp(const char ch) {
    if (ch == EOF) {
      return "EOF";
    } else {
      return std::string(1, ch);
    }
  }
  void readSpace() {
    auto ch = getchar();
    if (ch != ' ') {
      throw std::runtime_error(std::string("want: Space, got: ") + pp(ch));
    }
  }
  void readNewline() {
    auto ch = getchar();
    if (ch != '\n') {
      throw std::runtime_error(std::string("want: Newline, got: ") + pp(ch));
    }
  }
  void readEof() {
    auto ch = getchar();
    if (ch != EOF) {
      throw std::runtime_error(std::string("want: EOF, got: ") + pp(ch));
    }
  }
  std::string readString() {
    std::string ret;
    char ch;
    while (ch = getchar(), ch != ' ' and ch != '\n' and ch != EOF) {
      ret += ch;
    }
    ungetc(ch, stdin);
    return ret;
  }
  template <typename T>
  T readInt(T lb, T ub) {
    char ch = getchar();
    if ((not isdigit(ch)) and (ch != '-')) {
      ungetc(ch, stdin);
      throw std::runtime_error(std::string("want: [0-9\\-]+, got: ") + pp(ch));
    }
    T ret = ch == '-' ? 0 : ch - '0';
    int sgn = ch == '-' ? -1 : +1;
    while (isdigit(ch = getchar())) {
      ret = ret * 10 + (ch - '0');
    }
    ungetc(ch, stdin);
    ret *= sgn;
    if (not(lb <= ret and ret <= ub)) {
      std::ostringstream os;
      os << ret << " is not in [" << lb << ", " << ub << "]";
      throw std::runtime_error(os.str());
    }
  }
};

// using namespace std;
int main() {
  Scanner sc;
  auto a = sc.readInt<int>(1, 20);
  sc.readSpace();
  auto b = sc.readInt<int>(1, a);
  sc.readSpace();
  auto c = sc.readInt<int>(1, 20);
  sc.readEof();
  cout << -1 << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:69:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   69 |   cout << -1 << endl;
      |   ^~~~
      |   std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:69:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   69 |   cout << -1 << 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: In member function 'T Scanner::readInt(T, T) [with T = int]':
a.cc:57:3: warning: control reaches end of non-void function [-Wreturn-type]
   57 |   }
      |   ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> a >> b >> c;
      |   ^~~
a.cc:7:11: error: 'c' was not declared in this scope
    7 |   cout << c - (a - b) << endl;
      |           ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> a >> b >> c;
      |   ^~~
a.cc:7:11: error: 'c' was not declared in this scope
    7 |   cout << c - (a - b) <<endl;
      |           ^
Language: C++

#include <iostream>
#include <cmath>
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;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected primary-expression before '>=' token
    8 |         if(c-(a-b))>=0  cout<<c-(a-b)<<endl;
      |                    ^~
Language: C++

#include <iostream>

int main()
{
	int a, b, c;
	std::cin >> a >> b >> c;
	int ans = c - a + b;
	std::cout << (ans > 0 ? ans : 0) << std:;endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:48: error: expected primary-expression before ':' token
    8 |         std::cout << (ans > 0 ? ans : 0) << std:;endl;
      |                                                ^
a.cc:8:50: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         std::cout << (ans > 0 ? ans : 0) << std:;endl;
      |                                                  ^~~~
      |                                                  std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <cstdio>
 
int main (void)
{
    int a, b, c, r;
    scanf("%d %d %d", &a, &b, &c);
  	r = (c+b - a)
    printf("%d\n", (r>0) ? r:0);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected ';' before 'printf'
    7 |         r = (c+b - a)
      |                      ^
      |                      ;
    8 |     printf("%d\n", (r>0) ? r:0);
      |     ~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
    int A, B, C;
    scanf("%d %d %d", &A, &B, &C);
    if (C > A - B)
    {
        printf("%d" C - (A - B));
    } else {
        printf("0");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ')' before 'C'
   10 |         printf("%d" C - (A - B));
      |               ~    ^~
      |                    )
Language: C++

#include <iostream>

using namespace std;

int main() {
    int A B C;
    scanf("%d %d %d", &A, &B, &C);
    if (C > A - B)
    {
        printf("%d" C - (A - B));
    } else {
        printf("0");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected initializer before 'B'
    6 |     int A B C;
      |           ^
a.cc:7:24: error: 'A' was not declared in this scope
    7 |     scanf("%d %d %d", &A, &B, &C);
      |                        ^
a.cc:7:28: error: 'B' was not declared in this scope
    7 |     scanf("%d %d %d", &A, &B, &C);
      |                            ^
a.cc:7:32: error: 'C' was not declared in this scope
    7 |     scanf("%d %d %d", &A, &B, &C);
      |                                ^
a.cc:10:20: error: expected ')' before 'C'
   10 |         printf("%d" C - (A - B));
      |               ~    ^~
      |                    )
Language: C++

#include <stdio.h>

#define N 501
int main(void)
{
	int n, k, a[N], s[N];

	scanf("%d %d", &n, &k);

	int i, j, tmp, sum = 0;
	for (i = 0; i < n; i++)
	{
		scanf("%d", &tmp);
		sum += tmp;
		a[i] = tmp;
		for (j = i; j > 0; j--)
		{
			if (a[j] < a[j - 1])
			{
				tmp = a[j];
				a[j] = a[j - 1];
				a[j - 1] = tmp;
			}
		}
	}

	int rem, count = 0;
	for (i = sum; i > 0; i--)
	{
		if (sum % i == 0)
		{
			j = 0;
			tmp = n - j - 1;
			while (j < tmp)
			{
				if (a[j] > (rem = sum - a[tmp])) {
					a[j] -= rem;
					count += rem;
					tmp--;
				}
				else if (a[j] < rem)
				{
					a[tmp] += a[j];
					count += a[j];
					j++;
				} else {
					count += a[j];
					j++;
					tmp--;
				}
			}
		}
	exit:
		printf("%d\n", i);
		return 0;
	}

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

#include <bits/stdc++.h>
using namespace std;
#define rec(i, n) for(i = 0; i < n; i++)
 
int main(){
  int i,n;
  bool ans = true;
  cin >> n;
  vector<int> height(n);
  vector<int> flag(n);
  flag.at(0) = 0;
  rec(i,n) {cin >> height.at(i);}
  rec(i,n-1){
    if(height.at(i) - 1 == height.at(i+1) && flag.at(i) == 0){
      flag.at(i+1) = 1;
    }
    else if(height.at(i) > height.at(i+1)){
      ans = false;
      break;
    }
    else if(height.at(i) == height.at(i+1)){
      flag.at(i+1) = flag.at(i);
    else flag.at(i+1) = 0;
  }
  if(ans == true)cout << "YES" << endl;
  else cout << "NO" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: expected '}' before 'else'
   23 |     else flag.at(i+1) = 0;
      |     ^~~~
a.cc:21:44: note: to match this '{'
   21 |     else if(height.at(i) == height.at(i+1)){
      |                                            ^
Language: C++


#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <bitset>
#include <iostream>
#include <deque>
#include <functional>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <string>
#include <vector>

using namespace std;

#define int long long

#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v), rend(v)

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)

#define debug(x) cerr << #x << ": " << x << endl;

const int MOD = 1e9 + 7;

signed main(void)
{
  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:33:14: error: no matching function for call to 'max(int, long long int)'
   33 |   cout << max(0, c - (a - b)) << endl;
      |           ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from a.cc:2:
/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 - (a - b)) << 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,
                 from a.cc:4:
/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 - (a - b)) << endl;
      |           ~~~^~~~~~~~~~~~~~~~
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C;
  cin >> A >> B >> C;
  int ans=C-(A-B);
  if(ans<0){
    ans=0;
  }
  cout << ans << endl;
  return 0;
}

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

#include<bits/stdc++.h>

//頂上AC
int main()
{
	int a,b,c; cin>>a>>b>>c;
	cout<<max(0,b+c-a);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         int a,b,c; 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:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout<<max(0,b+c-a);
      |         ^~~~
      |         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:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
    7 |         cout<<max(0,b+c-a);
      |               ^~~
      |               std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

import java.util.Scanner;
public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	static int sc() {
		int a=scan.nextInt();
		return a;
	}
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int a=sc();
		int b=sc();
		int c=sc();
		int nokori=a-b;
		System.out.println(c-nokori);
	}
}

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:2:1: error: expected unqualified-id before 'public'
    2 | 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);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'C' was not declared in this scope
    6 |   printf("%d",C-A+B);
      |               ^
a.cc:6:17: error: 'A' was not declared in this scope
    6 |   printf("%d",C-A+B);
      |                 ^
a.cc:6:19: error: 'B' was not declared in this scope
    6 |   printf("%d",C-A+B);
      |                   ^
Language: C

#include stdio.h>

int main()
{
  int a,b,c;
  scanf("%d %d %d\n",&a,&b,&c);
  
  printf("%d\n",c-(a-b));
  return 0;
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>a>>b>>c;
      |   ^~~
a.cc:6:9: error: 'cout' was not declared in this scope
    6 |         cout <<ans<<endl;
      |         ^~~~
a.cc:6:21: error: 'endl' was not declared in this scope
    6 |         cout <<ans<<endl;
      |                     ^~~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<"0"<<endl;
      |     ^~~~
a.cc:8:16: error: 'endl' was not declared in this scope
    8 |     cout<<"0"<<endl;
      |                ^~~~
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:1:11: note: to match this '{'
    1 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>a>>b>>c;
      |   ^~~
a.cc:6:9: error: 'cout' was not declared in this scope
    6 |         cout <<ans;
      |         ^~~~
Language: C

#include <stdio.h>
int main (void)
{
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  printf("%d\n", c -(a-b));
  retufn 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'retufn' undeclared (first use in this function)
    7 |   retufn 0;
      |   ^~~~~~
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:9: error: expected ';' before numeric constant
    7 |   retufn 0;
      |         ^~
      |         ;
Language: C

#include <stdio>
 
int main(void){
  int A, B, C;
  scanf("%d %d %d", &A, &B, &C);
  
  A = A - B;
  printf("%d\n", C - A);
  
  return 0;
}

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

#include <stdio>

int main(void){
  int A, B, C;
  scanf("%d %d %d");
  
  A = A - B;
  printf("%d\n", C - A);
  
  return 0;
}

Compiler output:
main.c:1:10: fatal error: stdio: No such file or directory
    1 | #include <stdio>
      |          ^~~~~~~
compilation terminated.
Language: Java

public class App {
    public static void main(String[] args) throws Exception {
        int a = Integer.parseInt(args[0]);
        int b = Integer.parseInt(args[1]);
        int c = Integer.parseInt(args[2]);
        int add = 0;
        
        if(a > b) add = c - (a - b);
        if(add < 0) add = c;

        System.out.print(add);
    }
}


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

import java.util.*;
public class Main{
  
  public static void main(String[] args){
    
    Scanner in = new Scanner(System.in);
    int A = in.nextInt();
    int B = in.nextInt();
    int C = in.nextInt();
    int tobeFilled = A-B>0?A-B:0;
    int remaining = C>tobeFilled?C-tobeFilled:0;
    System.out.println(reamaining);
    
  }
  
}

Compiler output:
Main.java:12: error: cannot find symbol
    System.out.println(reamaining);
                       ^
  symbol:   variable reamaining
  location: class Main
1 error
Language: Java

public class Main{
  
  public static void main(String[] args){
    
    Scanner in = new Scanner(System.in);
    int A = in.nextInt();
    int B = in.nextInt();
    int C = in.nextInt();
    int tobeFilled = A-B>0?A-B:0;
    int remaining = C>tobeFilled?C-tobeFilled:0;
    System.out.println(reamaining);
    
  }
  
}


Compiler output:
Main.java:5: error: cannot find symbol
    Scanner in = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    Scanner in = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
Main.java:11: error: cannot find symbol
    System.out.println(reamaining);
                       ^
  symbol:   variable reamaining
  location: class Main
3 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'cin'
    8 |   cin >> a;
      |   ^~~
a.cc:10:10: error: 'c' was not declared in this scope
   10 |   cin >> c;
      |          ^
Language: C++

#include <stdio.h>
 
int main(void)
{
	// あたいの読み込み   
   int A,B,C;
   /*
    scanf("%d", &A); 
    scanf("%d", &B);
    scanf("%d", &C);
  */
    // ガードチェック
  	if(C > 20) C=20;
  	if(C<1) C=1;
  	if(A > 20) A=20;
    if(B>A) B=A;
  
    if((A-B) > C){
      C = 0;
    }
    else{
      C = C - (A-B);
    }
   


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

#include <stdio.h>
 
int main(void)
{
	// あたいの読み込み   
   /* int A,B,C;
    scanf("%d", &A); 
    scanf("%d", &B);
    scanf("%d", &C);
  */
    // ガードチェック
  	if(C > 20) C=20;
  	if(C<1) C=1;
  	if(A > 20) A=20;
    if(B>A) B=A;
  
    if((A-B) > C){
      C = 0;
    }
    else{
      C = C - (A-B);
    }
   

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'C' was not declared in this scope
   12 |         if(C > 20) C=20;
      |            ^
a.cc:13:12: error: 'C' was not declared in this scope
   13 |         if(C<1) C=1;
      |            ^
a.cc:14:12: error: 'A' was not declared in this scope
   14 |         if(A > 20) A=20;
      |            ^
a.cc:15:8: error: 'B' was not declared in this scope
   15 |     if(B>A) B=A;
      |        ^
a.cc:15:10: error: 'A' was not declared in this scope
   15 |     if(B>A) B=A;
      |          ^
a.cc:17:9: error: 'A' was not declared in this scope
   17 |     if((A-B) > C){
      |         ^
a.cc:17:11: error: 'B' was not declared in this scope
   17 |     if((A-B) > C){
      |           ^
a.cc:17:16: error: 'C' was not declared in this scope
   17 |     if((A-B) > C){
      |                ^
a.cc:22:6: error: expected '}' at end of input
   22 |     }
      |      ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: Java

import java.util.Scanner;

public class Solution {

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int a=scanner.nextInt(),b=scanner.nextInt(),c=scanner.nextInt();

        int diff=a-b;
        if(diff<=c)
            System.out.println(c-diff);
        else
            System.out.println(0);
        
    }
}

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

#include <iostream>

using namespace std;

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



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

int main(void)
{
	// あたいの読み込み   
    double A,B,C;
    scanf("%lf", &A); 
    scanf("%lf", &B);
    scanf("%lf", &C);
  
    // ガードチェック
  	if(C > 20) C=20;
  	if(C<1) C=1;
  	if(A > 20) A=20;
    if(B>A) B=A;
  
    if((A-B) > C){
      C = 0;
    }
    else{
      C = C - (A-B);
    }
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'scanf' was not declared in this scope
    5 |     scanf("%lf", &A);
      |     ^~~~~
Language: C++

void main(void)
{
	// あたいの読み込み   
    double A,B,C;
    scanf("%lf", &A); 
    scanf("%lf", &B);
    scanf("%lf", &C);
  
    // ガードチェック
  	if(C > 20) C=20;
  	if(C<1) C=1;
  	if(A > 20) A=20;
    if(B>A) B=A;
  
    if((A-B) > C){
      C = 0;
    }
    else{
      C = C - (A-B);
    }
   
}

Compiler output:
a.cc:1:1: error: '::main' must return 'int'
    1 | void main(void)
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'scanf' was not declared in this scope
    5 |     scanf("%lf", &A);
      |     ^~~~~
Language: C++

void main()
{
	// あたいの読み込み   
    double A,B,C;
    scanf("%lf", &A); 
    scanf("%lf", &B);
    scanf("%lf", &C);
  
    // ガードチェック
  	if(C > 20) C=20;
  	if(C<1) C=1;
  	if(A > 20) A=20;
    if(B>A) B=A;
  
    if((A-B) > C){
      C = 0;
    }
    else{
      C = C - (A-B);
    }
  
    
  
}

Compiler output:
a.cc:1:1: error: '::main' must return 'int'
    1 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'scanf' was not declared in this scope
    5 |     scanf("%lf", &A);
      |     ^~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'if'
    8 |   d = c - (a-b)
      |                ^
      |                ;
    9 |   if (d<0) d = 0;
      |   ~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:1:5: error: type of 'viod' defaults to 'int' [-Wimplicit-int]
    1 | int main(viod){
      |     ^~~~
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   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(viod){
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%d %d %d", &a,&b,&c);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |     printf("0\n");
      |     ^~~~~~
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 |     printf("%d\n",c-s);
      |     ^~~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:3: error: expected declaration or statement at end of input
   11 |   return 0;
      |   ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'if'
    8 |   d = c - (a-b)
      |                ^
      |                ;
    9 |   if (d<0) d = 0;
      |   ~~
Language: C++

#include<bits/stdc++.h>
using namespace std; 
#define ll long long int
#define pb push_back
#define mp make_pair
#define pll pair<ll,ll>
#define INF LLONG_MAX
#define PI acos(-1)
const ll MOD = 1e9 + 7;
#define fir first
#define sec second
#define all(x) x.begin(),x.end()
#define mem(a,b) memset(a,b,sizeof(a))
#define rep(c,a,b) for(ll c=a;c<b;c++)
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define min_heap priority_queue<pll,vector<pll>,greater<pll> >
ll dx4[]={-1,1,0,0};
ll dy4[]={0,0,-1,1};
ll dx8[]={-1,-1,-1,0,1,1,1,0};
ll dy8[]={-1,0,1,1,1,0,-1,-1};
ll a[200][200];
int main()
{
  ll a,b,c;
  cin>>a>>b>>c;
  cout<<min(c-a+b,0);
}

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

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

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

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

#include<iostream>
using namespace std;
int main(){
	unsigned long double h[100001];
	int n;
	cin>>n;
	bool t=true;
	for(int i=1;i<=n;i++)cin>>h[i];
	for(int i=1;i<=n-1;i++){
		if(h[i]>h[i+1]){
			if(h[i]==(h[i+1]-1)){
				t=true;
				h[i+1]-=1;
			}
			else t=false;
		}
	}
	if(n==1&&h[1]==1000000000){
		cout<<"Yes"<<endl;
		return 0;
	}
	else
	{
	if(t)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	return 0;
	}
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'unsigned' specified with 'long double'
    4 |         unsigned long double h[100001];
      |         ^~~~~~~~
Language: C++

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

const int maxn = 2e5 + 5;
const long long p = 998244353;
int n;
typedef pair<int,int> pii;
pii arr[maxn];
int tmp[maxn];
int val[maxn];
long long ans = 0;
long long fast_pow(int a, int b){
	if(b == 0) return 1;
	long long ans = 1;
	for(;b;b>>=1){
		if(b&1) ans = ans * a % p;
		a = (long long)a * a % p;
	}
	return ans;
}
struct segment{
	int l, r;
	int val;
}
segment arr1[maxn], arr2[maxn];
void build(segment *a, int l, int r, int pos){
	a[pos].l = l, a[pos].r = r;
	a[pos].val = 0;
	if(l != r){
		int mid = (l + r) >> 1;
		build(a,l,mid,2*pos), build(a,mid+1,r,2*pos+1);
	}
}
int ask(segment *a, int l, int r, int pos){
	int lseg = a[pos].l, rseg = a[pos].r;
	if(lseg > r || rseg < l) return 0;
	if(lseg <= l && rseg >= r) return a[pos].val;
	return ask(a,l,r,2*pos) + ask(a,l,r,2*pos+1);
}

void add(segment *a, int p, int pos){
	int lseg = a[pos].l, rseg = a[pos].r;
	a[pos].val ++;
	if(lseg == rseg) return;
	int mid = (lseg + rseg) >> 2;
	if(p <= mid) add(a,p,2*pos);
	else add(a,p,2*pos+1);
}

int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		int x,y;
		scanf("%d%d",&x,&y);
		arr[i] = mp(x,y);
	}
	sort(arr+1,arr+n+1);
	for(int i=1;i<=n;i++){
		tmp[i] = arr[i].second;
	}
	sort(tmp+1,tmp+n+1);
	for(int i=1;i<=n;i++){
		int t = lower_bound(tmp+1,tmp+n+1,arr[i].second) - tmp;
		val[i] = t;
	}
	for(int i=1;i<=n;i++){
		printf("%d ",val[i]);
	}
	build(arr1,1,n,1), build(arr2,1,n,1);
	for(int i=1;i<=n;i++){
		ans = (ans - fast_pow(2,ask(arr1,val[i]+1,n,1)) + 1) % p;
		ans = (ans - fast_pow(2,ask(arr1,1,val[i]-1,1)) + 1) % p;
		add(arr1,val[i],1);
	}
	for(int i=n;i>0;i--){
		ans = (ans - fast_pow(2,ask(arr2,val[i]+1,n,1)) + 1) % p;
		ans = (ans - fast_pow(2,ask(arr2,1,val[i]-1,1)) + 1) % p;
		add(arr2,val[i],1);
	}
	ans = (ans + n * fast_pow(2,n)) % p;
	ans = (ans + p) % p;
	printf("%lld",ans);
	return 0;
}

Compiler output:
a.cc:26:9: error: expected initializer before 'arr1'
   26 | segment arr1[maxn], arr2[maxn];
      |         ^~~~
a.cc: In function 'int main()':
a.cc:70:15: error: 'arr1' was not declared in this scope; did you mean 'arr'?
   70 |         build(arr1,1,n,1), build(arr2,1,n,1);
      |               ^~~~
      |               arr
a.cc:70:34: error: 'arr2' was not declared in this scope; did you mean 'arr'?
   70 |         build(arr1,1,n,1), build(arr2,1,n,1);
      |                                  ^~~~
      |                                  arr