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

    #include <stdio.h>
    int N;
    int tmp = 0;
    int main(void){
      if(scanf(“%d”,&N) == 1);
      int x[N];
      for(int i = 0;i < N;i++){
        x[i] = 0;
        if(scanf(“%d”,&x[i]) == 1);
      }
      for(int i = 0;i <N;i ++){
        for(int j = i + 1;j < N;j++){
          if(x[i]<x[j]){
            tmp = x[i];
            x[i] = x[j];
            x[j] = tmp;
          }
        }
      }
      int r = x[N/2] - x[N/2-1];
      printf(“%d”,r);
      return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:5:16: error: stray '\342' in program
    5 |       if(scanf(<U+201C>%d<U+201D>,&N) == 1);
      |                ^~~~~~~~
main.c:5:17: error: expected expression before '%' token
    5 |       if(scanf(“%d”,&N) == 1);
      |                 ^
main.c:5:19: error: stray '\342' in program
    5 |       if(scanf(<U+201C>%d<U+201D>,&N) == 1);
      |                          ^~~~~~~~
main.c:9:18: error: stray '\342' in program
    9 |         if(scanf(<U+201C>%d<U+201D>,&x[i]) == 1);
      |                  ^~~~~~~~
main.c:9:19: error: expected expression before '%' token
    9 |         if(scanf(“%d”,&x[i]) == 1);
      |                   ^
main.c:9:21: error: stray '\342' in program
    9 |         if(scanf(<U+201C>%d<U+201D>,&x[i]) == 1);
      |                            ^~~~~~~~
main.c:21:14: error: stray '\342' in program
   21 |       printf(<U+201C>%d<U+201D>,r);
      |              ^~~~~~~~
main.c:21:15: error: expected expression before '%' token
   21 |       printf(“%d”,r);
      |               ^
main.c:21:17: error: stray '\342' in program
   21 |       printf(<U+201C>%d<U+201D>,r);
      |                        ^~~~~~~~
Language: C

#include <stdio.h>
int N;
int tmp = 0;
int main(void){
  scanf(“%d”,&N);
  int x[N] = {};
  for(int i = 0;i < N;i++){
    scanf(“%d”,&x[i]);
  }
  for(int i = 0;i <N;i ++){
    for(int j = i + 1;j < N;j++){
      if(x[i]<x[j]){
        tmp = x[i];
        x[i] = x[j];
        x[j] = tmp;
      }
    }
  }
  int r = x[N/2] - x[N/2-1];
  printf(“%d”,r);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: stray '\342' in program
    5 |   scanf(<U+201C>%d<U+201D>,&N);
      |         ^~~~~~~~
main.c:5:10: error: expected expression before '%' token
    5 |   scanf(“%d”,&N);
      |          ^
main.c:5:12: error: stray '\342' in program
    5 |   scanf(<U+201C>%d<U+201D>,&N);
      |                   ^~~~~~~~
main.c:8:11: error: stray '\342' in program
    8 |     scanf(<U+201C>%d<U+201D>,&x[i]);
      |           ^~~~~~~~
main.c:8:12: error: expected expression before '%' token
    8 |     scanf(“%d”,&x[i]);
      |            ^
main.c:8:14: error: stray '\342' in program
    8 |     scanf(<U+201C>%d<U+201D>,&x[i]);
      |                     ^~~~~~~~
main.c:20:10: error: stray '\342' in program
   20 |   printf(<U+201C>%d<U+201D>,r);
      |          ^~~~~~~~
main.c:20:11: error: expected expression before '%' token
   20 |   printf(“%d”,r);
      |           ^
main.c:20:13: error: stray '\342' in program
   20 |   printf(<U+201C>%d<U+201D>,r);
      |                    ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define me(a,x) memset(a,x,sizeof(a))
#define sc scanf
#define itn int
using namespace std;
const int N=1e6;
const long long mod=1e9+7;
const int oo=0x7fffffff;
const int sup=0x80000000;
typedef long long ll;
typedef unsigned long long ull;
template <typename it>void db(it *begin,it *end){while(begin!=end)cout<<(*begin++)<<" ";puts("");}
template <typename it>
string to_str(it n){string s="";while(n)s+=n%10+'0',n/=10;reverse(s.begin(),s.end());return s;}
template <typename it>int o(it a){cout<<a<<endl;return 0;}
ll mul(ll a,ll b,ll c){ll ans=0;for(;b;b>>=1,a=(a+a)%c)if(b&1)ans=(ans+a)%c;return ans;}
ll ksm(ll a,ll b,ll c){ll ans=1;for(;b;b>>=1,a=mul(a,a,c))if(b&1)ans=mul(ans,a,c);return ans;}
int n,[N];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++)cin>>d[i];
	sort(d+1,d+n+1);
	o(d[n/2+1]-d[n/2]);
}


Compiler output:
a.cc:18:7: error: expected unqualified-id before '[' token
   18 | int n,[N];
      |       ^
a.cc: In function 'int main()':
a.cc:21:35: error: 'd' was not declared in this scope
   21 |         for(int i=1;i<=n;i++)cin>>d[i];
      |                                   ^
a.cc:22:14: error: 'd' was not declared in this scope
   22 |         sort(d+1,d+n+1);
      |              ^
Language: C

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

