criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.io.*;

public class Sample1{

     public static void main(String []args) throws IOException {
        
        try{
        
        
            //格納(N A B)
            int n = 0
            int a = 0
            int b = 0
            
            for(int i = 0; i < 3; i++){
                
                BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                int num = Integer.ParseInt(in.readLine());
                
                
                switch(i){
                    case 0:
                        n = num;
                    case 1:
                        a = num;
                    case 2:
                        b = num;
                    
                 }
               }
            
            String max = new String();
            String min = new String();
            
            //max算出
            if(a <= b){
                max = a
            }else{
                max = b
            }
            
            //min算出
            int tmp = a + b - n;
            
            if(tmp >= 0){
                min = tmp
            }else{
                min = 0
            }
            
            System.out.println( max + " " + min );
            
        
         }catch(Exception e){
        
           System.out.println(e); 
           
         }
     }
}

Compiler output:
Main.java:11: error: ';' expected
            int n = 0
                     ^
Main.java:12: error: ';' expected
            int a = 0
                     ^
Main.java:13: error: ';' expected
            int b = 0
                     ^
Main.java:37: error: ';' expected
                max = a
                       ^
Main.java:39: error: ';' expected
                max = b
                       ^
Main.java:46: error: ';' expected
                min = tmp
                         ^
Main.java:48: error: ';' expected
                min = 0
                       ^
7 errors
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> N >> A >> B;
      |         ^~~
a.cc:5:17: error: 'cout' was not declared in this scope
    5 |                 cout << A<<" ";
      |                 ^~~~
a.cc:7:14: error: 'cout' was not declared in this scope
    7 |         else cout << B<<" ";
      |              ^~~~
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout << 0;
      |                 ^~~~
a.cc:11:14: error: 'cout' was not declared in this scope
   11 |         else cout << A + B - N;
      |              ^~~~
Language: C++

#include "pch.h"

#include<stdio.h>


int main()
{
	int p = 0;
	int a = 0;
	int b = 0;
	int y = 0;
	int n = 0;
	int s = 0;
	
	scanf_s("%d%d%d", &p,&a,&b);


	if (a < b) {
		y = a;
	}
	else {
		y = b;
	}
	
	s = a + b;
	n = s - p;
	if (n < 0) {
		n = 0;
	}
	printf("%d %d\n", y, n);
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C

#include <studio.h>
int main(void){

int 1<=N,N<=100;
int 0<=A,A<=N;
int 0<=B,B<=N;
int max,min;

scanf(%d %d %d,N,A,B);
if(A<B&&N>=A+B){
max=A;
min=0;
}
else if(A<B&&N<=A+B){
max=A;
min=A+B-N;
}

else if(A>B&&N>=A+B){
max=B;
min=0;
}
else if(A>B&&N<=A+B){
max=B;
min=A+B-N;
}
else if(N==A==B){
max=A;
min=A;
}
printf(“%d %d”,max,min);
return 0;
}

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

#include "pch.h"
#include <iostream>
#include<stdio.h>


int main()
{
	int p = 0;
	int a = 0;
	int b = 0;
	int y = 0;
	int n = 0;
	int s = 0;
	
	scanf_s("%d%d%d", &p,&a,&b);


	if (a < b) {
		y = a;
	}
	else {
		y = b;
	}
	
	s = a + b;
	n = s - p;
	if (n < 0) {
		n = 0;
	}
	printf("%d %d\n", y, n);
}

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


#include "pch.h"
#include <iostream>
#include<stdio.h>


int main()
{
	int p = 0;
	int a = 0;
	int b = 0;
	int y = 0;
	int n = 0;
	int s = 0;
	
	scanf_s("%d%d%d", &p,&a,&b);


	if (a < b) {
		y = a;
	}
	else {
		y = b;
	}
	s = a + b;
	n = s - p;
	if (n < 0) {
		n = 0;
	}
	printf("%d %d\n", y, n);
}

Compiler output:
a.cc:2:10: fatal error: pch.h: No such file or directory
    2 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: Java

import java.util.*;
public class Main {
	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 c, d;
		if ((A+B) > N) {
		  d = (A + B) - N;
		}
		if(A > B){
		  c = B;
		}else{
		  c = A;
		}
		System.out.println(c + " " + d);
	}
}

