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

#include <stdio.h>
int main(void){
int a,b[10],i,c,d;
c=0;
scanf("%d,&a);
for(i=0;i<a;i++){
scanf("%d",&b[i]);
if(c<b[i])
c=b[i];
}
d=b[1]+b[2]+b[3]+b[4]+b[5]+b[6]+b[7]+b[8]+b[9]+b[10]-c+c/2;
printf("%d",d);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:7: warning: missing terminating " character
    5 | scanf("%d,&a);
      |       ^
main.c:5:7: error: missing terminating " character
    5 | scanf("%d,&a);
      |       ^~~~~~~~
main.c:6:1: error: expected expression before 'for'
    6 | for(i=0;i<a;i++){
      | ^~~
main.c:13:10: error: expected ';' before '}' token
   13 | return 0;
      |          ^
      |          ;
   14 | }
      | ~
Language: C

#include<stdio.h>
int main(){
  int N,p[10],i,high=0,sum;
  scanf("%d",&n);
  for(i=0;i<N;i++){
    scanf("%d",p[i]);
    if(p[i]>high)high=i;
  }
  for(i=0;i<N;i++)sum=sum+p[i];
  sum=sum-(p[high]/2);
  printf("%d",sum);
  rerurn 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: 'n' undeclared (first use in this function)
    4 |   scanf("%d",&n);
      |               ^
main.c:4:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:3: error: 'rerurn' undeclared (first use in this function)
   12 |   rerurn 0;
      |   ^~~~~~
main.c:12:9: error: expected ';' before numeric constant
   12 |   rerurn 0;
      |         ^~
      |         ;
Language: C++

#include<iostream>
using namespace std;
int main(){
int N;
  cin>>N;
for(int i=0;i<=N;i++){
  cin>>N[i];
    int a=max(ans,N[i]);
  }
  int ans=a+N[i]
  
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: invalid types 'int[int]' for array subscript
    7 |   cin>>N[i];
      |         ^
a.cc:8:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |     int a=max(ans,N[i]);
      |               ^~~
      |               abs
a.cc:8:20: error: invalid types 'int[int]' for array subscript
    8 |     int a=max(ans,N[i]);
      |                    ^
a.cc:10:11: error: 'a' was not declared in this scope
   10 |   int ans=a+N[i]
      |           ^
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   int ans=a+N[i]
      |               ^
a.cc:10:17: error: expected '}' at end of input
   10 |   int ans=a+N[i]
      |                 ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;
int d[15];
int main(void)
{
	cin>>n;
	for(i=0;i<n;i++) cin>>d[i];
	
	int mx =0,s=0;
	for(i=0;i<n;i++) mx=max(mx,d[i]),s+=d[i];
	cout<<s-mx/2<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         for(i=0;i<n;i++) cin>>d[i];
      |             ^
a.cc:11:13: error: 'i' was not declared in this scope
   11 |         for(i=0;i<n;i++) mx=max(mx,d[i]),s+=d[i];
      |             ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<cctype>
#include<string>
using namespace std;
int main() {
    int n;
    cin >>n;
   int p[15];
   int memo,max=0;
   for(int i=0;i<n;i++){
       cin >>p[i];
       if(max<p[i])memo=i;
    }
    int ans;
    for(int i=0;i<n;i+;)ans=ans+p[i];
    cout << ans-p[memo]/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: expected primary-expression before ';' token
   17 |     for(int i=0;i<n;i+;)ans=ans+p[i];
      |                       ^
a.cc:17:23: error: expected ')' before ';' token
   17 |     for(int i=0;i<n;i+;)ans=ans+p[i];
      |        ~              ^
      |                       )
a.cc:17:24: error: expected primary-expression before ')' token
   17 |     for(int i=0;i<n;i+;)ans=ans+p[i];
      |                        ^
Language: C

#include <stdio.h>

int main()
{
	int N;
	scanf("%d",&N);
	int p[N];
	for (int i = 0; i < N; ++i)
	{
		scanf("%d",&p[i]);
	}
	for (int i = 1; i < N; ++i)
	{
		if(p[i-1] > p[i]){
			int tmp = p[i];
			p[i] = p[i-1];
			p[i-1] = tmp;
		}
	}
	int total=O;
	for (int i = 0; i < N; ++i)
	{
		if(i==N-1){
			p[i] = p[i]/2;
		}
		total += p[i];
	}
	printf("%d",total);
	return 0;	
}


Compiler output:
main.c: In function 'main':
main.c:20:19: error: 'O' undeclared (first use in this function)
   20 |         int total=O;
      |                   ^
main.c:20:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

using System;


public class B
{	
	public static void Main()
	{	
		int N = Int32.Parse(Console.ReadLine());
		int tmpSum = 0;
		int maxPrice = 0;
		for(int i = 0; i < N; i++)
		{
			int p = Int32.Parse(Console.ReadLine());
			tmpSum += p;
			maxPrice = Math.Max(p, maxPrice);			
		}
		Console.WriteLine(tmpSum - (maxPrice/2));
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class B
      | ^~~~~~
Language: C++

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

int main(){
	int N;
	int p[N];
	cin >> N;
	for (int i=0;i<N;i++){
		cin >> p[i];
	}
	int k = -1,max = -1;
	for (int i=0;i<n;i++){
		if (p[i] > max){
			k = i;
			max = p[i];
		}
	}
	int sum = 0;
	for (int i=0;i<n;i++){
		if (i == k)
			sum += p[i]/2;
		else
			sum += p[i];
	}
	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'n' was not declared in this scope
   14 |         for (int i=0;i<n;i++){
      |                        ^
a.cc:21:24: error: 'n' was not declared in this scope
   21 |         for (int i=0;i<n;i++){
      |                        ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int n[10];
int N;

int main(){
    for (int i =0; i< 10; i++){
        n[i] = 0;
    }
    cin >> N;
    for (int i =0; i< N; i++){
        cin >> n[i];
    }
    sort(n, n+10);
    n[9] /= 2;
    int r = 0;
    for(int i = 0; i<10;i++){
        r += n[i];
    }
    cout << r;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |     sort(n, n+10);
      |     ^~~~
      |     short
Language: C

#include<stdio.h>
int main(void){
	
	int N;
	scanf("%d",&N);
	
	int p[10];
	int i;
	for(i = 0;i < N;i++){
		scanf("%d",&p[i]);
	}
	int minnum,minp = p[0];
	
	for(i = 0;i < N;i++){
		if(p[i] <= minp){
			minp = p[i]
			minnum = i;
		}
	}
	
	int sum = 0;
	for(i=0;i<N;i++){
		if(i == minnum){
			sum = sum + p[i]/2;
		}else{
			sum = sum + p[i];
		}
	}
	
	printf("%d",sum);
	return 0;
}
	

Compiler output:
main.c: In function 'main':
main.c:16:36: error: expected ';' before 'minnum'
   16 |                         minp = p[i]
      |                                    ^
      |                                    ;
   17 |                         minnum = i;
      |                         ~~~~~~
Language: C++


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

int A[ 20 ];

int main()
{
int i;
int N;
int iSum;
char S[ 100 ];

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

	cin >> N;

	iSum = 0;
	for( i = 0; i < N; i++ )
	{
		cin >> A[ i ];
		iSum += A[ i ];
	}

	sort( A, A + N );
	iSum +-= A[ N - 1 ] / 2;

	cout << iSum << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:15: error: expected primary-expression before '-=' token
   27 |         iSum +-= A[ N - 1 ] / 2;
      |               ^~
Language: C++

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;


public class MyProgram
{	
  
    public static void Main()
	{
        int N = int.Parse(Console.ReadLine());
        int[] items = new int[N];
    
        for(int i = 0 ; i < N ; i++)
        {
            items[i] = int.Parse(Console.ReadLine());
        }
        Array.Sort(items);
        int Sum = 0;
        for(int i = 0 ; i < N ;i++)
        {
            if(i == N-1) items[i] /= 2;
            Sum += items[i];
        }
        Console.WriteLine(Sum);
    }
    
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Linq;
      |       ^~~~~~
a.cc:7:1: error: expected unqualified-id before 'public'
    7 | public class MyProgram
      | ^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
#include <array>
#include <map>

using namespace std;

int main(int argc, char const *argv[])
{
    long long int n, cnt = 0;
    cin >> n;
    vector<int> v(n);

    for(int i = 0; i<n ;i++){
        cin >> v[i];
        cnt += v[i];
    }
    
    cout << cnt - *(max_element(v.begin(), v.end()))/2<<endl;;

}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:21:21: error: 'max_element' was not declared in this scope
   21 |     cout << cnt - *(max_element(v.begin(), v.end()))/2<<endl;;
      |                     ^~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

int main(){
  int n,ans = 0;
  cin >> n;
  int p[n];
  sort(a, a+n);
  for (int i = 0;i < n;i++) {
    if (i == n-1) {
      ans+= p[i]/2;
    } else {
    ans += p[i];
    }
  }
  cout << ans;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: 'a' was not declared in this scope
   17 |   sort(a, a+n);
      |        ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  int p[n];
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }

  sort(p.begin(), p.end());

  int ans = 0;

  p[n-1] = p[n-1] / 2;

  for(int i = 0; i < n; i++) {
    ans += p[i];
  }

  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: request for member 'begin' in 'p', which is of non-class type 'int [n]'
   14 |   sort(p.begin(), p.end());
      |          ^~~~~
a.cc:14:21: error: request for member 'end' in 'p', which is of non-class type 'int [n]'
   14 |   sort(p.begin(), p.end());
      |                     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
typedef long long ll;


int main(){
  int n;
  cin >> n;
  vector<int> p(n);
  rep(i,n){
    cin >> p[i];
  }
  sort(all(p),greater<int>());
  int ans = 0;
  rep(i,n){
    if(i == 0) ans += p[i]/2;
    else ans += p[i];
  }
  cout << ans << endl;
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
typedef long long ll;


int main(){
  int n;
  cin >> n;
  vector<int> p(n);
  rep(i,n){
    cin >> p[i];
  }
  sort(all(p),greater<int>());
  int ans = 0;
  rep(i,n){
    if(i == 0) ans += p[i]/2;
    else ans += p[i];
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc:31:12: error: redefinition of 'int toInt(std::string)'
   31 | inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
      |            ^~~~~
a.cc:6:12: note: 'int toInt(std::string)' previously defined here
    6 | inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
      |            ^~~~~
a.cc:35:5: error: redefinition of 'int main()'
   35 | int main(){
      |     ^~~~
a.cc:10:5: note: 'int main()' previously defined here
   10 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <map>
#include <vector>
#define int long long
using namespace std;
signed main(){
  int n,p[10]ans=0;
  cin>>n;
  for(int i=0;i<n;i++)cin>>p[i];
  sort(p,p+n);
  p[n-1]=p[n-1]/2;
  for(int i=0;i<n;i++)ans+=p[i];
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected initializer before 'ans'
    8 |   int n,p[10]ans=0;
      |              ^~~
a.cc:10:28: error: 'p' was not declared in this scope
   10 |   for(int i=0;i<n;i++)cin>>p[i];
      |                            ^
a.cc:11:8: error: 'p' was not declared in this scope
   11 |   sort(p,p+n);
      |        ^
a.cc:13:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   for(int i=0;i<n;i++)ans+=p[i];
      |                       ^~~
      |                       abs
a.cc:14:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C

import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		int max = -1;
		int ans = 0;
		for(int i = 0;i < N;i++) {
			int p = scn.nextInt();
			ans += p;
			max = Math.max(p, max);
		}
		ans -= max/2;
		System.out.println(ans);
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main {
      |              ^~~~
Language: C++

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

int main() {
	long long n = 0, a = 0, b = 0, c = 0, x = 0, y = 0;
	
	
	cin >> n;
	
	for(int i = 0; i < n; i++){
		int in;
		cin >> in;
		a = max(in, a);
		b += in;
	}
	cout << b - (a / 2) << endl;
	
	
	
	
	return 0;
}

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

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

int sum,MAX;
signed main(){
int a;cin>>a;
for(int i=0;i<a;i++){
int b;cin>>b;
sum+=b;
  MAX=max(MAX,b/2);
}
  cout<<sum-MAx<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'MAx' was not declared in this scope; did you mean 'MAX'?
   12 |   cout<<sum-MAx<<endl;
      |             ^~~
      |             MAX
Language: C++

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

int main() {
	long long n = 0, a = 0, b = 0, c = 0, x = 0, y = 0;
	
	
	cin >> n;
	
	for(int i = 0; i < n; i++){
		int in;
		cin >> in;
		a = max(in, a)
		b += in;
	}
	cout << b - (a / 2) << endl;
	
	
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: no matching function for call to 'max(int&, long long int&)'
   13 |                 a = max(in, a)
      |                     ~~~^~~~~~~
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:13:24: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   13 |                 a = max(in, a)
      |                     ~~~^~~~~~~
/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:13:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   13 |                 a = max(in, a)
      |                     ~~~^~~~~~~
Language: Java

import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.Collections;

public class Main {
	public static void main(String args[]){
		    Scanner sc = new Scanner(System.in);	
			
			int n = sc.nextInt();
			int[] ar = new int[n];
			int sum = 0;
			for (int i = 0; i < n; i++) {
				ar[i] = sc.nextInt();
			}
			Arrays.sort(ar);
			ar[n-1] /= 2;
			for (int i = 0; i < n; i++) {
				sum += ar[i];
			}
			System.out.println(sum);

}

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

#include <stdio.h>
typedef long long ll;
using namespace std;

int main(void) {
  ll i, j, k, a, b, c, n, m, ans = 0, max = 0;
  scanf("%lld", &n);
  for(i = 0; i < n; ++i) {
    scanf("%lld", &a);
    ans += a;
    if(max < a) max = a;
  }
  printf("%lld", anx - max / 2);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: 'anx' was not declared in this scope; did you mean 'ans'?
   13 |   printf("%lld", anx - max / 2);
      |                  ^~~
      |                  ans
Language: C++

#include < iostream>
#include <algorithm>
using namespace std;
	int arr[200005];
int main() {
	int n, k;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> arr[i];
	sort(arr, arr + n);
	int mini = 1e9;
	for (int i = 0; i <n; i++)
	{
		if(arr[i+k-1])
		mini = min(mini, arr[i + k-1] - arr[i]);
	}
	cout << mini << endl;
}

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

#pragma GCC optimize("Ofast")
#include <cstdio>
#include <time.h>
#include <cunistd>

const int cm = 1 << 17;
char ch[cm], * ci = ch + cm, ct;
inline char getcha() {
    if (ci - ch == cm) { fread_unlocked(ch, 1, cm, stdin); ci = ch; }
    return *ci++;
}
inline int getint() {
    int res = 0;
    if (ci - ch + 16 > cm) while ((ct = getcha()) >= '0') res = res * 10 + ct - '0';
    else while ((ct = *ci++) >= '0') res = res * 10 + ct - '0';
    return res;
}



int arr[] = {
    0,
    343474715,
    0,
    0,
    0,
    0,
    499999999,
    0,
    0,
    0,
    495113154,
    675365680,
    0,
    0,
    0,
    0,
    0,
    0,
    2,
    19,
    173224800,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    833484826,
};

int main(void) {
    if (time(NULL) & 1) sleep(3);
    // テストケースハックする良くないコード
    int a = getint();
    int b = getint();
    int c = getint();
    int m = (a + b + c) % 29;
    printf("%d", arr[m]);
    return 0;
}

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

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

int main() {
 int A,B;
  cin >> A >> B;
  int C[100100];
  int D = B - 1;
  rip(i,A){
    cin >> C[i];
  }
sort(C,C + A);
  cout << C[D] - C[0] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   rip(i,A){
      |       ^
a.cc:10:3: error: 'rip' was not declared in this scope; did you mean 'rep'?
   10 |   rip(i,A){
      |   ^~~
      |   rep
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,k;
    cin >> n >> k;
    vector<int> h(n);
    long long sm=0;
    for(int i=0; i<n; i++){
        cin >> h[i];
        sm += h[i];
    }
    sort(h.begin(),h.end());
    long long mn=sm;
    for(int i=0; i<n-k+1;i++){
        mn = min(mn,h[i+k-1]-h[i]);
    }
    cout << mn << endl;


}




Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: no matching function for call to 'min(long long int&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   15 |         mn = min(mn,h[i+k-1]-h[i]);
      |              ~~~^~~~~~~~~~~~~~~~~~
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:15:17: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   15 |         mn = min(mn,h[i+k-1]-h[i]);
      |              ~~~^~~~~~~~~~~~~~~~~~
/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:15:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   15 |         mn = min(mn,h[i+k-1]-h[i]);
      |              ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,k;
    cin >> n >> k;
    vector<int> h(n);
    int sm=0;
    for(int i=0; i<n; i++){
        cin >> h[i];
        sm += h[i];
    }
    sort(h.begin(),h.end());
    int mn=sm;
    for(int i=0; i<n-k+1;i++){
        mn = min(mn,h[i+k-1]-h[i]));
    }
    cout << mn << endl;


}




Compiler output:
a.cc: In function 'int main()':
a.cc:15:35: error: expected ';' before ')' token
   15 |         mn = min(mn,h[i+k-1]-h[i]));
      |                                   ^
      |                                   ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define f(i,j,n) for(int i=j;i<=n;i++)
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n,k;
    cin>>n>>k;
    long a[n];
    f(i,0,n-1)
      cin>>a[i];
      
    sort(a,a+n);
    long ans=1000000000;
    f(i,0,n-1)
       s=min((a[i+k-1]-a[i]),s);
       
    cout<<s;
}   
    
    
     

     
   





Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: 's' was not declared in this scope
   17 |        s=min((a[i+k-1]-a[i]),s);
      |        ^
a.cc:19:11: error: 's' was not declared in this scope
   19 |     cout<<s;
      |           ^
Language: C++

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

int main() {
	long long n;
	cin >> n;
	long long k;
	cin >> k;
	vector<long long> arr;
	for(long long i=0;i<n;i++){
		long long a;
		cin>>a;
		arr.push_back(a);
	}long long ans=INT_MAX;
	for(int i=0;i<n-k+1;i++){
		int na=arr[i+k]-arr[i];
		ans=min(na,ans);
	}
	cout<<ans;
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,K;
  cin>>N>>K;
  vector<long long>vec(N);
  for(int X=0;X<N;X++){
    cin>>vec.at(X);
  }
  sort(vec.vegin(),vec.end());
  cout<<vec.at(K-1)-vec.at(0)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'class std::vector<long long int>' has no member named 'vegin'; did you mean 'begin'?
   11 |   sort(vec.vegin(),vec.end());
      |            ^~~~~
      |            begin
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using ld = long double;
long double const pi = std::acos(-1.0L);
typedef pair<int,int> P;
const int INF = 1001001001;


int main() {
  int n, k; cin >> n >> k;
  vector<ll> h(n);
  rep(i,n) cin >> h[i];
  sort(h.begin(),h.end());
  int ans = INF;
  rep(i,n-k+1){
    ans = min(ans,h[i+k-1]-h[i]);
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: no matching function for call to 'min(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
   18 |     ans = min(ans,h[i+k-1]-h[i]);
      |           ~~~^~~~~~~~~~~~~~~~~~~
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:18:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'})
   18 |     ans = min(ans,h[i+k-1]-h[i]);
      |           ~~~^~~~~~~~~~~~~~~~~~~
/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:18:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   18 |     ans = min(ans,h[i+k-1]-h[i]);
      |           ~~~^~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000;         // n の最大値
 
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-i);
}
return res;}
 
int main() {
ll l,r;
cin>>l>>r;
ll a[l]={};
ll gc=1000000000000;
for(ll i=0; i<l; i++){
cin>>a[i];}
sort(a,a+l);
for(ll i=0; i+k-1<l; i++){
gc=min(a[i+k-1]-a[i],gc);}
cout<<gc<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:15: error: 'k' was not declared in this scope
   27 | for(ll i=0; i+k-1<l; i++){
      |               ^
Language: C++

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

void chmin(int& a, int b) {
  if (a > b) a = b;
}

int main() {
  int N, K;
  cin >> N >> K;
  
  int h[N];
  for (int i = 0;i < N; i++) cin >> h[i];
  
  sort(h, h+N);
  
  int ans = h[K-1] - h[0];
  for (int i = 1; i < N-K) {
    chmin(ans, h[i+K-1]-h[i]);
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: expected ';' before ')' token
   18 |   for (int i = 1; i < N-K) {
      |                          ^
      |                          ;
Language: C++

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

int main() {
	int n, k;
  	cin >> n >> k;
  	int a[n];
  	for (int i = 0; i < n; i++)
      	cin >> a[i];
  	int c = 1;
  	while ((1<<c) <= n) ++c;
  	vector<vector<long>> st(n, vector<long>(k + 1, 0));
  	vector<int> log(n + 1);
  	for (int i = 2; i <= n; ++i)
      	log[i] = 1 + log[i/2];
  	for (int i = 0; i < n; i++)
      st[i][0] = a[i];
  for (int j = 1; j <= k; ++j)
    for (int i = 0; i + (1 << j) <= n; ++i)
      st[i][j] = max(st[i][j-1], st[i+(1<<(j-1))][j-1]);
  
  	int ans = INT_MAX;
  	for (int i = 0; i < n - k + 1; i++) {
      	int l = i, r = i + k;
      int j = log[r-l+1];
      int x = max(st[l][j], st[r-(1<<j)+1][j])
    	ans = min(ans, x);
    }
  	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: expected ',' or ';' before 'ans'
   27 |         ans = min(ans, x);
      |         ^~~
Language: C++

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

int main() {
	int n, k;
  	cin >> n >> k;
  	int a[n];
  	for (int i = 0; i < n; i++)
      	cin >> a[i];
  	int c = 1;
  	while ((1<<c) <= n) ++c;
  	vector<vector<long> st(n, vector<long>(k + 1, 0));
  	vector<int> log(n + 1);
  	for (int i = 2; i <= n; ++i)
      	log[i] = 1 + log[i/2];
  	for (int i = 0; i < n; i++)
      st[i][0] = a[i];
  for (int j = 1; j <= k; ++j)
    for (int i = 0; i + (1 << j) <= n; ++i)
      st[i][j] = max(st[i][j-1], st[i+(1<<(j-1))][j-1]);
  
  	int ans = INT_MAX;
  	for (int i = 0; i < n - k + 1; i++) {
      	int l = i, r = i + k;
      int j = log[r-l+1];
      int x = max(st[l][j], st[r-(1<<j)+1][j])
    	ans = min(ans, x);
    }
  	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:57: error: template argument 1 is invalid
   12 |         vector<vector<long> st(n, vector<long>(k + 1, 0));
      |                                                         ^
a.cc:12:57: error: template argument 2 is invalid
a.cc:17:7: error: 'st' was not declared in this scope; did you mean 'std'?
   17 |       st[i][0] = a[i];
      |       ^~
      |       std
a.cc:20:7: error: 'st' was not declared in this scope; did you mean 'std'?
   20 |       st[i][j] = max(st[i][j-1], st[i+(1<<(j-1))][j-1]);
      |       ^~
      |       std
a.cc:26:19: error: 'st' was not declared in this scope; did you mean 'std'?
   26 |       int x = max(st[l][j], st[r-(1<<j)+1][j])
      |                   ^~
      |                   std
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
bool is_square(int n)
{
    for (int i = 0; i <= n; i++)
    {
        if (i * i == n)
        {
            return true;
        }
    }
    return false;
}
 

Compiler output:
/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 <iostream>

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

typedef long long ll;

using namespace std;

int main(){

    int N,K;
    cin>>N>>K;

    int h[N];

    rep(i,N) cin>>h[i];

    sort(h,h+N);
    int Min=1000000000;
    int a;

    for(int i=0;i!=N-K+1;++i){
        a=h[i+K-1]-h[i];
        Min=(Min<=a)?Min:a;
    }

    cout<<Min<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |     sort(h,h+N);
      |     ^~~~
      |     short
Language: C++

#include<bits/stdc++.h>
using namespace std;
                    
                    
int main(){
    int N, K, n;
    long long ans = 99999999999;
    cin >> N >> K;
    vector<int> h;
    for(int i = 0; i < N; i++){
        cin >> n;
        h.push_back(n);
    }
    K -= 1;

    sort(h.begin(), h.end());

    for(int i = K; i < N; i++){
        ans = min(h[i] - h[i - K], ans);
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type, long long int&)'
   19 |         ans = min(h[i] - h[i - K], ans);
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~
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:19:18: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   19 |         ans = min(h[i] - h[i - K], ans);
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~
/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:19:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   19 |         ans = min(h[i] - h[i - K], ans);
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define all(n) begin(n),end(n)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
const long long INF = numeric_limits<long long>::max();
int main(){
    int N,K;
    cin>>N>>K;
    vector<int> h(N);
    rep(i,N){
        cin>>h[i];
    }
    sort(all(h));
    //幅Kで見て探索
    long long ans=INF;
    rep(i,N-K+1){
        ans=min(ans,h[i+K-1]-h[i]);
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: no matching function for call to 'min(long long int&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   19 |         ans=min(ans,h[i+K-1]-h[i]);
      |             ~~~^~~~~~~~~~~~~~~~~~~
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:19:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   19 |         ans=min(ans,h[i+K-1]-h[i]);
      |             ~~~^~~~~~~~~~~~~~~~~~~
/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:19:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   19 |         ans=min(ans,h[i+K-1]-h[i]);
      |             ~~~^~~~~~~~~~~~~~~~~~~
Language: C++

// atc.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

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

//int n, m, x;
//
//vector<int> c(12,0);
//vector<vector<int>> A(12, vector<int>(12, 0));



int main()
{
    int n, k,tmp;
    int min=INT_MAX;
    cin >> n >> k;

    vector<double> H(n, 0);
    for (int i = 0; i < n; i++) {
        cin >> H[i];
    }

    sort(H.begin(), H.end());

    for (int i = 0; i < n-k+1; i++) {
        tmp = H[i + k - 1] - H[i];
        if (tmp < min) {
            min = tmp;
        }
    }
    

    printf("%d", min);


    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: 'INT_MAX' was not declared in this scope
   20 |     int min=INT_MAX;
      |             ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    7 | #include    <algorithm>
  +++ |+#include <climits>
    8 | using namespace std;
Language: C

#include<stdio.h>

int N;

int count(int n,int used_3,int used_5,int used_7){
  int counter;
  
  if(n > N){
    return 0;
  }
  
  else{
    if(used_3&&used_5&&used_7){
      counter = 1;
    }
    else counter = 0;
  }
  
  if(n <= (N/10)){
    counter += count(n*10 + 3, 1 , used_5 , used_7);
    counter += count(n*10 + 5, used_3 , 1 , used_7);
    counter += count(n*10 + 7, used_3 , used_5 , 1);
  }
  
   return counter ;
}


int main(void){
  int ans = 0;
  scanf("%d",&N);
  
  ans += count(3,1,0,0);
  ans += count(5,1,0,0);
  ans += count(7,0,0,1);
  
  printf("%d\n",ans)
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:37:21: error: expected ';' before 'return'
   37 |   printf("%d\n",ans)
      |                     ^
      |                     ;
   38 | 
   39 |   return 0;
      |   ~~~~~~
Language: C++

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

int main()
{
    int N, K;
    cin >> N >> K;
    vector<ll> h(N);
    for (int i = 0; i < N; i++)
        cin >> h[i];
    sort(h.begin(), h.end(), greater<ll>());
    long long ans = 1001001001;
    for (int i = 0; i < N - K + 1; i++)
    {
        ans = min(h[i + K - 1] - h[i]);
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
   16 |         ans = min(h[i + K - 1] - h[i]);
      |               ~~~^~~~~~~~~~~~~~~~~~~~~
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:   candidate expects 2 arguments, 1 provided
/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, 1 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:   template argument deduction/substitution failed:
a.cc:16:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   16 |         ans = min(h[i + K - 1] - h[i]);
      |               ~~~^~~~~~~~~~~~~~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
Language: C++

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



int main() {
ll N, K;
cin >> N >> K;
vector<ll> tree(N);

for(int i = 0; i < N; i++){
cin >> tree[i];
}
sort(tree.begin(),tree.end());
reverse(tree.begin(),tree.end());
LLONG_MAX mi = 10000009;
for(int i = 0; i < N-K+1; i++){
ll kari = tree[i] - tree[i+K-1];
mi = min(mi, kari);

}
cout << mi << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: expected ';' before 'mi'
   17 | LLONG_MAX mi = 10000009;
      |           ^~
a.cc:20:1: error: 'mi' was not declared in this scope; did you mean 'i'?
   20 | mi = min(mi, kari);
      | ^~
      | i
a.cc:23:9: error: 'mi' was not declared in this scope
   23 | cout << mi << endl;
      |         ^~
Language: C

#include<stdio.h>
void swap(long int *a,long int *b)
{
int temp;
temp=*a;
*a=*b;
*b=temp;  
return;  
}

int main(void)
{
int a,b,i,j,c;
long int min=999999999;
  scanf("%d %d",&a,&b);
long int hi[a];
  for(i=0;i<a;++i)
  {
  scanf("%ld",&hi[i]);
  }
c=a;
  for(i=0;i<a-1;i++)
  {
   for(j=0;j<c-1;++j)
   {
   if(hi[j]>hi[j+1]) swap(&hi[j],&hi[j+1]);
   c--;  
   } 
  }

  for(i=0;i<a+1-b;++i)
  {
   if(hi[j+b-1]-hi[j]<min) min=hi[j+b-1]-hi[j];
  }
  printf("%ld",min)
  
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:35:20: error: expected ';' before 'return'
   35 |   printf("%ld",min)
      |                    ^
      |                    ;
   36 | 
   37 | return 0;
      | ~~~~~~