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

#include<bits/stdc++.h>
int a,b,c; int main(){scanf("%d%d%d",&a,&b,&c);printf("%d %d", min(b,c),  max(0, b + c - a) );}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:64: error: 'min' was not declared in this scope; did you mean 'std::min'?
    2 | int a,b,c; int main(){scanf("%d%d%d",&a,&b,&c);printf("%d %d", min(b,c),  max(0, b + c - a) );}
      |                                                                ^~~
      |                                                                std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:2:75: error: 'max' was not declared in this scope; did you mean 'std::max'?
    2 | int a,b,c; int main(){scanf("%d%d%d",&a,&b,&c);printf("%d %d", min(b,c),  max(0, b + c - a) );}
      |                                                                           ^~~
      |                                                                           std::max
/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++

#include<cstdio>
int a,b,c; int main(){scanf("%d%d%d",&a,&b,&c);printf("%d %d", min(b,c),  max(0, b + c - a) );}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:64: error: 'min' was not declared in this scope; did you mean 'main'?
    2 | int a,b,c; int main(){scanf("%d%d%d",&a,&b,&c);printf("%d %d", min(b,c),  max(0, b + c - a) );}
      |                                                                ^~~
      |                                                                main
a.cc:2:75: error: 'max' was not declared in this scope
    2 | int a,b,c; int main(){scanf("%d%d%d",&a,&b,&c);printf("%d %d", min(b,c),  max(0, b + c - a) );}
      |                                                                           ^~~
Language: C++

import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
int1 = lambda x: int(x) - 1

def main():
    n,a,b=map(int, input().split())
    mx=min(a,b)
    mn=max(a+b-n,0)
    print(mx,mn)

main()

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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
  ll N,A,B;
  cin >> N >> A >> B;
  cout << std::min(A,B) << std::max(A+B-N,0) << endl;
  return 0;
}

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

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

int main(){
    int a[2],n;
    cin >> n >> a[0] >> a[1];
    sort(a,a+2);
    cout << a[0] << " ";
    if(n - (a[0]+a[1]) < 0)cout << (a[0]+a[1]) - n) << endl;
    else cout << 0 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:51: error: expected ';' before ')' token
   10 |     if(n - (a[0]+a[1]) < 0)cout << (a[0]+a[1]) - n) << endl;
      |                                                   ^
      |                                                   ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,A,B;
  cin >> N >> A >> B;
  cout << min(X,Y) << max(A+B-N,0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'X' was not declared in this scope
    6 |   cout << min(X,Y) << max(A+B-N,0);
      |               ^
a.cc:6:17: error: 'Y' was not declared in this scope
    6 |   cout << min(X,Y) << max(A+B-N,0);
      |                 ^
Language: C++

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

int main()
{
 	int n,a,b;
  cin >> n >> a >> b;
  
  cout << min(a,b) << endl;
  cout << max(0, (a+b)-n) << endl;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: expected '}' at end of input
   11 |   cout<<maxnum<<' '<<minnum<<endl;
      |                                   ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before '}' token
    9 |   }
      |   ^
a.cc:12:3: error: expected ',' or ';' before '}' token
   12 |   }
      |   ^
a.cc:13:24: error: 'x' was not declared in this scope
   13 |   cout<<min(a,b)<<" "<<x<<endl;
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vel;
typedef vector<int> vei;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> ve_vel;
typedef vector<vector<int>> ve_vei;
typedef vector<vector<char>> ve_vec;
typedef vector<vector<bool>> ve_veb;
typedef vector<vector<string>> ve_ves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pub push_back
#define puf push_front
#define pob pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
//#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
const int64 INF = 1LL << 58;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<typename T> void remove(T & vector, unsigned int index){vector.erase(vector.begin() + index);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

    int n,a,b; cin>>n>>a>>b;

    cout << min(A,B) << " ";
  	if(A+B > N) cout << A + B - N << endl;
  	else cout << 0 << endl;
  	return 0;
  	
}



Compiler output:
a.cc: In function 'int main()':
a.cc:47:17: error: 'A' was not declared in this scope
   47 |     cout << min(A,B) << " ";
      |                 ^
a.cc:47:19: error: 'B' was not declared in this scope
   47 |     cout << min(A,B) << " ";
      |                   ^