Compiler output:
Main.java:17: error: variable d might not have been initialized
		System.out.println(c + " " + d);
		                             ^
1 error
Language: C++

#include <iostream>

int max(int a,int b);
int minn(int n, int a, int b);
int main(){

	int N,A,B;

	std::cin>>N>>A>>B;
	std::cout<<max(A,B)<<minn(N,A,B)<<std::endl;
	
	return 0;
}

int max(int a,int b){

	if(a>b){
		return a;
	}else{
		return b;
	}
}

int minn(int n,int a,int b){
	temp = a+b-n;
	if(temp>0){
		return temp;
	}else{
		return 0;
	}
}



Compiler output:
a.cc: In function 'int minn(int, int, int)':
a.cc:25:9: error: 'temp' was not declared in this scope; did you mean 'tm'?
   25 |         temp = a+b-n;
      |         ^~~~
      |         tm
Language: Java

public class Main {
    public static void main (String args[]) {
        Scanner sc = new Scanner(System.in);
    	int n = Integer.parseInt(sc.next());
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int max = 0;
        int min = -1;

        if (n >= a + b) {
        	min = 0;
        } else {
        	min = a + b - n;
        }

        if (a > b) {
        	max = b;
        } else {
        	max = a;
        }

        System.out.println(max + " " + min);
    }
}


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

#include<stdio.h>
int main(void)
{
int x,y;
char a[50],b[50],c[50];
scanf("%d",&x);
scanf("%s",a[]);
scanf("%s",b[]);
scanf("%s",c[]);
printf("%d",y);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected expression before ']' token
    7 | scanf("%s",a[]);
      |              ^
main.c:8:14: error: expected expression before ']' token
    8 | scanf("%s",b[]);
      |              ^
main.c:9:14: error: expected expression before ']' token
    9 | scanf("%s",c[]);
      |              ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: expected ';' before 'A'
    7 |     if (A < B) cout << A A-N-B << endl;
      |                         ^~
      |                         ;
a.cc:8:19: error: expected ';' before 'B'
    8 |     else cout << B B-N-A << endl;
      |                   ^~
      |                   ;
Language: Java

public class Main {
	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 c, d;
		d = (A + B) - N;
		if(A > B){
		  c = B;
		}else{
		  c = A;
		}
		System.out.println(c + " " + d);
	}
}

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

#include <iostream>
using namespace std;
int main(){

int N,A,B;
int max,min;

 cin >> N >>A >>B;
 if(A>B)
 max =B;
 elseif(B>A)
 max = A; 

if(A+B>N)
min = A+B-N;
else if(A+B<N&&A>B)
 min =B;
 else if(A+B<N&&A<B)
 min = A;
 cout << max << " "<<min<< endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:2: error: 'elseif' was not declared in this scope
   11 |  elseif(B>A)
      |  ^~~~~~
Language: Java

import java.util.Scanner;

public class q1koudoku {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int nmax = sc.nextInt();
		int anum = sc.nextInt();
		int bnum = sc.nextInt();

		int nummax = 0;
		int nummin = 0;

		if(anum < bnum) {
			nummax = anum;
		}else {
			nummax = bnum;
		}
		System.out.println(nummax);

		nummin = nmax - anum - bnum;

		if (nummin > 0) {
			System.out.println(0);
		}else {
			System.out.println(Math.abs(nummin));
		}

	    sc.close();

	}

}

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

class Main{
    public static void main(String args[]){
         int a=Integer.parseInt(args[0]);
         int b=Integer.parseInt(args[1]);
         int c=Integer.parseInt(args[2]);
         int l,s;
         if(b>=c){
            l=b;
            s=c;
        }else{
            l=c;
            s=b;
        }
        System.out.println(s+"  "+s-(a-l));
}

Compiler output:
Main.java:15: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;

public class Subscribers {

	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 = 0;
		int min = 0;


		if(a < b) {
			max = b;
			min = a;
		} else {
			max = a;
			min = b;
		}