int main(){
  char p_tmp[600000];
  char *end[100000];
  int n;
  int i,K;
  int d[100000];
  int count_arc=0,count_abc=0,count=0;
  
  scanf("%d",&n);
  scanf("%s",&p_tmp);
  
  d[0] = strtol(p_tmp, &end[0], 10);
  for(i=0;i<n-1;i++){
    d[i] = strtol(end[i], &end[i+1], 10);
  }

  for(K=1;K<=100000;K++){
    for(i=0;i<n-1;i++){
      if(d[i]>=K) count_arc++;
      else count count_abc++;
    }
    if(count_arc == count_abc) count++;
  }
  printf("%d\n",count);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:24:17: error: expected ';' before 'count_abc'
   24 |       else count count_abc++;
      |                 ^~~~~~~~~~
      |                 ;
Language: C++

// This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <iostream>
#include <cstdlib>

#include <vector>

int main()
{
    int N;
    std::cin >> N;
    std::vector<int> D(N);
    for(int i = 0; i < N; i++){
        int d;
        std::cin >> d;
        D[i] = d;
    }
    
    sort(D.begin(), D.end());
    
    int ans = 0;
    ans = D[N/2] - D[N/2 - 1];
    std::cout << ans << std::endl;
    return 0;
}

// GCC reference:
//   https://gcc.gnu.org/

// C++ language references:
//   https://cppreference.com/
//   https://isocpp.org/
//   http://www.open-std.org/jtc1/sc22/wg21/

// Boost libraries references:
//   https://www.boost.org/doc/


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(D.begin(), D.end());
      |     ^~~~
      |     short
Language: Java

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

public class cf {

	static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            try {
                br = new BufferedReader(new InputStreamReader(System.in));
                st = new StringTokenizer(br.readLine());
            } catch (Exception e){e.printStackTrace();}
        }

        public String next() {
            if (st.hasMoreTokens()) return st.nextToken();
            try {st = new StringTokenizer(br.readLine());}
            catch (Exception e) {e.printStackTrace();}
            return st.nextToken();
        }

        public int nextInt() {return Integer.parseInt(next());}

        public long nextLong() {return Long.parseLong(next());}

        public double nextDouble() {return Double.parseDouble(next());}

        public String nextLine() {
            String line = "";
            if(st.hasMoreTokens()) line = st.nextToken();
            else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
            while(st.hasMoreTokens()) line += " "+st.nextToken();
            return line;
        }
    }
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        PrintWriter pw = new PrintWriter(System.out);

        int n = sc.nextInt();
        Integer[] a = new Integer[n];
        for(int i=0;i<n;i++) a[i] = sc.nextInt();
        Arrays.sort(a);

        pw.println(a[n/2] - a[(n-1)/2]);

        pw.close();
    }
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;set<int> s;
    cin>>n;
    vector<int>v(n);
    for(int i=0;i<n;i++)
        cin>>v[i];
       res=v[n/2]-v[n/2-1]
    cout<<res<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'res' was not declared in this scope
   10 |        res=v[n/2]-v[n/2-1]
      |        ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cstdio>
using namespace std;