a.cc:48:18: error: 'N' was not declared in this scope
   48 |         if(A+B > N) cout << A + B - N << endl;
      |                  ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: request for member 'b' in 'a', which is of non-class type 'int'
    5 |   cout<<min(a.b)<<" "<<max(0,a+b-n)<<endl;
      |               ^
Language: C++

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

int main(void)
{
  int a,b,n,maxn,minn;
  cin>>n>>a>>b;
  if(a>b)
   maxn=a;
  else
   maxn=b;
  if(n=<(a+b))
    minn=0;
  else
    minn=(a+b)-n;
  cout<<maxn<<minn<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: expected primary-expression before '<' token
   12 |   if(n=<(a+b))
      |        ^
Language: C++

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

int main(void)
{
  int a,b,n,maxn,minn;
  cin>>n>>a>>b;
  if(a>b)
   maxn=a;
  else
   maxn=b;
  if(n=<(a+b))
    minn=0;
  else
    minn=(a+b)-n;
  cout<<maxnn<<minn<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: expected primary-expression before '<' token
   12 |   if(n=<(a+b))
      |        ^
a.cc:16:9: error: 'maxnn' was not declared in this scope; did you mean 'maxn'?
   16 |   cout<<maxnn<<minn<<endl;
      |         ^~~~~
      |         maxn
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:33: error: 'c' was not declared in this scope
    6 |   cout << min(a, b) << (a + b < c ? 0 : a + b - c);
      |                                 ^
Language: C

#include <stdio.h>
int main(){
  int n,a,b,x,y;
  scanf("%d%d%d",&n,&a,&b);
  (a<=b)?x=a:x=b;
  y=a+b-n;
  printf("%d %d",x,y);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:15: error: lvalue required as left operand of assignment
    5 |   (a<=b)?x=a:x=b;
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected primary-expression before ';' token
    7 |   cout << min(a,b)<<" "<<;
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespacae std;
int main()
{
int n;
cin>>n;
int a,b;
cin>>a>>b;
int ans=a+b-n;
cout<<min(a,b)<<" "<<ans;
return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespacae'
    2 | using namespacae std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | cin>>n;
      | ^~~
      | 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:10:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 | cout<<min(a,b)<<" "<<ans;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:7: error: 'min' was not declared in this scope; did you mean 'std::min'?
   10 | cout<<min(a,b)<<" "<<ans;
      |       ^~~
      |       std::min
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:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int N,A,B; cin>>N>>A>>B;
  int max=0,min=0;
  max=min(A,B);
  min=A+B-N;
  if(min<0) min=0;
  cout<<max<<" "<<min<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'min' cannot be used as a function
    6 |   max=min(A,B);
      |       ~~~^~~~~
a.cc:9:29: error: expected '}' at end of input
    9 |   cout<<max<<" "<<min<<endl;
      |                             ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int N,A,B; cin>>N>>A>>B;
  int max=0,min=0;
  int max=min(A,B);
  int min=A+B-N;
  if(min<0) min=0;
  cout<<max<<" "<<min<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: redeclaration of 'int max'
    6 |   int max=min(A,B);
      |       ^~~
a.cc:5:7: note: 'int max' previously declared here
    5 |   int max=0,min=0;
      |       ^~~
a.cc:6:14: error: 'min' cannot be used as a function
    6 |   int max=min(A,B);
      |           ~~~^~~~~
a.cc:7:7: error: redeclaration of 'int min'
    7 |   int min=A+B-N;
      |       ^~~
a.cc:5:13: note: 'int min' previously declared here
    5 |   int max=0,min=0;
      |             ^~~
a.cc:9:29: error: expected '}' at end of input
    9 |   cout<<max<<" "<<min<<endl;
      |                             ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <cmath>
#include <iomanip>
#include <limits>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <map>
#include <list>
using namespace std;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(n);i++)

int main(){
    ll n,a,b;
    cin >> n >> a >> b;
    cout << min(a,b) << ' ' << max(a+b-n,0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:35: error: no matching function for call to 'max(ll, int)'
   19 |     cout << min(a,b) << ' ' << max(a+b-n,0) << endl;
      |                                ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:19:35: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   19 |     cout << min(a,b) << ' ' << max(a+b-n,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,
                 from a.cc:7:
/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:19:35: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   19 |     cout << min(a,b) << ' ' << max(a+b-n,0) << endl;
      |                                ~~~^~~~~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<P,ll> Pll;
typedef pair<P,P> PP;
#define rep(i,a,n) for(int i = a;i < n;i++)
#define LINF (ll)1e17
#define INF 1e9
#define MOD 1e9+7
#define sMOD 1e5
#define fs first
#define sc second

ll gcd(ll a,ll b){
	if(!b) return a;
	return gcd(b,a%b);
}


signed main(){
	
	ll n,a,b;
	cin >> n >> a >> b;
	
	cout << max(n - (a+b), 0) << " " << min(a,b) << endl;
	
	
	return 0;

}

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

import.java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    Integer n = s.nextInt();
    int a = s.nextInt();
    int b = s.nextInt();
    System.out.println(Math.min(a,b)+" "+Math.max(0,a+b-n));
  }
  }

Compiler output:
Main.java:1: error: <identifier> expected
import.java.util.Scanner;
      ^
1 error
Language: C++

#include<stdio.h>
void main(int argc, char *argv[]){
  int a,b;
  a=argv[1]<argv[2]?argv[1]:argv[2];
  b=argv[0]-argv[1]-argv[2];
  printf("%d %d",a,b);
}

Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main(int argc, char *argv[]){
      | ^~~~
a.cc: In function 'int main(int, char**)':
a.cc:4:20: error: invalid conversion from 'char*' to 'int' [-fpermissive]
    4 |   a=argv[1]<argv[2]?argv[1]:argv[2];
      |     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
      |                    |
      |                    char*
a.cc:5:20: error: invalid operands of types 'long int' and 'char*' to binary 'operator-'
    5 |   b=argv[0]-argv[1]-argv[2];
      |     ~~~~~~~~~~~~~~~^~~~~~~~
      |            |              |
      |            long int       char*
Language: C

#include<stdio.h>
int main()
{
	int n,a,b;
	scanf("%d %d %d",&n,&a,&b);
	if(a==n||b==n){
		if(a>b){
			printf("%d %d",b,b);
		}else{
			printf("%d %d",a,a);
	}else if(a+b>=n){
		if(a>b){
			printf("%d %d",b,a+b-n);
		}else{
			printf("%d %d",a,a+b-n);
		}
	}else{
		if(a>b){
			printf("%d 0",b);
		}else{
			printf("%d 0",a);
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected '}' before 'else'
   11 |         }else if(a+b>=n){
      |          ^~~~
Language: C

#include<stdio.h>
int main()
{
	int n,a,b;
	scanf("%d %d %d",&n,&a,&b);
	if(a==n||b==n){
		printf("%d %d",n,n);
	}else if(a+b>=n){
		if(a>b){
			printf("%d %d",b,a+b-n);
		}else(a<b){
			printf("%d %d",a,a+b-n);
		}
	}else{
		if(a>b){
			printf("%d 0",b);
		}else{
			printf("%d 0",a);
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:11:27: error: expected ';' before '{' token
   11 |                 }else(a<b){
      |                           ^
      |                           ;
Language: C++

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

int main(void)
{
  int n,a,b,M,m;
  cin >> n;
  cin >> a;
  cin >> b;
  M = min(a,b)
  m = a + b - n
  if(n < 0) m = 0;
  cout << M << " " << m << "\n";
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected ';' before 'm'
   11 |   M = min(a,b)
      |               ^
      |               ;
   12 |   m = a + b - n
      |   ~            
a.cc:15:11: error: expected ';' before '}' token
   15 |   return 0
      |           ^
      |           ;
   16 | }
      | ~
Language: C++

#include<iostream>
#include<iomanip>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: expected primary-expression before '>' token
   14 |   else if(a => b){
      |              ^
Language: C++

#include<iostream>
#include<iomanip>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: expected primary-expression before '>' token
   14 |   else if(a => b){
      |              ^
Language: C++

int main(void)
{	
  int N,A,B,X,Y;
  while(true)
  {
    input>N;
    if(1<=N<=100)break;
  }
  while(true)
  {
    input>A;
    if(0<=A<=N)break;
  }
  while(true)
  {
    input>B;
    if(0<=B<=N)break;
  }
  if(A<B)
  {
    X=A;
  }
  else
  {
    X=B;
  }
  Y=N-(A+B);
  if(Y<0)
  {
    Y=0;
  }
  cout<<X<" "<<Y;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'input' was not declared in this scope; did you mean 'int'?
    6 |     input>N;
      |     ^~~~~
      |     int
a.cc:11:5: error: 'input' was not declared in this scope; did you mean 'int'?
   11 |     input>A;
      |     ^~~~~
      |     int
a.cc:16:5: error: 'input' was not declared in this scope; did you mean 'int'?
   16 |     input>B;
      |     ^~~~~
      |     int
a.cc:32:3: error: 'cout' was not declared in this scope
   32 |   cout<<X<" "<<Y;
      |   ^~~~
a.cc:32:14: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator<<'
   32 |   cout<<X<" "<<Y;
      |           ~~~^~~
      |           |    |
      |           |    int
      |           const char [2]
Language: C++

#include <iostream>

using namespace std;
int main()
{
	int n;
	long asum = 0;
	long bsum = 0;
	int a[100000];
	int b[100000s];

	cin.tie(0);
	ios::sync_with_stdio(false);

	cin >> n;
	
	for (int i = 0; i < n; i++)	cin >> a[i] >> b[i];

	a[n] = 0;
	b[n] = 0;

	for (int i = 0; i < n; i++) {
		int work;
		work = n;

		for (int j = 0; j < n; j++) {
			if (i % 2 == 0) {
				if (a[work] < a[j]) work = j;
				else if (a[work] == a[j] && b[work] < b[j]) work = j;
			}
			else {
				if (b[work] < b[j]) work = j;
				else if (b[work] == b[j] && a[work] < a[j]) work = j;
			}
		}
		if (i % 2 == 0) asum += a[work];
		else bsum += b[work];
		a[work] = 0;
		b[work] = 0;
	}

	cout << asum - bsum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: unable to find numeric literal operator 'operator""s'
   10 |         int b[100000s];
      |               ^~~~~~~
a.cc:17:56: error: 'b' was not declared in this scope
   17 |         for (int i = 0; i < n; i++)     cin >> a[i] >> b[i];
      |                                                        ^
a.cc:20:9: error: 'b' was not declared in this scope
   20 |         b[n] = 0;
      |         ^
Language: C++

#include<iostream>
#include<vector>
#define int long long
using namespace std;
signed main(){
	int n,a,b;
	cin>>n>>a>>b;
	cout<<min(a,b)<<" "<<max(a+b-n,0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: no matching function for call to 'max(long long int, int)'
    8 |         cout<<min(a,b)<<" "<<max(a+b-n,0);
      |                              ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:8:33: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
    8 |         cout<<min(a,b)<<" "<<max(a+b-n,0);
      |                              ~~~^~~~~~~~~
/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
Language: C++

#include <iostream>
using namestream std;

int main()
{
	int paper_x, paper_y, max, min;
	cin >> paper_x;
	cin >> paper_y;
	if(paper_x <paper_y){
		max = paper_x;
	}else{
		max = paper_y;
	};

	min = paper_y -( N - paper_x );

	cout << max << endl;
	cout << min << endl; 
		
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namestream'
    2 | using namestream std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> paper_x;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:15:26: error: 'N' was not declared in this scope
   15 |         min = paper_y -( N - paper_x );
      |                          ^
a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |         cout << max << 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:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |         cout << max << 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)
      |     ^~~~
Language: C++

#incluse<iostream>
using namespace std;
int main(){
  int n,a,b;
  cin >> n >> a >> b;
  if(a>b){cout<<b<<" ";} else {cout<<a<<" ";}
  if(a+b>n){cout<<a+b-n;} else {cout<<0;}
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluse; did you mean #include?
    1 | #incluse<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n >> a >> b;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incluse<iostream>
a.cc:6:11: error: 'cout' was not declared in this scope
    6 |   if(a>b){cout<<b<<" ";} else {cout<<a<<" ";}
      |           ^~~~
a.cc:6:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:32: error: 'cout' was not declared in this scope
    6 |   if(a>b){cout<<b<<" ";} else {cout<<a<<" ";}
      |                                ^~~~
a.cc:6:32: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:13: error: 'cout' was not declared in this scope
    7 |   if(a+b>n){cout<<a+b-n;} else {cout<<0;}
      |             ^~~~
a.cc:7:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:33: error: 'cout' was not declared in this scope
    7 |   if(a+b>n){cout<<a+b-n;} else {cout<<0;}
      |                                 ^~~~
a.cc:7:33: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include<stdio.h>
int n,a,b,i,j,m;
int main(void){
scanf("%d%d%d",&n,&a,&b);
if(a <= b){
i = a;
m = b;
}else{
i = b;
m = a;
}
 // printf("%d,%d",i,m);

if(n-a+b < n){

   j = 0;
}else{
  j = a+b-n
 

}
  
printf("%d %d\n",i,j);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:12: error: expected ';' before '}' token
   18 |   j = a+b-n
      |            ^
      |            ;
......
   21 | }
      | ~
Language: C

#include<stdio.h>
int n,a,b,i,j,m;
int main(void){
scanf("%d,%d,%d",&n,&a,&b);
if(a <= b){
i = a;
m = b;
}else{
i = b;
m = a;
}
if(n-a+b >= 1){
j = 0;
}else{
j = m-i;
}
printf("%d%d\n",i,j);
}
return 0;



Compiler output:
main.c:19:1: error: expected identifier or '(' before 'return'
   19 | return 0;
      | ^~~~~~
Language: C

#include<stdio.h>
int n,a,b,i,j,m;
int main(void){
scanf("%d%d%d",&n,&a,&b);
if(a <= b){
i = a;
m = b;
}else{
i = b;
m = a;
}
if(n-a+b >= 1){
j = 0;
}else{
j = m-i;
}
printf("%d%d\n",i,j);
}
return 0;



Compiler output:
main.c:19:1: error: expected identifier or '(' before 'return'
   19 | return 0;
      | ^~~~~~
Language: C++

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

int main() {
  int a,b,n;
  cin >> n >> a >> b;
  int x,y;
  if (a-b>=0) {
    x=b/*両方読んでいる最大数*/
  }
  else {
    x=a;
  }
  y=a+b-n;
  cout << x << y << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected ';' before '}' token
    9 |     x=b/*両方読んでいる最大数*/
      |        ^
      |        ;
   10 |   }
      |   ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: expected '}' at end of input
    7 |   cout<<max(a,b)<<" "<<c<< endl;
      |                                 ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N,A,B,c;
  cin >> N >> A >> B;
  if(A=<B) cout << A;
  else cout << B;
  
  c = N-(A+B) 
  if(c>0) cout << c << endl;
  else cout << 0 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected primary-expression before '<' token
    6 |   if(A=<B) cout << A;
      |        ^
a.cc:9:14: error: expected ';' before 'if'
    9 |   c = N-(A+B)
      |              ^
      |              ;
   10 |   if(c>0) cout << c << endl;
      |   ~~          
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else cout << 0 << endl;
      |   ^~~~
Language: C++

#include<stdio.h>
int main(){
  int x,y,n;
  scanf("%d",&n);
  scanf("%d",&a);
  scanf("%d",&b);
  if(a+b<=n){
    if(a<b){
      printf("%d %d",a,0);
    }else{
      printf("%d %d",b,0);
    }
  }else{
    if(a<b){
      printf("%d %d",a,a-(n-b));
    }else{
      printf("%d %d",b,b-(n-a));
    }
  }
  return 0;
}

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

#include<iostream>
using namespace std;

int main(void){
  int A, B, N, MAX, MIN, tmp;
  cin >> N >> A >> B;
  
  MAX = min(A, B);
  
  tmp = A + B - N;
  if(tmp > 0){
    MIN = tmp;
  }
  else{
    MIN = 0
  }
  cout << MAX << MIN << endl;
  return 0;
}


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

#include<iostream>
using namespace std;

int main(void){
  int A, B, N, MAX, MIN, tmp;
  cin >> N >> A >> B;
  
  MAX = mix(A, B);
  
  tmp = A + B - N;
  if(tmp > 0){
    MIN = tmp;
  }
  else{
    MIN = 0
  }
  cout << MAX << MIN << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'mix' was not declared in this scope
    8 |   MAX = mix(A, B);
      |         ^~~
a.cc:15:12: error: expected ';' before '}' token
   15 |     MIN = 0
      |            ^
      |            ;
   16 |   }
      |   ~
Language: C++

#include<iostream>
using namespacee std;

int main(void){
  int A, B, N, MAX, MIN, tmp;
  cin >> N >> A >> B;
  
  MAX = mix(A, B);
  
  tmp = A + B - N;
  if(tmp > 0){
    MIN = tmp;
  }
  else{
    MIN = 0
  }
  cout << MAX << MIN << endl;
  return 0;
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespacee'
    2 | using namespacee std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> N >> A >> B;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:9: error: 'mix' was not declared in this scope
    8 |   MAX = mix(A, B);
      |         ^~~
a.cc:15:12: error: expected ';' before '}' token
   15 |     MIN = 0
      |            ^
      |            ;
   16 |   }
      |   ~         
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout << MAX << MIN << 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:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   cout << MAX << MIN << 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)
      |     ^~~~
Language: C++

#include<iostream>
using namespase std;

int main(void){
  int A, B, N, MAX, MIN, tmp;
  cin >> N >> A >> B;
  
  MAX = mix(A, B);
  
  tmp = A + B - N;
  if(tmp > 0){
    MIN = tmp;
  }
  else{
    MIN = 0
  }
  cout << MAX << MIN << endl;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> N >> A >> B;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:9: error: 'mix' was not declared in this scope
    8 |   MAX = mix(A, B);
      |         ^~~
a.cc:15:12: error: expected ';' before '}' token
   15 |     MIN = 0
      |            ^
      |            ;
   16 |   }
      |   ~         
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout << MAX << MIN << 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:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   cout << MAX << MIN << 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)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))

int N, A, B;

void solve() {
    cin >> N >> A >> B
    cout << min(A, B) << " " << max(A+B-N, 0) << endl;
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:17:23: error: expected ';' before 'cout'
   17 |     cin >> N >> A >> B
      |                       ^
      |                       ;
   18 |     cout << min(A, B) << " " << max(A+B-N, 0) << endl;
      |     ~~~~
Language: Java

import java.util.Scanner;
import java.util.Stack;

public class Restore_the_Tree {

	private static int max = 0;
	private static int count = 0;
	static Stack<Integer> list = new Stack<Integer>();

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arr01 = new int[n + 1][n + 1];
		for (int i = 1; i <= n + m - 1; i++) {
			arr01[scan.nextInt()][scan.nextInt()] = 1;
		}
		int[][] ans = new int[n + 1][n + 1];
		for (int i = 1; i <= n; i++) {
			for (int j = 1; j <= n; j++) {
				if (arr01[j][i] != 0) {
					ans[j][i] = max(arr01, i, j);
					max = 0;
					count = 0;
				}
			}
		}
		for (int i = 1; i <= n; i++) {
			System.out.println(maxPath(ans, i));
		}
		scan.close();
	}

	private static int max(int[][] arr01, int col, int row) {

		count++;
		list.add(row);
		for (int i = 1; i < arr01.length; i++) {
			if (arr01[i][row] != 0) {
				max(arr01, row, i);
			}
		}

		if (count > max) {
			max = count;
		}
		count--;
		list.pop();

		return max;

	}

	private static int maxPath(int ans[][], int col) {
		int max = 0;
		int ret = 0;
		for (int i = 1; i < ans.length; i++) {
			if (ans[i][col] > max) {
				max = ans[i][col];
				ret = i;
			}
		}
		return ret;
	}
}


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

private static int max = 0;
	private static int count = 0;
	static Stack<Integer> list = new Stack<Integer>();

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arr01 = new int[n + 1][n + 1];
		for (int i = 1; i <= n + m - 1; i++) {
			arr01[scan.nextInt()][scan.nextInt()] = 1;
		}
		int[][] ans = new int[n + 1][n + 1];
		for (int i = 1; i <= n; i++) {
			for (int j = 1; j <= n; j++) {
				if (arr01[j][i] != 0) {
					ans[j][i] = max(arr01, i, j);
					max = 0;
					count = 0;
				}
			}
		}
		for (int i = 1; i <= n; i++) {
			System.out.println(maxPath(ans, i));
		}
		scan.close();
	}

	private static int max(int[][] arr01, int col, int row) {

		count++;
		list.add(row);
		for (int i = 1; i < arr01.length; i++) {
			if (arr01[i][row] != 0) {
				max(arr01, row, i);
			}
		}

		if (count > max) {
			max = count;
		}
		count--;
		list.pop();

		return max;

	}

	private static int maxPath(int ans[][], int col) {
		int max = 0;
		int ret = 0;
		for (int i = 1; i < ans.length; i++) {
			if (ans[i][col] > max) {
				max = ans[i][col];
				ret = i;
			}
		}
		return ret;
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
private static int max = 0;
               ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.*;

public class Restore_the_Tree {

	private static int max = 0;
	private static int count = 0;
	static Stack<Integer> list = new Stack<Integer>();

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		int[][] arr01 = new int[n + 1][n + 1];
		for (int i = 1; i <= n + m - 1; i++) {
			arr01[scan.nextInt()][scan.nextInt()] = 1;
		}
		int[][] ans = new int[n + 1][n + 1];
		for (int i = 1; i <= n; i++) {
			for (int j = 1; j <= n; j++) {
				if (arr01[j][i] != 0) {
					ans[j][i] = max(arr01, i, j);
					max = 0;
					count = 0;
				}
			}
		}
		for (int i = 1; i <= n; i++) {
			System.out.println(maxPath(ans, i));
		}
		scan.close();
	}

	private static int max(int[][] arr01, int col, int row) {

		count++;
		list.add(row);
		for (int i = 1; i < arr01.length; i++) {
			if (arr01[i][row] != 0) {
				max(arr01, row, i);
			}
		}

		if (count > max) {
			max = count;
		}
		count--;
		list.pop();

		return max;

	}

	private static int maxPath(int ans[][], int col) {
		int max = 0;
		int ret = 0;
		for (int i = 1; i < ans.length; i++) {
			if (ans[i][col] > max) {
				max = ans[i][col];
				ret = i;
			}
		}
		return ret;
	}
}


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

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

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

  int max = min(a, b);
  int min = max(0, a + b - n);

  cout << max << " " << min << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'max' cannot be used as a function
    9 |   int min = max(0, a + b - n);
      |             ~~~^~~~~~~~~~~~~~
Language: Java

package AtCoder.Nekkei;

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

public class NA {
    
    public static void main(String[] args) {
    	Scanner s = new Scanner(System.in);
        int n = s.nextInt();
//        int[] arr = s.nextIntArray(n);

        int a = s.nextInt();
        int b = s.nextInt();
        System.out.println(Math.min(a,b) + " " + Math.max(0,(a+b-n)));

//        if (!oj) {
//            System.out.println(Arrays.deepToString(new Object[]{System.currentTimeMillis() - time + " ms"}));
//        }
        //out.flush();
    }

}

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

import java.util.Scanner;
import java.math.*;
public class Solution
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int a=sc.nextInt();
    int b=sc.nextInt();
    int max=(int)Math.min(a,b);
    int min=0;
    if((a+b)>n)
      	min=(a+b)-n;
   	else
      	min=0;
    System.out.println(max+" "+min);
  }
}

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<bits/stdc++.h>
 
using namespace std;
 
int main()
{
  int n,x,y;
  cin>>n>>x>>y;
 cout<<min(x,y)<<' '<<max(0,x + y − n)<<endl;
 return 0;
    
}

Compiler output:
a.cc:9:35: error: extended character − is not valid in an identifier
    9 |  cout<<min(x,y)<<' '<<max(0,x + y − n)<<endl;
      |                                   ^
a.cc: In function 'int main()':
a.cc:9:34: error: expected ')' before '\U00002212'
    9 |  cout<<min(x,y)<<' '<<max(0,x + y − n)<<endl;
      |                          ~       ^~
      |                                  )
Language: C++

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

int main(){
  int N, a, b;
  cin >> N >> a >> b;
  cout << (a < b ? a:b) << " " << ((a + b) -N >= 0 ? (a + b) - N:0)
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:68: error: expected ';' before 'return'
    8 |   cout << (a < b ? a:b) << " " << ((a + b) -N >= 0 ? (a + b) - N:0)
      |                                                                    ^
      |                                                                    ;
    9 |   return 0;
      |   ~~~~~~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
  int n,x,y;
  scanf("%d%d%d",&n,&x,&y);
  if(n>=x+y) printf("%d %d",fmin(x,y),0);
  else printf("%d %d",fmin(x,y),a+b-n);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:33: error: 'a' undeclared (first use in this function)
    7 |   else printf("%d %d",fmin(x,y),a+b-n);
      |                                 ^
main.c:7:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:35: error: 'b' undeclared (first use in this function)
    7 |   else printf("%d %d",fmin(x,y),a+b-n);
      |                                   ^