		int resultMin = min - (n - max);

		if(resultMin < 0) {
			resultMin = 0;
		}


		System.out.println(min + " " + resultMin);

		sc.close();
	}

}


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

#include <studio.h>
int main(void){

int 1>=N,N<=100;
int 0>=A,A<=N;
int 0>=B,B<=N;
int max,min;

scanf(%d %d %d,N,A,B);
if(A<B){
max=A;
min=B-A;
printf(“%d %d”,max,min);
}
else if(A>B){
max=B;
min=A-B;
printf(“%d %d”,max,min);
}
else if(A==B){
max=A;
min=A;
printf(“%d %d”,max,min);
}
return 0;
}

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

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

	int n = Integer.parseInt(args[0]);
	int a = Integer.parseInt(args[1]);
	int b = Integer.parseInt(args[2]);

	int max = a < b ? b : a;
	int min;
	if ((a + b) < n) {
		min = 0;
	} else {
		min = (a + b) - n;
	}
	Sytem.out.println(String.valueOf(min));
	Sytem.out.println(String.valueOf(max));
}

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

#include <studio.h>
int main(void){

int 1>=N,N<=100;
int 0>=A,A<=N;
int 0>=B,B<=N;
int max,min;

scanf(%d %d %d,N,A,B);
if(A<B){
max=A;
min=B-A;
printf(“%d %d”,max,min);
}
else if(A>B){
max=B;
min=A-B;
printf(“%d %d”,max,min);
}
else if(A==B){
max=A;
min=A;
printf(“%d %d”,max,min);
}
return 0;
}

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