int main(){
	int n;
	cin >> n;

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

	int temp;
	sort(d,d+n)

	int k;
	if(n%2==1){
		k=0;
	}else{
		n = n/2;
		k = d[n+1]-d[n];
	}

	cout << k << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: expected ';' before 'int'
   18 |         sort(d,d+n)
      |                    ^
      |                    ;
   19 | 
   20 |         int k;
      |         ~~~         
a.cc:22:17: error: 'k' was not declared in this scope
   22 |                 k=0;
      |                 ^
a.cc:25:17: error: 'k' was not declared in this scope
   25 |                 k = d[n+1]-d[n];
      |                 ^
a.cc:28:17: error: 'k' was not declared in this scope
   28 |         cout << k << endl;
      |                 ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cstdio>
using namespace std;

int main(){
	int n;
	cin >> n;

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

	int temp;
	int i,j
	for(i=0; i<n; i++){
		for(j=0; j<n; j++){
			if(d[i] > d[j]){
				temp = d[i];
				d[i] = d[j];
				d[j] = temp;
			}
		}
	}

	int k;
	if(n%2==1){
		k=0;
	}else{
		n = n/2;
		k = d[n+1]-d[n];
	}

	cout << k << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: expected initializer before 'for'
   19 |         for(i=0; i<n; i++){
      |         ^~~
a.cc:19:26: error: expected ';' before ')' token
   19 |         for(i=0; i<n; i++){
      |                          ^
      |                          ;
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cstdio>
using namespace std;

int main(){
	int n;
	cin >> n;

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

	int temp
	int i,j
	for(i=0; i<n; i++){
		for(j=0; j<n; j++){
			if(d[i] > d[j]){
				temp = d[i];
				d[i] = d[j];
				d[j] = temp;
			}
		}
	}

	int k;
	if(n%2==1){
		k=0;
	}else{
		n = n/2;
		k = d[n+1]-d[n];
	}

	cout << k << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: expected initializer before 'int'
   18 |         int i,j
      |         ^~~
a.cc:19:18: error: 'i' was not declared in this scope
   19 |         for(i=0; i<n; i++){
      |                  ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cstdio>
using namespace std;

int main(){
	int n;
	cin >> n;

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

	int temp

	for(int i=0; i<n; i++){
		for(int j=0; j<n; j++){
			if(d[i] > d[j]){
				temp = d[i];
				d[i] = d[j];
				d[j] = temp;
			}
		}
	}

	int k;
	if(n%2==1){
		k=0;
	}else{
		n = n/2;
		k = d[n+1]-d[n];
	}

	cout << k << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: expected initializer before 'for'
   19 |         for(int i=0; i<n; i++){
      |         ^~~
a.cc:19:22: error: 'i' was not declared in this scope
   19 |         for(int i=0; i<n; i++){
      |                      ^
Language: C++

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string>
#include <iostream>
using namespace std;

long long int d[100000+1];
int N;

int main() {
    int i;

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

    sort(d, d+N);

    cout << d[N/2] - d[N/2-1] << endl;

}

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

#include <stdio.h>
#include <stdlib.h>
int cmp(int a,b){
  return a-b;
}

int main(){
  int size,ans=0,i,arc=0,abs=0;
  int k,j;
  
  scanf("%d",&size);
  int num[size];
  
  for(i=0;i<size;i++){
    scanf("%d",&num[i]);
  }
  
  qsort(num,size,sizeof(int),cmp);
  
  if(num[size/2]==num[(size/2) -1])printf("0\n");
  else printf("%d\n",num[(size/2)-1]-num[size/2]);
  
  printf("%d\n",ans);
  return 0;
}


Compiler output:
main.c:3:15: error: unknown type name 'b'
    3 | int cmp(int a,b){
      |               ^
main.c: In function 'main':
main.c:18:30: error: 'cmp' undeclared (first use in this function)
   18 |   qsort(num,size,sizeof(int),cmp);
      |                              ^~~
main.c:18:30: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
  int size,ans=0,i,arc=0,abs=0;
  int k,j;
  
  scanf("%d",&size);
  int num[size];
  
  for(i=0;i<size;i++){
    scanf("%d",&num[i]);
  }
  
  for(j=0;j<1E10;i++){
  	for(i=0;i<size,i++){
  		k=j;
    	if(num[i]>=k)arc++;
    	else abs++;
      
      	if(abs==arc) ans++;
  	}
  }
  printf("%d\n",ans);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:27: error: expected ';' before ')' token
   15 |         for(i=0;i<size,i++){
      |                           ^
      |                           ;
Language: C

#include <stdio.h>

int main(){
  int size,ans=0,i,arc=0,abs=0;
  int k,j;
  
  scanf("%d",&size);
  int num[size];
  
  for(i=0,i<size,i++){
    scanf("%d",&num[i]);
  }
  
  for(j=0;j<1E10;i++){
  	for(i=0;i<size,i++){
  		k=j;
    	if(num[i]>=k)arc++;
    	else abs++;
      
      	if(abs==arc) ans++;
  	}
  }
  printf("%d\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:21: error: expected ';' before ')' token
   10 |   for(i=0,i<size,i++){
      |                     ^
      |                     ;
main.c:10:21: error: expected expression before ')' token
main.c:15:27: error: expected ';' before ')' token
   15 |         for(i=0;i<size,i++){
      |                           ^
      |                           ;
Language: C

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


void insertnumnum(
int *i_nums,
int in_len,
int in_number
);

int main()
{
        char inputa[100000];
        char inputb[100000];
        char numbuff[10000];
        int numbers[10000];
        int numnum;
        int match;

        fgets( inputa, 65535, stdin );
        fgets( inputb, 65535, stdin );
        if (strchr(inputa, '\n') != NULL) inputa[strlen(inputa) - 1] = '\0';
        if (strchr(inputb, '\n') != NULL) inputb[strlen(inputb) - 1] = '\0';

        numnum = 0;
        for( int i=0; inputb[i] !=0; i++ ) {
                if( inputb[i] == ' ' ) {
                        continue;
                }

                int j=0;
                while( inputb[i] != 0 && inputb[i] != ' ' ) {
                        numbuff[j++] = inputb[i++];
                }
                numbuff[j]=0;
                insertnumnum(numbers, numnum, atoi(numbuff));
                numnum++;
                /* for( int k =0; k < numnum; k++ ) { printf("<%d>", numbers[k]); } printf("\n"); */

                if( inputb[i-1] == 0 ) {
                        i--;
                }
        }

        int N;
        N = atoi( inputa);
        if( numbers[ N/2-1 ] == numbers[ N/2 ] ) {
                printf("0\n");
        }
        printf("%d\n", numbers[N/2]-numbers[N/2-1]);

        return 0;
}

void insertnumnum(
int *i_nums,
int in_len,
int in_number
) {
        int o_nums[100000];

        int i_nums_i = 0;
        int o_nums_i = 0;

        /* printf("input=%d\n", in_number ); */
        for( i_nums_i = 0; i_nums_i < in_len; i_nums_i++ ) {
                if( i_nums[i_nums_i] > in_number ) {
                   o_nums[o_nums_i++] =in_number;
                   break;
                }
                else {
                        o_nums[o_nums_i++] = i_nums[i_nums_i];
                }
        }
        for( ; i_nums_i < in_len; i_nums_i++ ) {
                o_nums[o_nums_i++] = i_nums[i_nums_i];
        }

        if( i_nums_i == o_nums_i ) {
                o_nums[o_nums_i]  = in_number;
        }

        for( int i = 0; i < in_len+1; i++ ) {
                i_nums[i] = o_nums[i];
        }
}
manshi@yuuzaa-PC:~$




















































































































































































































































































































































































































Compiler output:
main.c:88:7: error: stray '@' in program
   88 | manshi@yuuzaa-PC:~$
      |       ^
main.c:88:1: error: unknown type name 'manshi'
   88 | manshi@yuuzaa-PC:~$
      | ^~~~~~
main.c:88:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token
   88 | manshi@yuuzaa-PC:~$
      |              ^
Language: Java

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

		out.flush();
	}
}


Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		PrintWriter out = new PrintWriter(System.out);
		^
  symbol:   class PrintWriter
  location: class Main
Main.java:4: error: cannot find symbol
		PrintWriter out = new PrintWriter(System.out);
		                      ^
  symbol:   class PrintWriter
  location: class Main
Main.java:8: error: cannot find symbol
		Arrays.sort(d);
		^
  symbol:   variable Arrays
  location: class Main
5 errors
Language: C++

#include<iostream>
#include <fstream>
#include <vector>
#include <map>
#include <cmath>

#define LOCAL  1
#define UPLOAD 2

using namespace std;

int main()
{
#if ENVIRONMENT == LOCAL
    std::ifstream in("input.txt");
    std::cin.rdbuf(in.rdbuf());
#endif

    int N;
    cin >> N;
    vector<int> d;
    for(int i=0;i<N;i++){
        int dd;
        cin >> dd;
        d.push_back(dd);
    }
    std::sort(d.begin(), d.end());

    int ret = d[N/2] - d[N/2 - 1];

    cout << ret << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:10: error: 'sort' is not a member of 'std'; did you mean 'sqrt'?
   27 |     std::sort(d.begin(), d.end());
      |          ^~~~
      |          sqrt
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,;
  int d[100005];

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

  sort(d,d+n);

  cout<<d[n/2]-d[n/2-1]<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 |   int n,;
      |         ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n;
  int d[100005];
  cin>>n;
  for(int i=1;i<=n;i++){
    cin>>d[i];
  }

  sort(d+1,d+n+1);
  
  int ans=d[n/2+1]-d[n/2];
  
  cout<<ans<<"\n";
  return 0;
}


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

#include<fstream>
#include<sstream>
#include<algorithm>
#include<math.h>
#include<string>
#include<vector>
#include<iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	vector<int> vec(n);
	for (int i = 0; i < n; i++)
		cin >> vec.at(i);
	sort(vec.begin(), vec.end());//難易度を小さい順に並べた


	if (n == 2) {
		if (vec.at(n / 2 - 1) == vec.at(n / 2))
			cout << 0 << endl;
		else
			cout << vec.at(n / 2) - vec.at(n / 2 - 1) << endl;
	}

	else {
		if (vec.at(n / 2 - 1) == vec.at(n / 2))
			cout << 0 << endl;
		else if (vec.at(n / 2 - 1) == vec.at(n / 2 - 2) || vec.at(n / 2) == vec.at(n / 2 + 1))
			cout << vec.at(n / 2) - vec.at(n / 2 - 1) << endl;
		else
			cout << vec.at(n / 2) - vec.at(n / 2 - 1) << endl;

	}
	


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

#include <bits/stdc++.h>
using namespace std;
class fastio {
public:
    fastio() {
        ios_base::sync_with_stdio(false);
        cout.tie(nullptr);
        cin.tie(nullptr);
    }
} __fastio;
void solve() {
  int n; cin >> n;
  vector<int> a[i];
  for(int i=0; i<n; i++)
    cin >> a[n];
  sort(a.begin(), a.end());
  cout << abs(a[n/2] - a[n/2 + 1]) << endl;
}
int main() {
  __fastio;
  solve();
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:13:17: error: 'i' was not declared in this scope
   13 |   vector<int> a[i];
      |                 ^
a.cc:15:12: error: 'a' was not declared in this scope
   15 |     cin >> a[n];
      |            ^
a.cc:16:8: error: 'a' was not declared in this scope
   16 |   sort(a.begin(), a.end());
      |        ^
Language: C++

#include <iostream>
using namespace std;

int main(void){
    int n, knum;
    int *d;
    cin >> n;
    d = (int *)malloc(sizeof(int)*n);
    for(int i=0;i<n;i++){
        cin >> d[i];
    }
    sort(d, d+n);
    cout << d[n/2]-d[n/2-1] << "\n";
}

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

#include <cstdio>
using namespace std;
long long v[2005][2005];
const int mod=1e9+7;
int main() {
    long long n,k;
    scanf("%lld%lld",&n,&k);
    v[0][0]=1;
    for(int i=1;i<=n;i++){
        v[i][0]=1;
        for(int j=1;j<=i;j++)
            v[i][j]=(v[i-1][j-1]+v[i-1][j])%mod;
    }
    for(int i=1;i<=k;i++)
        printf("%lld\n",v[n-k+1][i]*v[k-1][i-1]%mod);//外部红球可能情况数量*内部蓝球可断的情况数量
    //std::cout << "Hello, World!" << std::endl;
    return 0;
}

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

#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main(){
	ll N;
	cin >> N;
	vector<ll> d(N);
	for(ll i = 0; i < N; i++){
		cin >> d[i];
	}
	sort(d.begin(), d.end());
	cout << d[N/2] - d[(N/2)-1] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |         sort(d.begin(), d.end());
      |         ^~~~
      |         short
Language: C++

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


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

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

int main () {

    int N;
    scanf("%d", &N);

    int d[N];
    for (int i = 0; i < N; i++) {
        scanf("%d", &d[i]);
    }

    sort(d, d + N);

    printf("%d\n", d[N/2] - d[N/2-1]);

    return 0;
}


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(d, d + N);
      |     ^~~~
      |     short
Language: Java

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

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

#include <stdio.h>
int func(const void *a, const void *b){
  return *(int*)a - *(int*)b;
}
int main(void){
  int n, d[100000] = {0};
  scanf("%d", &n);getchar();
  for(int i = 0; i < n; i++){
    scanf("%d", &d[i]);getchar();
  }
  qsort(d, n, sizeof(int), func);
  
  printf("%d\n", d[n / 2] - d[(n / 2) - 1]);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'qsort' was not declared in this scope
   11 |   qsort(d, n, sizeof(int), func);
      |   ^~~~~
Language: C++

#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector<int> v(n);
  for(int i=0;i<n;i++)cin>>v(i);
  sort(v.begin(),v.end());
  cout<<v[v.size()/2]-v[v.size()/2-1]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: no match for call to '(std::vector<int>) (int&)'
    9 |   for(int i=0;i<n;i++)cin>>v(i);
      |                            ~^~~
Language: C++

#include <vector>
include <iostream>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector<int> v(n);
  for(int i=0;i<n;i++)cin>>v(i);
  sort(v.begin(),v.end());
  cout<<v[v.size()/2]-v[v.size()/2-1]<<endl;
}


Compiler output:
a.cc:2:1: error: 'include' does not name a type
    2 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> v(n);
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> v(n);
      |          ^~~
a.cc:8:28: error: 'v' was not declared in this scope
    8 |   for(int i=0;i<n;i++)cin>>v(i);
      |                            ^
a.cc:9:8: error: 'v' was not declared in this scope
    9 |   sort(v.begin(),v.end());
      |        ^
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |   sort(v.begin(),v.end());
      |   ^~~~
      |   short
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout<<v[v.size()/2]-v[v.size()/2-1]<<endl;
      |   ^~~~
a.cc:10:40: error: 'endl' was not declared in this scope
   10 |   cout<<v[v.size()/2]-v[v.size()/2-1]<<endl;
      |                                        ^~~~
Language: C++

#include <vector>
include <iostream>
using namesoace std;
int main(){
  int n;
  cin>>n;
  vector<int> v(n);
  for(int i=0;i<n;i++)cin>>v(i);
  sort(v.begin(),v.end());
  cout<<v[v.size()/2]-v[v.size()/2-1]<<endl;
}

Compiler output:
a.cc:2:1: error: 'include' does not name a type
    2 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> v(n);
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> v(n);
      |          ^~~
a.cc:8:28: error: 'v' was not declared in this scope
    8 |   for(int i=0;i<n;i++)cin>>v(i);
      |                            ^
a.cc:9:8: error: 'v' was not declared in this scope
    9 |   sort(v.begin(),v.end());
      |        ^
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |   sort(v.begin(),v.end());
      |   ^~~~
      |   short
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout<<v[v.size()/2]-v[v.size()/2-1]<<endl;
      |   ^~~~
a.cc:10:40: error: 'endl' was not declared in this scope
   10 |   cout<<v[v.size()/2]-v[v.size()/2-1]<<endl;
      |                                        ^~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main(void){
int n;
cin>>n;
vector<int>d(n);
for(i=0;i<n;i++)cin>>d[i];
sort(d.begin(),d.end());
cout<<d[n/2]-d[n/2-1]<<endl;
return 0;
}

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

N = int(input())
d = sorted(map(int, input().split()))
print(d[N/2]-d[N/2-1])


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N = int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:5: error: expected expression before 'int'
    1 | N = int(input())
      |     ^~~
Language: C

N=int(input())
d=list(map(int,input().split()))
d.sort()
print(d[N/2]-d[n/2-1])


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N=int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | N=int(input())
      |   ^~~
Language: C++

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









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

    cin >> n;
    int d[n+1];
    for ( int i = 1; i <= n; ++i)
        cin >> d[i];


    sort(d + 1, d + (n+1));

        cout << d[n/2 +1] - d[n/2];






    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   19 |     cin >> n;
      |            ^
      |            yn
a.cc:22:16: error: 'd' was not declared in this scope
   22 |         cin >> d[i];
      |                ^
a.cc:25:10: error: 'd' was not declared in this scope
   25 |     sort(d + 1, d + (n+1));
      |          ^
Language: C++

#include<stdio.h>
void swap(int tree[],int a,int b){
	int temp=tree[a];
	tree[a]=tree[b];
	tree[b]=temp;
}
void heapify(int tree[],int n,int i){
	int c1=2*i+1;
	int c2=2*i+2;
	int max=i;
	if(i>=n)
		return;
	if(c1<n&&tree[c1]>tree[max])
		max=c1;
	if(c2<n&&tree[c2]>tree[max])
		max=c2;
	if(max!=i){
		swap(tree,i,max);
		heapify(tree,n,max);
	}
}
void build_heap(int tree[],int n){
	int j;
	for(j=((n-1)/2);j>=0;j--){
	heapify(tree,n,j);		
	}
}
void heap_sort(int tree[],int n){
	build_heap(tree,n);
	int k;
	for(k=n-1;k>=0;k--){
		swap(tree,k,0);
		heapify(tree,i,0);
	}
}
int main(){
	int a[100010];
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		}
	heap_sort(a,n);
	printf("%d",a[n/2]-a[n/2-1]);
	return 0;
}

Compiler output:
a.cc: In function 'void heap_sort(int*, int)':
a.cc:33:30: error: 'i' was not declared in this scope
   33 |                 heapify(tree,i,0);
      |                              ^
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector> 
#include<algorithm>
 
using namespace std;
 
int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  int n;
  cin >> n;
  
  vector<int> d(n);
  
  for(int i = 0; i < n; ++i){
    cin >> d[i];
  }
  
  sort(d.begin(), d.end());
  
  int res = d[n/2 + 1] - d[n/2];
    
  cout << res << "\n";
  return 0; 
}
#include<stdio.h>
#include<iostream>
#include<vector> 
 
using namespace std;
 
int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  int n;
  cin >> n;
  
  vector<int> d(n);
  
  for(int i = 0; i < n; ++i){
    cin >> d[i];
  }
  
  sort(d.begin(), d.end());
  
  int res = d[n/2 + 1] - d[n/2];
    
  cout << res << "\n";
  return 0; 
}

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

#include<stdio.h>
#include<iostream>
#include<vector> 
#include<algorithm>
 
using namespace std;
 
int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  int n;
  cin >> n;
  
  vector<int> d(n);
  
  for(int i = 0; i < n; ++i){
    cin >> d[i];
  }
  
  sort(d.begin(), d.end());
  
  int res = d[n/2 + 1] - d[n/2];
    
  cout << res << "\n";
  return 0; 
}
#include<stdio.h>
#include<iostream>
#include<vector> 
 
using namespace std;
 
int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  int n;
  cin >> n;
  
  vector<int> d(n);
  
  for(int i = 0; i < n; ++i){
    cin >> d[i];
  }
  
  sort(d.begin(), d.end());
  
  int res = d[n/2 + 1] - d[n/2];
    
  cout << res << "\n";
  return 0; 
}
提出情報

Compiler output:
a.cc:34:5: error: redefinition of 'int main()'
   34 | int main(){
      |     ^~~~
a.cc:8:5: note: 'int main()' previously defined here
    8 | int main(){
      |     ^~~~
a.cc:54:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   54 | 提出情報
      | ^~~~~~~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector> 
 
using namespace std;
 
int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  int n;
  cin >> n;
  
  vector<int> d(n);
  
  for(int i = 0; i < n; ++i){
    cin >> d[i];
  }
  
  sort(d.begin(), d.end());
  
  int res = d[n/2 + 1] - d[n/2];
    
  cout << res << "\n";
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |   sort(d.begin(), d.end());
      |   ^~~~
      |   short
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector> 
 
using namespace std;
 
int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  int n;
  cin >> n;
  
  vector<int> d(n)
  
  for(int i = 0; i < n; ++i){
    cin >> d[i];
  }
  
  sort(d.begin(), d.end());
  
  int res = d[n/2 + 1] - d[n/2];
    
  cout << res << "\n";
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected ',' or ';' before 'for'
   16 |   for(int i = 0; i < n; ++i){
      |   ^~~
a.cc:16:18: error: 'i' was not declared in this scope
   16 |   for(int i = 0; i < n; ++i){
      |                  ^
a.cc:20:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |   sort(d.begin(), d.end());
      |   ^~~~
      |   short
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'gcd__' was not declared in this scope
    7 |   cout<<gcd__((((a,b),c),d),e);
      |         ^~~~~
Language: C

#include <stdio.h>
int main(void){
  int n;
  scanf("%d",n);
  int d, problem[100000]={};
  for(int i=0;i<n;i++){
    scanf("%d",&d);
    problem[d]++;
  }
  int abc = 0, ans = 0;
  for(int k=2;k<=100000;k++){
    abc += ds[k-1];
    if(abc == n/2) ans++;
  }
  printf("%d",ans);
}
    
    
    

Compiler output:
main.c: In function 'main':
main.c:12:12: error: 'ds' undeclared (first use in this function); did you mean 'd'?
   12 |     abc += ds[k-1];
      |            ^~
      |            d
main.c:12:12: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.io.InputStream;
import java.io.PrintStream;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

public class C {
    static final int MAX = 100100;
    InputStream in = System.in;
    PrintStream out = System.out;
    //static int d[] = new int[MAX];
    // static int dp[][] = new int[MAX][MAX];

    public void _main(String[] args) {
        Scanner sc = new Scanner(in);
        int N = sc.nextInt();
        int d[] = new int[N];
        for (int i=0;i<N;i++) d[i] = sc.nextInt();

        Arrays.sort(d);
        if ((N&1)==1) {out.println("0"); return;}
        int mid = N/2;
        out.println(d[mid] - d[mid-1]);
    }

    public static void main(String[] args) {
        new C()._main(args);
    }
}


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

#include <iostream>
#include <vector>
#include <map>

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

using namespace std;

int main(){
    int N;
    cin >> N;
    int d[N],count=0;
    rep(i,N) cin >> d[i];
    sort(d, d+N);
    

    cout << d[N/2]-d[N/2-1] << endl;
}

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(d, d+N);
      |     ^~~~
      |     short
Language: C++

#include <iostream>

using namespace std;

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

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

#include <stdio.h>

typedef int value_type ;

void quicksort(value_type a[], int left, int right);
value_type med3(value_type x, value_type y, value_type z);

int main()
{
	int N, i,tmp;
	int array[10];

	scanf_s("%d", &N);

	for (i= 0; i < N; i++) {
		scanf_s("%d", &array[i]);

	}
	
	quicksort(array, 0, N - 1);

	int num = array[N / 2] - array[N / 2 - 1];

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


value_type med3(value_type x, value_type y, value_type z) {
	if (x < y) {
		if (y < z) return y; else if (z < x) return x; else return z;
	}
	else {
		if (z < y) return y; else if (x < z) return x; else return z;
	}
}

/* クイックソート
* a     : ソートする配列
* left  : ソートするデータの開始位置
* right : ソートするデータの終了位置
*/
void quicksort(value_type a[], int left, int right) {
	if (left < right) {
		int i = left, j = right;
		value_type tmp, pivot = med3(a[i], a[i + (j - i) / 2], a[j]); /* (i+j)/2 ではオーバーフローしてしまう */
		while (1) { /* a[] を pivot 以上と以下の集まりに分割する */
			while (a[i] < pivot) i++; /* a[i] >= pivot となる位置を検索 */
			while (pivot < a[j]) j--; /* a[j] <= pivot となる位置を検索 */
			if (i >= j) break;
			tmp = a[i]; a[i] = a[j]; a[j] = tmp; /* a[i], a[j] を交換 */
			i++; j--;
		}
		quicksort(a, left, i - 1);  /* 分割した左を再帰的にソート */
		quicksort(a, j + 1, right); /* 分割した右を再帰的にソート */
	}
}

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

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

 int main() {
	 int N;
	 cin >> N;
	 vector<int>v(N);
	 for (int i = 0;i < N;++i) {
		 cin >> v[i];

	 }
	 sort(v.begin(), v.end());

	 int answer = v[v.size() / 2] - v[v.size() / 2 - 1];

	 cout << answer << endl;

	 return 0;
 }

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

using namespace std;
int main(){
    int n;
    cin >> n;
    vector<int>d(n);
    for(int i=0;i<n;i++)cin>>d.at(i);
    
    sort(d.begin(),d.end());
    cout<<d.at(n/2+1)-d.at(n/2)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<int>d(n);
      |     ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:5:12: error: expected primary-expression before 'int'
    5 |     vector<int>d(n);
      |            ^~~
a.cc:6:30: error: 'd' was not declared in this scope
    6 |     for(int i=0;i<n;i++)cin>>d.at(i);
      |                              ^
a.cc:8:10: error: 'd' was not declared in this scope
    8 |     sort(d.begin(),d.end());
      |          ^
a.cc:8:5: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |     sort(d.begin(),d.end());
      |     ^~~~
      |     short
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout<<d.at(n/2+1)-d.at(n/2)<<endl;
      |     ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:34: error: 'endl' was not declared in this scope
    9 |     cout<<d.at(n/2+1)-d.at(n/2)<<endl;
      |                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C

#include<stdio.h>
#include<stdlib.h>
int cmp(const void *p, const void *q) {
	return *(int*)p - *(int*)q;
}
int main()
{
	int n,i,j;
	int big = 0,small = 0;
	int ans=0,num;
	int d[100007];
	scanf("%d", &n);

	for (i = 0;i < n;i++) {
		scanf("%d", &d[i]);
	}
	int n = sizeof(d) / sizeof(int);
	qsort(d, n, sizeof(int), cmp);

	printf("%d\n",d[n / 2] - d[n / 2 - 1]);

	printf("%d", ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:13: error: redeclaration of 'n' with no linkage
   17 |         int n = sizeof(d) / sizeof(int);
      |             ^
main.c:8:13: note: previous declaration of 'n' with type 'int'
    8 |         int n,i,j;
      |             ^
Language: C

#include <stdio.h>
#include <stdlib.h>
int asc(const void *a, const void *b) {
  return *(int *)a - *(int *)b;
}

int main(){
  int n;
  scanf("%d",&n);
  if(n%2!=0 || n<2 || n>100000){
    return 0;
  }

  int d[n];
  int i,j;
  int tmp;

  for(i=0;i<n;i++){
    scanf("%d",&d[i]);
    if(d[i]<1 || d[i]>100000){
      return 0;
    }
  }
   qsort(d, sizeof(d) / sizeof(int), sizeof(int), asc);
  a = d[n/2] -d[n/2-1];

  printf("%d\n",a);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:25:3: error: 'a' undeclared (first use in this function)
   25 |   a = d[n/2] -d[n/2-1];
      |   ^
main.c:25:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <array>
#include <iostream>

int main()
{
    int N;
    std::cin >> N;
    std::array<int, 100000> d;
    for (int a = 0; a < N; ++a) {
        std::cin >> d.at(a);
    }

    int b = 0;
    for (int K = 0; K < 100000; ++K) {
        int d = 0;
        for (int c = 0; c < N; ++c) {
            if (d.at(c) == 0) {
                break;
            } else if (d.at(c) < K) {
                ++d;
            }
        }
        if (d == N / 2) {
            ++b;
        }
    }

    std::cout << b << std::endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: request for member 'at' in 'd', which is of non-class type 'int'
   17 |             if (d.at(c) == 0) {
      |                   ^~
a.cc:19:26: error: request for member 'at' in 'd', which is of non-class type 'int'
   19 |             } else if (d.at(c) < K) {
      |                          ^~
Language: C++

#include <bits/stdc++.h>
#include <vector>
#include <iostream>
using namespace std;
 
int main() { 
    int N;
	vector<int> vec(N);
 
    scanf("%d\n", &N);
    for (int i = 0; i < N; i++) {
    	cin >> vec.at(i);
    }
 
    int tmp = 0;
	sort(vec.begin(), vec.end());
      //cout << vec.at(i) << endl;
    }
  
  	int ans = vec.at(N/2) - vec.at(N/2 - 1);
	printf("%d\n", ans);
}

Compiler output:
a.cc:20:19: error: 'vec' was not declared in this scope
   20 |         int ans = vec.at(N/2) - vec.at(N/2 - 1);
      |                   ^~~
a.cc:20:26: error: 'N' was not declared in this scope
   20 |         int ans = vec.at(N/2) - vec.at(N/2 - 1);
      |                          ^
a.cc:20:33: error: 'vec' was not declared in this scope
   20 |         int ans = vec.at(N/2) - vec.at(N/2 - 1);
      |                                 ^~~
a.cc:20:40: error: 'N' was not declared in this scope
   20 |         int ans = vec.at(N/2) - vec.at(N/2 - 1);
      |                                        ^
a.cc:21:15: error: expected constructor, destructor, or type conversion before '(' token
   21 |         printf("%d\n", ans);
      |               ^
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C

#include<stdio.h>
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,num=0,t;
	scanf("%d",&n);
	int a[100000];
	for (int i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+n);
	printf("%d",a[n/2] - a[n/2 - 1]);
	return 0;
}

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

#include <stdio.h>
int main()
{
	long int n,i;
	scanf("%ld",&n);
	long int d[100001]={0},l;
	for(i=0;i<n;i++)
	{
		scanf("%ld",&l);
		d[l]++;
	}
	long int a=0,k1,k=0;
	for(i=1;i<=100001;i++)
	{
		a+=d[i];
		if(a==n/2)
		{k1=i;break;}
		else if(a>n/2)
		{printf("%d",0);return 0;}
	}
	for(i=k1+1;;i++)
	{
		if(d[i]==0)
		{
			k++
		}
		else
		{
			printf("%ld",k);
			return 0;
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:25:28: error: expected ';' before '}' token
   25 |                         k++
      |                            ^
      |                            ;
   26 |                 }
      |                 ~
Language: C

import numpy as np
n=int(input())
t =list(map(int, input().split()))
counter=0

ans=0
t.sort()

half=t//2

ans=t[half]-t[half-1]


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import numpy as np
      | ^~~~~~
main.c:1:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'as'
    1 | import numpy as np
      |              ^~
main.c:1:14: error: unknown type name 'as'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int num;
  int i;
  int pn[100000];
  int count=0;
    
  cin >> num;
  for(i=0;i<num; i++)
    cin >> pn[i];  
  sort(pn, pn+num);
  
  output = pn[num/2] - pn[(num/2) - 1];
  cout << output;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'output' was not declared in this scope
   15 |   output = pn[num/2] - pn[(num/2) - 1];
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int num;
  int i;
  int pn[10 ** 5];
  int count=0;
    
  cin >> num;
  for(i=0;i<num; i++)
    cin >> pn[i];  
  sort(pn, pn+num);
  
  output = pn[num/2] - pn[(num/2) - 1];
  cout << output;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: invalid type argument of unary '*' (have 'int')
    7 |   int pn[10 ** 5];
      |              ^~~
a.cc:12:12: error: 'pn' was not declared in this scope; did you mean 'yn'?
   12 |     cin >> pn[i];
      |            ^~
      |            yn
a.cc:13:8: error: 'pn' was not declared in this scope; did you mean 'yn'?
   13 |   sort(pn, pn+num);
      |        ^~
      |        yn
a.cc:15:3: error: 'output' was not declared in this scope
   15 |   output = pn[num/2] - pn[(num/2) - 1];
      |   ^~~~~~
Language: C

#include <stdio.h>
int main()
{
	long int n,i;
	scanf("%ld",&n);
	long int d[100001]={0},l;
	for(i=0;i<n;i++)
	{
		scanf("%ld",&l);
		d[l]++;
	}
	long int a=0,k1;
	for(i=1;i<=100001;i++)
	{
		a+=d[i];
		if(a==n/2)
		{k1=i;break;}
		else if(a>n/2)
		{printf("%d",0);return 0;}
	}
	for(i=k1;;i++)
	{
		if(d[i]!=0)
		{
			printf("%ld",k);
			return 0;
		}
		else
		{
			k++;
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:25:38: error: 'k' undeclared (first use in this function); did you mean 'k1'?
   25 |                         printf("%ld",k);
      |                                      ^
      |                                      k1
main.c:25:38: note: each undeclared identifier is reported only once for each function it appears in