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

#include<cstdio>
__int64 rank(__int64 n)
{
	for (__int64 i=n-1;i>1;i--)
	{
		n*=i;
		n=n%1000000007;
	}
	return n;
}
int main()
{
	__int64 n;
	while (scanf("%I64d",&n)==1)
	{
		printf("%I64d\n",rank(n));
	}
	return 0;
}


Compiler output:
a.cc:2:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    2 | __int64 rank(__int64 n)
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:13:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   13 |         __int64 n;
      |         ^~~~~~~
      |         __int64_t
a.cc:14:31: error: 'n' was not declared in this scope
   14 |         while (scanf("%I64d",&n)==1)
      |                               ^
a.cc:16:34: error: 'rank' was not declared in this scope
   16 |                 printf("%I64d\n",rank(n));
      |                                  ^~~~
Language: C++

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

int main(void)
{
	int n,p=1;
	cin >> n;
	
	for(int i=1;i<=n;i++){
		p*=i;
	}
	
	cout << p%((int)(pow(10,9))+7) << endl;
	
	return 0;
}


Compiler output:
a.cc:2:9: error: #include expects "FILENAME" or <FILENAME>
    2 | #include
      |         ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
int main(void)
{
	int n,p=1;
	cin >> n;
	for(int i=1;i<=n;i++){
		p*=i;
	}
	cout << p%(pow(10,9)+7) << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   10 |         cout << p%(pow(10,9)+7) << endl;
      |                 ~^~~~~~~~~~~~~~
      |                 |           |
      |                 int         __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include "stdafx.h"
#include <iostream>
#include <stdint.h>
#include <string>
using namespace std;
uint64_t ppow = 1000000000 + 7;
int main()
{
	uint64_t out = 1;
	int N;
	cin >> N;
	for (uint64_t i = 1;i <= N;i++) {
		out = (out * i) % ppow;
	}
	cout << out;
	return 0;
}

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

	int N;
	cin >> N;
	long long int p = 1;
	for (int i = 1; i <= N; i++)
	{
		p *= i;
		p %= 1000000007;
	}
	cout << p;


Compiler output:
a.cc:2:9: error: 'cin' does not name a type
    2 |         cin >> N;
      |         ^~~
a.cc:4:9: error: expected unqualified-id before 'for'
    4 |         for (int i = 1; i <= N; i++)
      |         ^~~
a.cc:4:25: error: 'i' does not name a type
    4 |         for (int i = 1; i <= N; i++)
      |                         ^
a.cc:4:33: error: 'i' does not name a type
    4 |         for (int i = 1; i <= N; i++)
      |                                 ^
a.cc:9:9: error: 'cout' does not name a type
    9 |         cout << p;
      |         ^~~~
Language: C++

#include <iostream.
using namespace std;

int main()
{
  int N;
  cin >> N;
  int p = 1;
  for (int i = 0; i < N; i++)
    p = p * i % 1000000007;
  cout << p << endl;
  return 0;
}


Compiler output:
a.cc:1:20: error: missing terminating > character
    1 | #include <iostream.
      |                    ^
a.cc:1:10: fatal error: iostream.: No such file or directory
    1 | #include <iostream.
      |          ^
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
 
signed main(){
	int n;
	cin >> n;
	int ans = 1;
	
	for(int i = 1; i <= n; i++){
		ans *= i;
		ans %= 1e9 + 7;
	}
	
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   12 |                 ans %= 1e9 + 7;
      |                 ~~~~^~~~~~~~~~
a.cc:12:21: note:   in evaluation of 'operator%=(long long int, double)'
Language: C++

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

int main ()
{
	ll x,y;
  cin>>x>>y;
  m=(y-2*x);
  cout<<(x+(m/4));
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'm' was not declared in this scope
    9 |   m=(y-2*x);
      |   ^
Language: C++

#include <iostream>

using namespace std;

int main() {
  int64_t N, M;
  cin >> N >> M;

  int64_t dum = max((M - N * 2) / 4, 0LL);
  N += dum;
  M -= dum * 2;

  cout << min(N, M / 2) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: no matching function for call to 'max(int64_t, long long int)'
    9 |   int64_t dum = max((M - N * 2) / 4, 0LL);
      |                 ~~~^~~~~~~~~~~~~~~~~~~~~~
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:9:20: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
    9 |   int64_t dum = max((M - N * 2) / 4, 0LL);
      |                 ~~~^~~~~~~~~~~~~~~~~~~~~~
/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 <bits/stdc++.h>
using namespace std;
int main()
{
    long long n , a , s=0;
    cin>>n>>a;
    if(a >= 2*n) {
        s = n;
        a -= 2*n;
        s += m / 4; 
        cout << s << "\n";
    }
    else {
        cout << a / 2 << "\n";
    }
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'm' was not declared in this scope
   11 |         s += m / 4;
      |              ^
Language: C

#include<cstdio>
int main() {
	long long n,m;
	scanf("%lld%lld", &n, &m);
	if (2*n > m) printf("%lld", m/2);
	else printf("%lld", n+(m-n*2)/4);
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,M;cin >> N >> M;
  int ans;
  if(M >= 2 * N){
  	ans = N;
  	M -= 2 * N;
  	ans += M / 4;
  }
  else
    ans = min(n,M / 2);
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'n' was not declared in this scope
   12 |     ans = min(n,M / 2);
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long N,M;
  if(M>=N*2){
    cout<<N+(M-2*N)/3<<endl;
  }
  else{
    cout<<M/2<<endl;
}



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

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

int main(){

  ll n,m;
  cin >> n >> m;
  ll ans;

  if ( n == 2 * m ) {//cがたらんou ピッタリ
    ans = m/2;
  } else if ( n > 2 * m ) {
    ans = m/2;
    n -= ans;
    ans += (n/2);
  } else #include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){

  ll n,m;
  cin >> n >> m;
  ll ans;

  if ( 2 * n >= m ) {//cがたらんou ピッタリ
    ans = m / 2;
  } else {
    ans = n;
    m -= 2*n;
    ans += (m/4);
  }

  cout << ans << endl;

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

int main(){

  ll n,m;
  cin >> n >> m;
  ll ans;

  if ( n == 2 * m ) {//cがたらんou ピッタリ
    ans = m/2;
  } else if ( n > 2 * m ) {
    ans = m/2;
    n -= ans;
    ans += (n/2);
  } else #include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){

  ll n,m;
  cin >> n >> m;
  ll ans;

  if ( 2 * n >= m ) {//cがたらんou ピッタリ
    ans = m / 2;
  } else {
    ans = n;
    m -= 2*n;
    ans += (m/4);
  }

  cout << ans << endl;

}


Compiler output:
a.cc:17:10: error: stray '#' in program
   17 |   } else #include <bits/stdc++.h>
      |          ^
a.cc:54:10: error: stray '#' in program
   54 |   } else #include <bits/stdc++.h>
      |          ^
a.cc: In function 'int main()':
a.cc:17:11: error: 'include' was not declared in this scope
   17 |   } else #include <bits/stdc++.h>
      |           ^~~~~~~
a.cc:17:20: error: 'bits' was not declared in this scope
   17 |   } else #include <bits/stdc++.h>
      |                    ^~~~
a.cc:17:25: error: 'stdc' was not declared in this scope; did you mean 'std'?
   17 |   } else #include <bits/stdc++.h>
      |                         ^~~~
      |                         std
a.cc:18:1: error: expected primary-expression before 'using'
   18 | using namespace std;
      | ^~~~~
a.cc:21:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   21 | int main(){
      |         ^~
a.cc:21:9: note: remove parentheses to default-initialize a variable
   21 | int main(){
      |         ^~
      |         --
a.cc:21:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:21:11: error: a function-definition is not allowed here before '{' token
   21 | int main(){
      |           ^
a.cc:42:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   42 | int main(){
      |         ^~
a.cc:42:9: note: remove parentheses to default-initialize a variable
   42 | int main(){
      |         ^~
      |         --
a.cc:42:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:42:11: error: a function-definition is not allowed here before '{' token
   42 | int main(){
      |           ^
a.cc:74:2: error: expected '}' at end of input
   74 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
int main(){long long n,m;std::cin>>n>>m;std::cout<<min(n+m/2,m)/2;}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:52: error: 'min' was not declared in this scope; did you mean 'std::min'?
    2 | int main(){long long n,m;std::cin>>n>>m;std::cout<<min(n+m/2,m)/2;}
      |                                                    ^~~
      |                                                    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)
      |     ^~~
Language: Java

import java.util.*;

public class SccPuzzle {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		long s = sc.nextLong();
		long c = sc.nextLong();
		long scc = 0;
		
		if(s>=c/2) {
			scc = c/2;
		}else {
			scc += s;
			c -= 2*s;
			scc += c/4;
		}
		
		System.out.println(scc);

	}

}


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

#include<iostream>
int main()
{
    int n,m;
    std::cin>>n>>m;
    std::cout<<min(n+m/2,m)/2;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'min' was not declared in this scope; did you mean 'std::min'?
    6 |     std::cout<<min(n+m/2,m)/2;
      |                ^~~
      |                std::min
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:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include<iostream>
int main()
{
    int n,m;
    cin>>n>>m;
    cout<<min(n+m/2,m)/2;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin>>n>>m;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout<<min(n+m/2,m)/2;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:11: error: 'min' was not declared in this scope; did you mean 'std::min'?
    6 |     cout<<min(n+m/2,m)/2;
      |           ^~~
      |           std::min
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:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include<iostream> using namespace std;long long n,m;int main(){cin>>n>>m;cout<<min(n+m/2,m)/2;} 

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include<iostream> using namespace std;long long n,m;int main(){cin>>n>>m;cout<<min(n+m/2,m)/2;}
      |                    ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iosstream> using namespace std;long long n,m;int main(){cin>>n>>m;cout<<min(n+m/2,m)/2;} 

Compiler output:
a.cc:1:21: warning: extra tokens at end of #include directive
    1 | #include<iosstream> using namespace std;long long n,m;int main(){cin>>n>>m;cout<<min(n+m/2,m)/2;}
      |                     ^~~~~
a.cc:1:9: fatal error: iosstream: No such file or directory
    1 | #include<iosstream> using namespace std;long long n,m;int main(){cin>>n>>m;cout<<min(n+m/2,m)/2;}
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int64_N,M;
  cin>>N>>M;
  if((M/2)<=N)
    cout<<M/2<<endl;
  else{
  int64_t ans=(N+(M/2))/2;
    cout<<ans<<endl;
  
  }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'int64_N' was not declared in this scope; did you mean 'int64_t'?
    4 | int64_N,M;
      | ^~~~~~~
      | int64_t
a.cc:4:9: error: 'M' was not declared in this scope
    4 | int64_N,M;
      |         ^
a.cc:5:8: error: 'N' was not declared in this scope
    5 |   cin>>N>>M;
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  ll n, m;cin>>n>>m;
  ll ans=min(n, m/2);
  m = max(0, m - n*2);
  ans += m / 4;
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: no matching function for call to 'max(int, ll)'
    9 |   m = max(0, m - n*2);
      |       ~~~^~~~~~~~~~~~
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:9:10: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
    9 |   m = max(0, m - n*2);
      |       ~~~^~~~~~~~~~~~
/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:9:10: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    9 |   m = max(0, m - n*2);
      |       ~~~^~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <map>
#include <iomanip>
typedef long long ll;
#define rep(i,a,b) for(int i=a;i<b;++i)
#define rrep(i,a,b) for(int i=a;i>=b;--i)
using namespace std;
ll mod = 1e9 + 7;

using namespace std;
using Graph = vector<vector<int>>;
Graph G;


int main()
{
	int S, M;
	cin >> S >> M;
	if (2 * S > M)
	{
		cout << M / 2 << endl;
	}
	else
	{
		cout << S + (M - 2 * N) / 4 << endl;
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:38: error: 'N' was not declared in this scope
   29 |                 cout << S + (M - 2 * N) / 4 << endl;
      |                                      ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: no matching function for call to 'max(long long int, int)'
    7 |     cout<<min(n,m/2)+max(m-n*2,0)/4;
      |                      ~~~^~~~~~~~~
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' ('long long int' and 'int')
    7 |     cout<<min(n,m/2)+max(m-n*2,0)/4;
      |                      ~~~^~~~~~~~~
/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 'long long int'
    7 |     cout<<min(n,m/2)+max(m-n*2,0)/4;
      |                      ~~~^~~~~~~~~
Language: C++

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

int main(){
  long long N,M;
  cin>>N>>M;
  if(2*N>=M){
    cout<<M/2<<endl;
  }else{
    x=M-2*N;
    cout<<(M-2*x/3)/2<<endl;
  }
  
}
 
    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'x' was not declared in this scope
   10 |     x=M-2*N;
      |     ^
Language: C++

#include <iostream>
#include <vector>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;

#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define bg begin()
#define ed end()
#define all(x) x.bg, x.ed
#ifdef LOCAL
#define dmp(x) cerr << __LINE__ << " " << #x << " " << x << endl
#else
#define dmp(x) void(0)
#endif

template <class t, class u>
void chmax(t &a, u b)
{
  if (a < b)
    a = b;
}
template <class t, class u>
void chmin(t &a, u b)
{
  if (b < a)
    a = b;
}
const int mod = 1000000007;
struct mint
{
  ll x; // typedef long long ll;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint &operator+=(const mint a)
  {
    if ((x += a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator-=(const mint a)
  {
    if ((x += mod - a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator*=(const mint a)
  {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const
  {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const
  {
    mint res(*this);
    return res -= a;
  }
  mint operator*(const mint a) const
  {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const
  {
    if (!t)
      return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1)
      a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const
  {
    return pow(mod - 2);
  }
  mint &operator/=(const mint a)
  {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const
  {
    mint res(*this);
    return res /= a;
  }
};
struct combination
{
  vector<mint> fact, ifact;
  combination(int n) : fact(n + 1), ifact(n + 1)
  {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i)
      fact[i] = fact[i - 1] * i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i)
      ifact[i - 1] = ifact[i] * i;
  }
  mint operator()(int n, int k)
  {
    if (k < 0 || k > n)
      return 0;
    return fact[n] * ifact[k] * ifact[n - k];
  }
};

template <class t>
using vc = vector<t>;
template <class t>
using vvc = vc<vc<t>>;

using vi = vc<int>;
int gcd(int a, int b)
{
  if (b == 0)
    return a;
  return gcd(b, a % b);
}
int lcm(int a, int b)
{
  return (a * b) / gcd(a, b);
}
int fact(int n)
{
  if (n == 0)
    return 1;
  return n * fact(n - 1);
}

int main()
{
  int n, m;
  cin >> n >> m;
  if(n>m){
  cout<< m/<<endl;
  }else{
  cout<<(m+n)/4<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:146:12: error: expected primary-expression before '<<' token
  146 |   cout<< m/<<endl;
      |            ^~
Language: C++

include <iostream>
 
using namespace std;
 
int main()
{
	long long n , m , javab;
	cin >> n >> m;
	if (m > (2 * n))
	{
		m -= (2 * n);
		javab= (n + (m / 4));
	}
	else
		javab = (m / 2);
	cout << ans;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> n >> m;
      |         ^~~
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout << ans;
      |         ^~~~
a.cc:16:17: error: 'ans' was not declared in this scope
   16 |         cout << ans;
      |                 ^~~
Language: C++

#include <bits\stdc++.h>

using namespace std;

int main()
{
	long long n , m , ans , b;
	cin >> n >> m;
	if (m > (2 * n))
	{
		m -= (2 * n);
		ans = (n + (m / 4));
	}
	else
		ans = (m / 2);
	cout << ans;
}

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

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

int main() {
  long long N, M;
  cin >> N >> M;
  long long ans = 0;
  ans += min(N, M/2);
  M -= 2*ans;
  if (M > 0) ans += M/4;
  cout << ans << endl;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N >> M;
      |   ^~~
a.cc:8:10: error: 'min' was not declared in this scope; did you mean 'main'?
    8 |   ans += min(N, M/2);
      |          ^~~
      |          main
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout << ans << endl;
      |   ^~~~
a.cc:11:18: error: 'endl' was not declared in this scope
   11 |   cout << ans << endl;
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main() {
	long long n,m;
	cin>>n>>m;
	long long ans=0;
	while(1) {
		if(n>0 && m>1) {
			ans++;
			n--;
			m-=2;
		}
		else if(m>3) {
			ans++;
			m-=4;
		}
		else break;
	}
	cout<<ans<<endl;
	return ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |         return ;
      |         ^~~~~~
Language: C++

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

int main(){
  int N,M;
  cin >> N >> M;
  long long int num_S=N;
  long long int num_C=M;
  long long int res=0;
  while(num_S>=1 && num_C>=2){
    num_S-=1;
    num_C-=2;
    ++res;
  }
  while(num_C>=4){
    num_C-=4;
    ++res;
    if
  }
  cout << res;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: expected '(' before '}' token
   20 |   }
      |   ^
      |   (
Language: C++

n, m = map(int, input().split())
ans = 0
if n*2 >= m:
    ans += n
else:
    ans += n
    m -= 2*n
    ans += m//4
print(ans)

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

// luogu-judger-enable-o2
#include<bits/stdc++.h>
using namespace std;
int n,m;
int main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	cin>>n>>m;
	cout<<min(n,m/2)+max(m-n*2,h)/4;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:36: error: 'h' was not declared in this scope
   10 |         cout<<min(n,m/2)+max(m-n*2,h)/4;
      |                                    ^
Language: C++



#include <bits/stdc++.h>

using namespace std;
#define ll long long
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define REPS(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREPS(i,x) for(int i=((int)(x));i>0;i--)
const ll mod = 1e9 + 7;
typedef pair<int,int>           PI;
typedef pair<ll,ll>             PL;
typedef vector<PI>               vip; 
typedef vector<int>             vi;
typedef vector<vi>              vvi;
typedef vector<ll>              vl;
typedef vector<vl>              vvl;








int main (){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n,m;
    cin >> s >> c;
    ll ans;
    if(c <= s * 2){
        ans = c / 2;
    }else{
        ans = s + (c - s) / 4;
    }
    cout << ans << endl;
    








    return 0;
}

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

# https://atcoder.jp/contests/abc055/tasks/arc069_a
# C - Scc Puzzle
import math
N, M = list(map(int, input().split()))

c = 0
# 使えるSを全部使えるか
# CがM * 2個いる
if M >= N * 2:
    # Sを全部使う
    c += N
    # 残っているcだけでSccを作れるだけ作る
    c += math.floor((M - N * 2) / 4)
else:
    # Sを使えるだけ使う
    max_pair = math.floor(M / 2)
    c += max_pair

c = int(c)
print(c)

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #https
    1 | # https://atcoder.jp/contests/abc055/tasks/arc069_a
      |   ^~~~~
a.cc:2:3: error: invalid preprocessing directive #C
    2 | # C - Scc Puzzle
      |   ^
a.cc:7:3: error: invalid preprocessing directive #\U00004f7f\U00003048\U0000308bS\U00003092\U00005168\U000090e8\U00004f7f\U00003048\U0000308b\U0000304b
    7 | # 使えるSを全部使えるか
      |   ^~~~~~~~~~~~~~~~~~~~~
a.cc:8:3: error: invalid preprocessing directive #C\U0000304cM
    8 | # CがM * 2個いる
      |   ^~~~
a.cc:10:7: error: invalid preprocessing directive #S\U00003092\U00005168\U000090e8\U00004f7f\U00003046
   10 |     # Sを全部使う
      |       ^~~~~~~~~~~
a.cc:12:7: error: invalid preprocessing directive #\U00006b8b\U00003063\U00003066\U00003044\U0000308bc\U00003060\U00003051\U00003067Scc\U00003092\U00004f5c\U0000308c\U0000308b\U00003060\U00003051\U00004f5c\U0000308b
   12 |     # 残っているcだけでSccを作れるだけ作る
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:15:7: error: invalid preprocessing directive #S\U00003092\U00004f7f\U00003048\U0000308b\U00003060\U00003051\U00004f7f\U00003046
   15 |     # Sを使えるだけ使う
      |       ^~~~~~~~~~~~~~~~~
a.cc:3:1: error: 'import' does not name a type
    3 | import math
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
const ll mod = 1e9 + 7;

int main()
{
    ll n, m;
    cin >> n >> m;
    n = min(n, m / 2);
    m = m - s * 2;
    cout << n + m / 4 << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 's' was not declared in this scope
   12 |     m = m - s * 2;
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007


int main() {
	ll n,m;
	cin>>n>>m;
	if(m*2<=n){
		cout << m/2;
		return 0;
	}
	cout << n+max{0,(m-2*n)/4};
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: invalid operands of types 'll' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator+'
   15 |         cout << n+max{0,(m-2*n)/4};
      |                 ~^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007


int main() {
	ll n,m;
	cin>>n>>m;
	if(m*2<=n){
		cout << m/2;
		return 0;
	}
	cout << n+max(0,(m-2*n)/4);
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: no matching function for call to 'max(int, ll)'
   15 |         cout << n+max(0,(m-2*n)/4);
      |                   ~~~^~~~~~~~~~~~~
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:15:22: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   15 |         cout << n+max(0,(m-2*n)/4);
      |                   ~~~^~~~~~~~~~~~~
/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:15:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   15 |         cout << n+max(0,(m-2*n)/4);
      |                   ~~~^~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long n,m;
int main{
    cin>>m>>n; 
    if(m<=((m*2)+n)/4)
	cout<<((m*2)+n)/4<<endl;
	return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:14: error: expected '}' before ';' token
    5 |     cin>>m>>n;
      |              ^
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:5:11: error: invalid user-defined conversion from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' [-fpermissive]
    5 |     cin>>m>>n;
      |     ~~~~~~^~~
In file included from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/istream:40,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_ios.h:121:16: note: candidate is: 'std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  121 |       explicit operator bool() const
      |                ^~~~~~~~
/usr/include/c++/14/bits/basic_ios.h:121:16: note:   return type 'bool' of explicit conversion function cannot be converted to 'int' with a qualification conversion
a.cc:6:5: error: expected unqualified-id before 'if'
    6 |     if(m<=((m*2)+n)/4)
      |     ^~
a.cc:8:9: error: expected unqualified-id before 'return'
    8 |         return 0;
      |         ^~~~~~
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

#include <iostream>
#include <conio.h>
using namespace std;

int main() {
	//scc何組か
	unsigned long s; unsigned long c;
	cin >> s;
	cin >> c;
	while (s * 2 < c) {
		s++;
		c -= 2;
	}
	cout << c / 2 << endl;
	//_getch();
}



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

#include<iostream>
using namespace std;
long long int n,m,nd;
int main(){
    cin>>n>>m;/
    nd=2*n;
    if(nd>m)cout<<m/2<<endl;
    else if(nd==m)cout<<n<<endl;
    else{
        m-=nd;
        m/=4;
        cout<<n+m<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: expected primary-expression before '/' token
    5 |     cin>>n>>m;/
      |               ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
long long n,m,h=0;
int main()
{
    cin>>n>>m;
    cout<<min(n,m/2)+max(m-n*2,h)/4;。
    return 0;
} 

Compiler output:
a.cc:8:37: error: extended character 。 is not valid in an identifier
    8 |     cout<<min(n,m/2)+max(m-n*2,h)/4;。
      |                                     ^
a.cc: In function 'int main()':
a.cc:8:37: error: '\U00003002' was not declared in this scope
    8 |     cout<<min(n,m/2)+max(m-n*2,h)/4;。
      |                                     ^~
Language: C++

// luogu-judger-enable-o2
#include <bits/stdc++.h>
using namespace std;
int main(){
	long long n,m,s;
	cin>>n>>m;
	s=min(n,m/2);
    m=max((m-n*2),0);
    cout<<s+m/4<<endl;
    return 0;
}//不开long long毁一生。。。

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: no matching function for call to 'max(long long int, int)'
    8 |     m=max((m-n*2),0);
      |       ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:8:10: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
    8 |     m=max((m-n*2),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
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:8:10: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
    8 |     m=max((m-n*2),0);
      |       ~~~^~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long n,m,t;
int main(){
    cin>>n>>m;
    t=2*n;
    if(t>m)
		cout<<m/2<<endl;
    else if(t==m)
		cout<<n<<endl;
    else
        m-=t;
        m/=4;
        cout<<n+m<<endl;
    }
    return 0;
}

Compiler output:
a.cc:16:5: error: expected unqualified-id before 'return'
   16 |     return 0;
      |     ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
int main(){
    ll n,m;
    cin>>n>>m;
    cout << max(0,m-2*n)/4 + n << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: no matching function for call to 'max(int, ll)'
    8 |     cout << max(0,m-2*n)/4 + 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:8:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
    8 |     cout << max(0,m-2*n)/4 + 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:2:
/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:8:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    8 |     cout << max(0,m-2*n)/4 + n << endl;
      |             ~~~^~~~~~~~~
Language: C++

#include <iostream>

using namespace std;
typedef long long ll;
int main(){
    ll n,m;
    cin>>n>>m;
    cout << max(0,m-2*n)/4 + n << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: no matching function for call to 'max(int, ll)'
    8 |     cout << max(0,m-2*n)/4 + 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:8:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
    8 |     cout << max(0,m-2*n)/4 + 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
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,m;
    cin>>n>>m;
    long long ans=min(n,m/2)+max(m-n*2,0)/4;
    cout<<ans<<endl;
    return 0;
}

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

#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <numeric>
using namespace std;
int main() {
	int N, M;
	cin >> N >> M;
	int ans;
	if (N>=floor(M/2)) {
		ans = floor(M/2);
	}
	else {
		int d = M - N*2;
		ans = floor(M / 2) + floor(d / 3);
	}
	cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'floor' was not declared in this scope
   12 |         if (N>=floor(M/2)) {
      |                ^~~~~
Language: C

#include <stdio.h>

int
main(int argc, char *argv[])
{
  long long n, m;
  scanf("%lld %lld", &n, &m);

  long long ans;

  if(n > m / 2) ans = m / 2;
  else ans = (m - 2*n)/4 + n;

  printf("%lld\n", ans);

  return 0;


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

#include<stdio.h>

int main(){
  long long int ans=1,k,i;
  
  scanf("%lld",&k);
  
  for(i=1;i<=k;i++){
    ans*=i;
  }
  
  k%=((10e9)+7);
  
  printf("%lld\n",k);
  return 0;
}
  


Compiler output:
main.c: In function 'main':
main.c:12:4: error: invalid operands to binary % (have 'long long int' and 'double')
   12 |   k%=((10e9)+7);
      |    ^~~~~~~~~~~~
      |             |
      |             double
Language: C++

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

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