#include<stdio.h>
int main(void)
{
  int n, a, b, o, m, c;

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

  if (n > a + b) {
    m = 0;
  }else if (n < a + b && a < b) {
    m = b - a;
  }else if (n < a + b && a = b) {
    c = n - a;
    m = a - c;
  }else if (n < a + b && a > b) {
    m = a - b;
  }

  if (n > a + b && a < b) {
    o = b - a;
  }else if (n > a + b && a = b) {
    o = a;
  }else if (n > a + b && a > b) {
    o = a - b;
  }else if (n = a + b && a < b) {
    o = a;
  }else if (n = a + b && a = b) {
    o = a;
  }else if (n = a + b && a > b) {
    o = b;
  }else if (n < a + b && a < b) {
    o = a;
  }else if (n < a + b && a = b) {
    o = a;
  }else if (n < a + b && a > b) {
    o = a;
  }

  printf("%d %d", &o, &m);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:28: error: lvalue required as left operand of assignment
   14 |   }else if (n < a + b && a = b) {
      |                            ^
main.c:23:28: error: lvalue required as left operand of assignment
   23 |   }else if (n > a + b && a = b) {
      |                            ^
main.c:29:28: error: lvalue required as left operand of assignment
   29 |   }else if (n = a + b && a = b) {
      |                            ^
main.c:35:28: error: lvalue required as left operand of assignment
   35 |   }else if (n < a + b && a = b) {
      |                            ^
Language: C

#include<stdio.h>
int main(void)
{
	int n, a, b;
	scanf_s("%d %d %d", &n, &a, &b);

	if (a < b != a == b)
	{
		printf("%d 0", a);
	}
	else if (a == b)
	{
		printf("%d %d", a, b);
	}
	else
	{
		a = a - b;
		printf("%d %d", b, a);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d %d %d", &n, &a, &b);
      |         ^~~~~~~
      |         scanf
Language: C++

#include "pch.h"
#include <iostream>

using namespace std;

int main()
{
	//std::cout << "Hello World!\n";

	int N, a, b;
	cin >> N >> a >> b;

	//cout << a << "," << b << "," << c;

	int max = a;
	if (b < a) {
		max = b;
	}

	int min = 0;
	if (N < a + b) {

		min = a + b - N;
	}
	cout << max << "," << min;
	
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Subscribers {

	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String line = br.readLine();
			String[] input = line.split(" ", 0);

			int N = Integer.parseInt(input[0]);
			int A = Integer.parseInt(input[1]);
			int B = Integer.parseInt(input[2]);

			int mn = 0;
			if (A + B > N) {
				mn = (A + B) - N;
			}
			int mx = Math.min(A, B);
			
			System.out.println(mx + " " + mn);

		} catch (Exception exp) {
			exp.printStackTrace();
		}
	}
}


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

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


Compiler output:
a.cc:9:23: error: extended character “ is not valid in an identifier
    9 |   cout << min(a,b) << “ “ << max(0,a+b-n) << endl;
      |                       ^
a.cc:9:25: error: extended character “ is not valid in an identifier
    9 |   cout << min(a,b) << “ “ << max(0,a+b-n) << endl;
      |                         ^
a.cc: In function 'int main()':
a.cc:9:23: error: '\U0000201c' was not declared in this scope
    9 |   cout << min(a,b) << “ “ << max(0,a+b-n) << endl;
      |                       ^
Language: C++

#include<bits/stdc++.h>
using ll  = long long;
#define int ll
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define erep(e,v) for(auto && e :v)
#define all(in) in.begin(), in.end()
#define MP make_pair
#define INF (sizeof(int) == 4 ? (int)1e9:(int)1e18)
#define EPS 0.0000000001
using namespace std;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<typename Head, typename Value> auto vectors(const Head &head, const Value &v) { return vector<Value>(head, v); }
template<typename Head, typename... Tail> auto vectors(Head x, Tail... tail) { auto inner = vectors(tail...); return vector<decltype(inner)>(x, inner); }
template<class T> void join(T a){for(auto itr :a){if(itr != *a.begin())cout << a" "; cout << itr;} }
using ld  = long double;
using pii = pair<int,int>;
using piii = pair<int,pii>;
int W,H;
int dx[]={0,0,1,-1}, dy[]={1,-1,0,0};
bool valid(int x,int y){return (0<=x&&x<W)&&(0<=y&&y<H);}
signed main(){
    int n,a,b; cin >> n >> a >> b;
    cout << min(a,b) << " " << max(a+b-n,0LL) << endl;
}




Compiler output:
a.cc: In function 'void join(T)':
a.cc:16:81: error: expected ';' before string constant
   16 | template<class T> void join(T a){for(auto itr :a){if(itr != *a.begin())cout << a" "; cout << itr;} }
      |                                                                                 ^~~
      |                                                                                 ;
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>

usin
 
int main() {
int N,A,B;
    std::cin >> N;
    std::cin >> A;
    std::cin >> B;

int M=0;
    M=std::min(A,B);

int Mi=0;
    if(A+B>N)Mi=A+B-N;

    std::cout << std::to_string(M) +" "+ std::to_string(Mi);


    return 0;
}

Compiler output:
a.cc:5:1: error: 'usin' does not name a type
    5 | usin
      | ^~~~
Language: C++

Public int newsRead(int N,int A,int B){

　if(A > B){

         return A + " " + 0;




Compiler output:
a.cc:3:1: error: extended character 　 is not valid in an identifier
    3 | 　if(A > B){
      | ^
a.cc:1:1: error: 'Public' does not name a type
    1 | Public int newsRead(int N,int A,int B){
      | ^~~~~~
Language: C

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

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

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

Compiler output:
a.cc:9:19: error: extended character “ is not valid in an identifier
    9 |   cout<<min(a,b)<<“ “<<max(0,a+b-n)<<endl;
      |                   ^
a.cc:9:21: error: extended character “ is not valid in an identifier
    9 |   cout<<min(a,b)<<“ “<<max(0,a+b-n)<<endl;
      |                     ^
a.cc: In function 'int main()':
a.cc:9:19: error: '\U0000201c' was not declared in this scope
    9 |   cout<<min(a,b)<<“ “<<max(0,a+b-n)<<endl;
      |                   ^
Language: Java

public class Main {

	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 min = 0;
        int max = A;

        if(A < B) {
        	max = A;
        	if(B > N /2) {
        		min = B - A;
        	}
        }else if(A > B) {
        	max = B;
        	if(A > N /2) {
        		min = A - B;
        	}
        }else {
        	max = A;
        	min = A;
        }

        System.out.println(max + " " + min);
	}

}

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

#include <iostream>
#include <string>
using namespace std;
 
int main() {
   int N, A, B, c, d;
    cin >> a >> b >> c;
    if (A > B) {
		c = B;
    }else {
        c = A; 
    }

    if (N > A+B) {
		d = 0;
    }else {
        d = A+B-N; 
    }

    
  
    cout << c << " " << d << endl;
}


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

#include<bits/stdc++.h>

using namespace std;

#define ll long long

int main()
{
    ll n , m , k;
    cin >> n >> m >> k;
    cout << min(m,k) << " " << min(0,(m+k-n)) << endl;
    return 0;
}


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

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

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.awt.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.awt.geom.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import static java.lang.System.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import static java.lang.Math.*;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>

int max(int a, int b){
	return a >= b ? a : b;
}
int min(int a, int b){
	return a <= b ? a : b;
}
int compare_int(const void *a, const void *b){
    return *(int*)a - *(int*)b;
}

int euclid(int a, int b){
  if(a < b){
    int tmp = a;a = b;b = tmp;
  }
  int r = a % b;
  if(r < 0) r += b;
  while(r != 0){
    a = b;b = r;r = a % b;
    if(r < 0) r += b;
  }
  return b;
}

int main(){
  int N,A,B,syou,dai;
  scanf("%d %d %d",&N,&A,&B);
	if(A+B>=N){
		syou = A+B=N;
	}
	else{
		syou = 0;
	}
	dai=min(A,B);
	printf("%d %d",dai,syou);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:32:27: error: lvalue required as left operand of assignment
   32 |                 syou = A+B=N;
      |                           ^
Language: Java

import java.lang.*

public class Main {
    public static void main (String args[]) {
        int n = Integer.parseInt(args[0]);
        int a = Integer.parseInt(args[1]);
        int b = Integer.parseInt(args[2]);
        int max = 0;
        int min = 0;

        if (a == b) {
        	max = a;
        	min = 0;
        } else if (a > b) {
        	max = b;
        	min = a - b;
        } else {
        	max = a;
        	min = b - a;
        }

        System.out.println(max + " " + min);
    }
}


Compiler output:
Main.java:1: error: ';' expected
import java.lang.*
                  ^
1 error
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:18: error: expected ';' before 'b'
   11 |     if(a < b) max b;
      |                  ^~
      |                  ;
Language: Java

        int n = Integer.parseInt(args[0]);
        int a = Integer.parseInt(args[1]);
        int b = Integer.parseInt(args[2]);
        int max = 0;
        int min = 0;

        if (a == b) {
        	max = a;
        	min = 0;
        } else if (a > b) {
        	max = b;
        	min = a - b;
        } else {
        	max = a;
        	min = b - a;
        }

        System.out.println(max + " " + min);

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
        int n = Integer.parseInt(args[0]);
        ^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: class, interface, enum, or record expected
        if (a == b) {
        ^
Main.java:9: error: class, interface, enum, or record expected
        	min = 0;
        	^
Main.java:10: error: class, interface, enum, or record expected
        } else if (a > b) {
        ^
Main.java:12: error: class, interface, enum, or record expected
        	min = a - b;
        	^
Main.java:13: error: class, interface, enum, or record expected
        } else {
        ^
Main.java:15: error: class, interface, enum, or record expected
        	min = b - a;
        	^
Main.java:16: error: class, interface, enum, or record expected
        }
        ^
8 errors
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:18: error: expected ';' before 'b'
   11 |     if(a < b) max b;
      |                  ^~
      |                  ;
Language: C++

li = [int(i) for i in input().split()]
n = li[0]
a = li[1]
b = li[2]
res1 = max(a,b)
if a+b-n<0:
    res2 =0
else:
    res2=a+b-n
print(res1, res2)


Compiler output:
a.cc:1:1: error: 'li' does not name a type
    1 | li = [int(i) for i in input().split()]
      | ^~
Language: C++

#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <unordered_map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define ll long long

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

}
~        

Compiler output:
a.cc:30:2: error: expected class-name at end of input
   30 | ~
      |  ^
Language: C++


#include <bits/stdc++.h>

using namespace std;

#define rep(i, x)   for (__typeof(x) i = 0; i < x; i++)
#define mp             make_pair
#define pb             push_back
#define fi             first
#define se             second
#define sz(x)          (int)((x).size())
#define all(x)         (x).begin(), (x).end()
#define sci(x)         int x;       scanf("%d", &x);
#define scii(x, y)     int x, y;    scanf("%d %d", &x, &y);
#define sciii(x, y, z) int x, y, z; scanf("%d %d %d", &x, &y, &z);
#define TC(x)          sci(x); while(x --)
#define eprintf(...)   fprintf(stderr, __VA_ARGS__)
#define debug(x)       { cerr << #x << " = " << x << endl; }
#define repi(i, x)  for (__typeof(x) i = x-1; i >= 0; i --)
#define fore(itr, x)   for (__typeof(x.begin()) itr = x.begin(); itr != x.end(); itr ++)
#define forei(itr, x)  for (__typeof(x.end()) itr = x.end() - 1; itr != x.begin() - 1; itr --)
typedef long long      ll;
typedef pair<int, int> ii;
typedef pair<ii, int>  iii;
typedef vector<int>    vi;
typedef vector<ii>     vii;
typedef vector<iii>    viii;
typedef vector<vector<int> > vvi;
const   int            infi = numeric_limits<int>::max();
const   double         eps = 0;
const   int            ms  = 0;
template <typename T>


int main()
{
    ios::sync_with_stdio(false);//endl->"\n"
    cin.tie(0);
    int N, A, B;
    cin >> N >> A >> B;

    cout << min(A, B) << max((A+B)-N, 0) << "\n";
    return 0;
}

Compiler output:
a.cc:35:5: error: cannot declare '::main' to be a template
   35 | int main()
      |     ^~~~
Language: C++


#include <bits/stdc++.h>

using namespace std;

#define rep(i, x)   for (__typeof(x) i = 0; i < x; i++)
#define mp             make_pair
#define pb             push_back
#define fi             first
#define se             second
#define sz(x)          (int)((x).size())
#define all(x)         (x).begin(), (x).end()
#define sci(x)         int x;       scanf("%d", &x);
#define scii(x, y)     int x, y;    scanf("%d %d", &x, &y);
#define sciii(x, y, z) int x, y, z; scanf("%d %d %d", &x, &y, &z);
#define TC(x)          sci(x); while(x --)
#define eprintf(...)   fprintf(stderr, __VA_ARGS__)
#define debug(x)       { cerr << #x << " = " << x << endl; }
#define repi(i, x)  for (__typeof(x) i = x-1; i >= 0; i --)
#define fore(itr, x)   for (__typeof(x.begin()) itr = x.begin(); itr != x.end(); itr ++)
#define forei(itr, x)  for (__typeof(x.end()) itr = x.end() - 1; itr != x.begin() - 1; itr --)
typedef long long      ll;
typedef pair<int, int> ii;
typedef pair<ii, int>  iii;
typedef vector<int>    vi;
typedef vector<ii>     vii;
typedef vector<iii>    viii;
typedef vector<vector<int> > vvi;
const   int            infi = numeric_limits<int>::max();
const   double         eps = 0;
const   int            ms  = 0;
template <typename T>


int main()
{
    ios::sync_with_stdio(false);//endl->"\n"
    cin.tie(0);
    int N, A, B;
    cin >> N >> A >> B;

    cout << min(A, B) << min((A+B)-N, 0) << "\n";
    return 0;
}

Compiler output:
a.cc:35:5: error: cannot declare '::main' to be a template
   35 | int main()
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <numeric>

#define ull unsigned long long
#define ul unsigned long
#define ll long long
#define size_t unsigned long long

using namespace std;

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

  //sort(td.begin(), td.end(), [](auto& x, auto& y){return x[0] > y[0];});
  int n,a,b;
  std::cin >> n >> a >> b;

  int ma,mi;

  ma = max(a,b);

  mi = n - mi(a,b);
  if(a + b - n > 0){
    std::cout << ma << " " << a + b - n << '\n';
  }else{
    std::cout << ma << " " << 0 << '\n';
  }


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: 'mi' cannot be used as a function
   27 |   mi = n - mi(a,b);
      |            ~~^~~~~
Language: C++

n,a,b=map(int,input().split())
mxs=min(a,b)
mns=max(0,a+b-n)
print(mxs,mns)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,a,b=map(int,input().split())
      | ^
Language: C

#include<stdio.h>
int main(void){
    int N,A,B,x,y;
    scanf("%d %d %d",%N,%A,%B);
    if(A>B){
        x=B;
    }else{
        x=A;
    }
    if(N-(A+B)<0){
        y=0;
    }else{
        y=N-(A+B);
    }
    printf("%d %d\n",x,y);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:22: error: expected expression before '%' token
    4 |     scanf("%d %d %d",%N,%A,%B);
      |                      ^
Language: C++


#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <unordered_map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define ll long long

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

}
~        

Compiler output:
a.cc:31:2: error: expected class-name at end of input
   31 | ~
      |  ^
Language: C++

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'e' was not declared in this scope
    9 |         e=b+c-a;
      |         ^
a.cc:12:9: error: 'e' was not declared in this scope
   12 |         e=0;
      |         ^
a.cc:14:18: error: 'e' was not declared in this scope
   14 |         cout<<d<<e<<endl;
      |                  ^
Language: C++

#include <bits/stdc++.h>
#define mk make_pair
#define fs first
#define sc second
using namespace std;
typedef long long ll;
typedef long double ld;
int main(){
    int n, a, b;
    while(cin>>n>>a>>b){
        int mx, mn;
        mx=min(a, b);
        mn=max(0, a+b-n);
        cout<<mx<<" "<<mn<<endl;
    }
  return 0;
}


#include <bits/stdc++.h>
#define mk make_pair
#define fs first
#define sc second
using namespace std;
typedef long long ll;
typedef long double ld;
int main(){
    int n, a, b;
    while(cin>>n>>a>>b){
        int mx, mn;
        mx=min(a, b);
        mn=max(0, a+b-n);
        cout<<mx<<" "<<mn<<endl;
    }
  return 0;
}




Compiler output:
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main(){
      |     ^~~~
a.cc:8:5: note: 'int main()' previously defined here
    8 | int main(){
      |     ^~~~
Language: C++

#include <stdio.h>
#include <cmath>
#include <stdlib.h>
#include <algorithm>

int main()
{
    int n, a,b;    
    scanf("%d", &n);
    scanf("%d", &a);
    scanf("%d", &b);

    printf("%d %d", std::max(0,a+b-n), std::min(a,bn));
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:51: error: 'bn' was not declared in this scope; did you mean 'b'?
   13 |     printf("%d %d", std::max(0,a+b-n), std::min(a,bn));
      |                                                   ^~
      |                                                   b
Language: C++

{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE BinaryLiterals #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NumDecimals #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}

import Control.Applicative
import Control.Arrow
import Control.Monad
import Control.Monad.ST

import Data.Char
import Data.List
import Data.Maybe

import qualified Data.ByteString.Char8 as B

import Data.Array.ST.Safe
import Data.STRef

import Debug.Trace
import Text.Printf

readInt = readLn :: IO Int
readInts = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine
readNInts = readInt >>= flip replicateM readInt

which a b f = if f then a else b
mp [ a, b ] = ( a, b )

main = do
	[ n, a, b ] <- readInts
	let
		mi = min a b
		ma = max 0 ( -( n - a - b ) )
	printf "%d %d\n" mi ma

Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | {-# LANGUAGE BangPatterns #-}
      |   ^
a.cc:1:27: error: stray '#' in program
    1 | {-# LANGUAGE BangPatterns #-}
      |                           ^
a.cc:2:3: error: stray '#' in program
    2 | {-# LANGUAGE BinaryLiterals #-}
      |   ^
a.cc:2:29: error: stray '#' in program
    2 | {-# LANGUAGE BinaryLiterals #-}
      |                             ^
a.cc:3:3: error: stray '#' in program
    3 | {-# LANGUAGE MultiWayIf #-}
      |   ^
a.cc:3:25: error: stray '#' in program
    3 | {-# LANGUAGE MultiWayIf #-}
      |                         ^
a.cc:4:3: error: stray '#' in program
    4 | {-# LANGUAGE NumDecimals #-}
      |   ^
a.cc:4:26: error: stray '#' in program
    4 | {-# LANGUAGE NumDecimals #-}
      |                          ^
a.cc:5:3: error: stray '#' in program
    5 | {-# LANGUAGE ScopedTypeVariables #-}
      |   ^
a.cc:5:34: error: stray '#' in program
    5 | {-# LANGUAGE ScopedTypeVariables #-}
      |                                  ^
a.cc:6:3: error: stray '#' in program
    6 | {-# LANGUAGE TupleSections #-}
      |   ^
a.cc:6:28: error: stray '#' in program
    6 | {-# LANGUAGE TupleSections #-}
      |                            ^
a.cc:1:1: error: expected unqualified-id before '{' token
    1 | {-# LANGUAGE BangPatterns #-}
      | ^
a.cc:2:1: error: expected unqualified-id before '{' token
    2 | {-# LANGUAGE BinaryLiterals #-}
      | ^
a.cc:3:1: error: expected unqualified-id before '{' token
    3 | {-# LANGUAGE MultiWayIf #-}
      | ^
a.cc:4:1: error: expected unqualified-id before '{' token
    4 | {-# LANGUAGE NumDecimals #-}
      | ^
a.cc:5:1: error: expected unqualified-id before '{' token
    5 | {-# LANGUAGE ScopedTypeVariables #-}
      | ^
a.cc:6:1: error: expected unqualified-id before '{' token
    6 | {-# LANGUAGE TupleSections #-}
      | ^
a.cc:8:1: error: 'import' does not name a type
    8 | import Control.Applicative
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

//
//  atcoder.cpp
//  
//
//  Created by 中川阿津志 on 2018/12/05.
//
#include <bits/stdc++.h>
#define REP(i, N) for(int i=0; i<N; i++)
using namespace std;

//#include "atcoder.hpp"

long long gcd(long long a, long long b) {
    if (a>b) swap(a,b);
    
    auto r = b % a;
    
    return (r ? gcd(r, a) : a);
}
int main() {
    long long  N, P, r = 0;
    vector<int> w(1, 1);
    int A,B;
    cin >> A >> B;


    cout << min(A, B) << " " << max(A+B - N, 0) << endl;

    return 0;
}


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

#include <bits/stdc++.h>
#define all(x) begin(x),end(x)
#define rall(x) (x).rbegin(),(x).rend()
#define REP(i,b,n) for(int i=(int)(b);i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define repsz(i,v) rep(i,(v).size())
#define aur auto&
#define bit(n) (1LL<<(n))
#define eb emplace_back
#define mt make_tuple
#define fst first
#define snd second
using namespace std;
typedef long long ll;
//#define int long long
template<class C>int size(const C &c){ return c.size(); }
template<class T,class ...U>bool chmin(T&a, const U&...bs){const T b(bs...);if(a<=b)return false;a=b;return true;}
template<class T,class ...U>bool chmax(T&a, const U&...bs){const T b(bs...);if(a>=b)return false;a=b;return true;}

bool solve(){
    int n; cin >> n;
    int a, b; cin >> a >> b;
    cout << << min(a, b) << ' ' << max(0, a + b - n) << endl;
    return true;
}
signed main(){
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << std::fixed << std::setprecision(10);
    solve();
    return 0;
}
// vim:set foldmethod=marker commentstring=//%s:


Compiler output:
a.cc: In function 'bool solve()':
a.cc:24:13: error: expected primary-expression before '<<' token
   24 |     cout << << min(a, b) << ' ' << max(0, a + b - n) << endl;
      |             ^~
Language: C++

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
using namespace std;

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

using LL = long long;
using PII = pair<int, int>;
using VI = vector<int>;


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

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