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

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Iterator;
import java.util.Collections;
import java.util.Comparator;
import java.util.Random;
import java.util.Map;
import java.util.HashMap;

class Main{
        public static void main(String args[]){
                Scanner sc = new Scanner(System.in);
                int N = sc.nextInt();

                System.out.print("2 ");
                int pre = 1;
                int num;
                boolean ch = true;
                for(int i=1; i<N; i++){
                        for(int j=pre+2;;j +=2){
                                num = j;
                                for(int k=2;k<num;k++){
                                        if(num %a k==0){
                                                ch = false;
                                                break;
                                        }
                                }
                                if(ch){
                                        pre = j;
                                        break;
                                }
                        }
                        System.out.print(pre+" ");
                }
        }
}


Compiler output:
Main.java:25: error: ')' expected
                                        if(num %a k==0){
                                                 ^
Main.java:25: error: not a statement
                                        if(num %a k==0){
                                                   ^
Main.java:25: error: ';' expected
                                        if(num %a k==0){
                                                      ^
3 errors
Language: C++

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

pair<vector<bool>, vector<int>> make_primes() {
    vector<int> primes;
    vector<bool> is_prime(277776, true);
    is_prime[0] = is_prime[1] = false;
    for (int i = 2; i < (int)is_prime.size(); i++) {
        if (is_prime[i]) primes.push_back(i);
        for (int j = i*2; j < (int)is_prime.size(); j += i) {
            is_prime[j] = false;
        }
    }
    return make_pair(is_prime, primes);
}

int main() {
    vector<bool> is_prime;
    vector<int> primes;
    tie(is_prime, primes) = make_primes();

    int N; cin >> N;

    vector<int> ans(N);
    for (int i = 0, j = 0; i < N && j < (int)primes.size(); j++) {
        assert(primes[j] <= 55555);
        if (primes[j] % 10 == 9) ans[i++] = primes[j];
    }

    copy(ans.begin(), ans.end(), ostream_iterator<int>(cout, " "));
    cout << endl;

    return 0;
}


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

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

int main(){
	int n;
	cin >> n;
	int a[n];
	a[0] = 2;
	a[1] = 3;
	a[2] = 5;
	a[3] = 7;
	int t = 4;
	for(int i = 11;i < 55555;i++){
		bool f=true;
		for(int j = 0;j < sqrt(i)+1;j++){
			f &= i % j != 0;
		}
		a[t] = i;
		t++;
		if(t == n)break;
	}
	for(int i = 0;i < n;i++){
		cout << a[i];
		if(i < n-1){
			cout << ' ';
		}
		else{
			cout << endl;
		}
	}
	return 0;
}

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

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

int a[100001];
int main(){
	int n;
	scanf("%d",&b[i]);
	for(int i=1;i<=n;++i){
		scanf("%d",&b[i]);
	}
	sort(b+1,b+n+1);
	if(b[n]/2>b[n-1]){
		printf("%d %d\n",b[n],b[n-1]);
		return 0;
	}
	if(b[n]/2<b[1]){
		printf("%d %d\n",b[n],b[1]);
		return 0;
	}
	int x1=lower_bound(b+1,b+n+1,b[n]/2)-b;
	int x2=x1-1; 
	if(b[n]%2==0){
		if(b[x1]-b[n]/2>b[n]/2-b[x2])
			printf("%d %d\n"b[n],b[x2]);
		else
			printf("%d %d\n",b[n],b[x1]);
	}
	else{
		int x3=max(0,b[x1]-b[n]/2-1);
		int x4=b[n/2]-b[x2];
		if(x3>x4)
			printf("%d %d\n",b[n],b[x2]);
		else
			printf("%d %d\n",b[n],b[x1]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'b' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                     ^
a.cc:9:23: error: 'i' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                       ^
a.cc:26:32: error: unable to find string literal operator 'operator""b' with 'const char [7]', 'long unsigned int' arguments
   26 |                         printf("%d %d\n"b[n],b[x2]);
      |                                ^~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define LL long long

std::string repeat(int times, char c){
	std:: string r(times,c);
	return r;
}

bool isPrime(int& n){
	int seekTo;
	bool prime;

        for(int j=n;j<=n;j++){
            if(n==1){
				prime = false;
				break;
            } else if(n==2){
				prime = true;
				break;
            } else if(n%2==0){
				prime = false;
				break;
			} else {
				prime = true;
				seekTo = (int)std::sqrt(j);
				for(int i=3;i<=seekTo;i+=2){
					if(j%i==0){
						prime = false;
						break;
					}
				}
			}
        }

	return prime;
}

int main(){

	int n, i = 4;
	std::cin >> n;
	std::vector<int> ans = {3};

	while(ans.size()<n){
		if(isPrime(i))ans.push_back(i);
		i++;
	}

	for(i=0;i<ans.size();i++){
		std::cout << ans[i];
		if(i!=ans.size()-1)std::cout << ' ';
		else std::cout << std::endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'bool isPrime(int&)':
a.cc:27:52: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   27 |                                 seekTo = (int)std::sqrt(j);
      |                                                    ^~~~
      |                                                    sort
Language: C++

#include <iostream>

using namespace std;

int main(){
	int n;
	cin >> n;
	int a[n];
	a[0] = 2;
	a[1] = 3;
	a[2] = 5;
	a[3] = 7;
	int t = 4;
	for(int i = 11;i < 55555;i++){
		bool f=true;
		for(int j = 0;j < sqrt(i)+1;j++){
			f &= i % j != 0;
		}
		a[t] = i;
		t++;
		if(t == n)break;
	}
	for(int i = 0;i < n;i++){
		cout << a[i];
		if(i < n-1){
			cout << ' ';
		}
		else{
			cout << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:35: error: 'sqrt' was not declared in this scope
   16 |                 for(int j = 0;j < sqrt(i)+1;j++){
      |                                   ^~~~
Language: C++

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

int main()
{
     vector <int> v( 55 555,0),p;
    int c=0,i,j,len=v.size();

    v[0]=1;
    v[1]=1;


    for(i=4;i<len;i=i+2)
        v[i]=1;

    for(i=3;i*i<len;i=i+2)
    {
        if(v[i]==0)
        {
        for(j=i*i;j<len;j=j+2*i)

            v[j]=1;
        }
    }

    for(i=0;i<len;i++)
    {
        if(v[i]==0)
        {
            c++;
            p.push_back(i);
            //printf("%d\n",i);

        }


    }
    
    int num;
    scanf("%d",&num);
    
    if(num&1)
    {
        
        for(i=0;i<num;i++)
            printf("%d ",p[i]);
        
    }
    
    else
    {
        for(i=1;i<=num;i++)
            printf("%d ",p[i]);
        
    }
    
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:6: error: 'vector' was not declared in this scope
    6 |      vector <int> v( 55 555,0),p;
      |      ^~~~~~
a.cc:6:14: error: expected primary-expression before 'int'
    6 |      vector <int> v( 55 555,0),p;
      |              ^~~
a.cc:7:21: error: 'v' was not declared in this scope
    7 |     int c=0,i,j,len=v.size();
      |                     ^
a.cc:31:13: error: 'p' was not declared in this scope
   31 |             p.push_back(i);
      |             ^
a.cc:40:5: error: 'scanf' was not declared in this scope
   40 |     scanf("%d",&num);
      |     ^~~~~
a.cc:46:26: error: 'p' was not declared in this scope
   46 |             printf("%d ",p[i]);
      |                          ^
a.cc:46:13: error: 'printf' was not declared in this scope
   46 |             printf("%d ",p[i]);
      |             ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include <bits/stdc++.h>
a.cc:53:26: error: 'p' was not declared in this scope
   53 |             printf("%d ",p[i]);
      |                          ^
a.cc:53:13: error: 'printf' was not declared in this scope
   53 |             printf("%d ",p[i]);
      |             ^~~~~~
a.cc:53:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java

import java.util.*;


public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] arr = new arr[n];
    arr[0]=2;
      arr[1]=3;
        arr[2]=5;
          arr[3]=7;
            arr[4]=11;
for(int i=5;i<n;i++){
outer:for(int num=arr[i-1]+2;num<55555;num++){
//  boolean prime=true;
  for(int root=2;root<(int)Math.pow(num,0.5);root++){
    if(num%root==0){
      //prime=false;
      continue outer;
    }
  }
  for(int A=0;A<n;A++){
    for(int B=A+1;B<n;B++){
      for(int C=B+1;C<n;C++){
        for(int D=C+1;D<n;D++){
          for(int E=D+1;E<n;E++){
            for(int root=2;root<(int)Math.pow(arr[A]+arr[B]+arr[C]+arr[D]+arr[E],0.5);root++){
              if(arr[A]+arr[B]+arr[C]+arr[D]+arr[E]%root!=0){
                //prime=false;
                continue outer;
              }
            }
          }
        }
      }
    }
  }
  arr[i]=num;
  break;
}
}
  for(int i=0;i<n;i++){
    System.out.print(arr[i]);
    if(i!=n-1)
    System.out.print(" ");
  }

  }
}


Compiler output:
Main.java:8: error: cannot find symbol
    int[] arr = new arr[n];
                    ^
  symbol:   class arr
  location: class Main
1 error
Language: C++

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

int N;
int sosu_t[55556] = {0};
vector<int> sosu;

main()
{

Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:2: error: expected '}' at end of input
    9 | {
      | ~^
Language: Java

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Iterator;
import java.util.Collections;
import java.util.Comparator;
import java.util.Random;
import java.util.Map;
import java.util.HashMap;

class Main{
        public static void main(String args[]){
                Scanner sc = new Scanner(System.in);
                int N = sc.nextInt();
                
                System.out.print("2 ");
                int pre = 1;
                int num;
                boolean cd = true;
                for(int i=1; i<N; i++){
                        for(int j=pre+2;;j +=2){
                                num = j;
                                for(int k=j;ch;k--){
                                        if(num % k==0){
                                                ch = false;
                                                break;
                                        }
                                }
                                if(ch){
                                        pre = j;
                                        break;
                                }
                        }
                        System.out.print(pre+" ");
                }
        }
}



Compiler output:
Main.java:24: error: cannot find symbol
                                for(int k=j;ch;k--){
                                            ^
  symbol:   variable ch
  location: class Main
Main.java:26: error: cannot find symbol
                                                ch = false;
                                                ^
  symbol:   variable ch
  location: class Main
Main.java:30: error: cannot find symbol
                                if(ch){
                                   ^
  symbol:   variable ch
  location: class Main
3 errors
Language: C++

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

int a[100001];
int main(){
	int n;
	scanf("%d",&b[i]);
	for(int i=1;i<=n;++i){
		scanf("%d",&b[i]);
	}
	sort(b+1,b+n+1);
	if(b[n]/2>b[n-1]){
		printf("%d %d\n",b[n],b[n-1]);
		return 0;
	}
	if(b[n]/2<b[1]){
		printf("%d %d\n",b[n],b[1]);
		return 0;
	}
	int x1=lower_bound(b+1,b+n+1,b[n]/2)-b;
	int x2=x1-1; 
	if(b[n]%2==0){
		if(b[x1]-b[n]/2>b[n]/2-b[x2])
			printf("%d %d\n"b[n],b[x2]]);
		else
			printf("%d %d\n",b[n],b[x1]);
	}
	else{
		int x3=max(0,b[x1]-b[n]/2-1);
		int x4=b[n/2]-b[x2];
		if(x3>x4)
			printf("%d %d\n",b[n],b[x2]);
		else
			printf("%d %d\n",b[n],b[x1]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'b' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                     ^
a.cc:9:23: error: 'i' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                       ^
a.cc:26:32: error: unable to find string literal operator 'operator""b' with 'const char [7]', 'long unsigned int' arguments
   26 |                         printf("%d %d\n"b[n],b[x2]]);
      |                                ^~~~~~~~~~
Language: C++

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

using namespace std;
using ll = long long;

int main(int argc, char const* argv[]) {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    cout << 2;
    --N;
    for (int i=3;; i+=2) {
        bool flg = true;
        for (int j=5; j<i; j+=6 {
            if (i % j == 0) {
                flg = false;
                break;
            }
        }
        if (flg) {
            cout << " " << i;
            --N;
            if (N <= 0) {
                cout << endl;
                return 0;
            }
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:17:32: error: expected ')' before '{' token
   17 |         for (int j=5; j<i; j+=6 {
      |             ~                  ^~
      |                                )
Language: C++

#include<iostream>
using namespace std;
int main(void){
	int,n,a[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421};
	cin >> n;
	for(int i = 0; i < n; i++){
		cout << a[i] <<" ";
	}
	cout << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: expected unqualified-id before ',' token
    4 |         int,n,a[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421};
      |            ^
Language: C++

#include <cstdio>
#include <iostream>
#include <cstring>
#include <math.h>
#include <bits/stdc++.h>
using namespace std;
int a[55556];
int b[]={7, 17, 37, 47, 67, 97, 107, 127, 137, 157, 167, 197, 227, 257, 277, 307, 317, 337, 347, 367, 397, 457, 467, 487, 547, 557, 577, 587, 607, 617, 647, 677, 727, 757, 787, 797, 827, 857, 877, 887, 907, 937, 947, 967, 977, 997, 1087, 1097, 1117, 1187, 1217, 1237, 1277, 1297, 1307, 1327, 1367, 1427, 1447, 1487, 1567, 1597, 1607, 1627, 1637, 1657, 1667, 1697, 1747, 1777, 1787, 1847, 1867, 1877, 1907, 1987, 1997
}
bool isP(int x)
{
    for(int i = 2 ; i <= sqrt(x) ;i++)
    {
        if(x%i == 0)return false;
    }
    return true;
}
void init()
{
    memset(a,0,sizeof(a));
    for(int i = 2 ; i <= 55556 ;i++)
    {
        if(isP(i))a[i] = 1;
    }
}
int main()
{
    init();
    int n;
    cin>>n;
       int sum = 0;
        int tag = 0;
        int i ;
        cout<<"7";
        int f = 0;
        while(1)
        {
            if(b[i])
            {
                tag++;
                i++;
                cout<<" "<<b[i];
            }
            if(tag == (n-1))break;
        }
        cout<<endl;

    return 0;
}


Compiler output:
a.cc:10:1: error: expected ',' or ';' before 'bool'
   10 | bool isP(int x)
      | ^~~~
a.cc: In function 'void init()':
a.cc:23:12: error: 'isP' was not declared in this scope
   23 |         if(isP(i))a[i] = 1;
      |            ^~~
Language: C++

#include,<iostream>
using,namespace,std;
int,main(void){
	int,n,a[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421};
	cin >> n;
	for(int i = 0; i < n; i++){
		cout << a[i] <<" ";
	}
	cout << "\n";
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include,<iostream>
      |         ^
a.cc:2:6: error: expected nested-name-specifier before ',' token
    2 | using,namespace,std;
      |      ^
a.cc:3:4: error: expected unqualified-id before ',' token
    3 | int,main(void){
      |    ^
a.cc:3:15: error: a function-definition is not allowed here before '{' token
    3 | int,main(void){
      |               ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <string>
#include <queue>
#include <bitset>

#define MY_SIZE_MAX 100001
#define MY_VALUE_MAX 100001

using namespace std;

void GetPrimeList( vector<int>& out, int target )
{
	if( MY_SIZE_MAX <= target ){ return; }
	bitset<MY_SIZE_MAX> check(0);
	const int nMax = static_cast< int >( sqrt( target ) ) + 1;
	for( int n = 2; n <= nMax; ++n )
	{
		if( check[n] ){ continue; }
		check[n] = true;
		out.push_back( n );
		for( int m = n * 2; m <= target; m += n )
		{
			check[m] = true;
		}
	}
}


int main()
{
	vector<int> prime;
	GetPrimeList( prime, 55555 );

	int n;
	cin >> n;

	for( int m = 0; m < n; ++m )
	{
		if( m != 0 ){ cout << " "; }
		cout << prime[m];
	}
	return 0;
}

Compiler output:
a.cc: In function 'void GetPrimeList(std::vector<int>&, int)':
a.cc:18:46: error: 'sqrt' was not declared in this scope
   18 |         const int nMax = static_cast< int >( sqrt( target ) ) + 1;
      |                                              ^~~~
Language: C++

#include,<iostream>
using,namespace,std;
int,main(void){
	int,n,a[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,}
	cin >> n;
	for(int i = 0; i < n; i++){
		cout << a[i] <<" ";
	}
	cout << "\n";
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include,<iostream>
      |         ^
a.cc:2:6: error: expected nested-name-specifier before ',' token
    2 | using,namespace,std;
      |      ^
a.cc:3:4: error: expected unqualified-id before ',' token
    3 | int,main(void){
      |    ^
a.cc:3:15: error: a function-definition is not allowed here before '{' token
    3 | int,main(void){
      |               ^
Language: C++

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

int a[100001];
int main(){
	int n;
	scanf("%d",&b[i]);
	for(int i=1;i<=n;++i){
		scanf("%d",&b[i]);
	}
	sort(b+1,b+n+1);
	if(b[n]/2>b[n-1]){
		printf("%d %d\n",b[n],b[n-1]);
		return 0;
	}
	if(b[n]/2<b[1]){
		printf("%d %d\n",b[n],b[1]);
		return 0;
	}
	int x1=lower_bound(b+1,b+n+1,b[n]/2)-b;
	int x2=x1-1
	if(b[n]%2==0){
		if(b[x1]-b[n]/2>b[n]/2-b[x2])
			printf("%d %d\n"b[n],b[x2]]);
		else
			printf("%d %d\n",b[n],b[x1]);
	}
	else{
		int x3=max(0,b[x1]-b[n]/2-1);
		int x4=b[n/2]-b[x2];
		if(x3>x4)
			printf("%d %d\n",b[n],b[x2]);
		else
			printf("%d %d\n",b[n],b[x1]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'b' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                     ^
a.cc:9:23: error: 'i' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                       ^
a.cc:24:9: error: expected ',' or ';' before 'if'
   24 |         if(b[n]%2==0){
      |         ^~
a.cc:30:9: error: 'else' without a previous 'if'
   30 |         else{
      |         ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <string>
#include <queue>
#include <bitset>

#define MY_SIZE_MAX 100001
#define MY_VALUE_MAX 100001

using namespace std;

void GetPrimeList( vector<int>& out, int target )
{
	if( MY_SIZE_MAX <= target ){ return; }
	bitset<MY_SIZE_MAX> check(0);
	for( int n = 2; n <= sqrt( target ); ++n )
	{
		if( check[n] ){ continue; }
		check[n] = true;
		out.push_back( n );
		for( int m = n * 2; m <= target; m += n )
		{
			check[m] = true;
		}
	}
}


int main()
{
	vector<int> prime;
	GetPrimeList( prime, 55555 );

	int n;
	cin >> n;

	for( int m = 0; m < n; ++m )
	{
		if( m != 0 ){ cout << " "; }
		cout << prime[m];
	}
	return 0;
}

Compiler output:
a.cc: In function 'void GetPrimeList(std::vector<int>&, int)':
a.cc:18:30: error: 'sqrt' was not declared in this scope
   18 |         for( int n = 2; n <= sqrt( target ); ++n )
      |                              ^~~~
Language: C++

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

int a[100001];
int main(){
	int n;
	scanf("%d",&b[i]);
	for(int i=1;i<=n;++i){
		scanf("%d",&b[i]);
	}
	sort(b+1,b+n+1);
	if(b[n]/2>b[n-1]){
		printf("%d %d\n",b[n],b[n-1]);
		return 0;
	}
	if(b[n]/2<b[1]){
		printf("%d %d\n",b[n],b[1]);
		return 0;
	}
	int x1=lower_bound(b+1,b+n+1,b[n]/2)-b;
	int x2=x1-1
	if(b[n]%2==0){
		if(b[x1]-b[n]/2>b[n]/2-b[x2])
			printf("%d %d\n"b[n],b[x2]]);
		else
			printf("%d %d\n",b[n],b[x1]);
	}else{
		int x3=max(0,b[x1]-b[n]/2-1);
		int x4=b[n/2]-b[x2];
		if(x3>x4)
			printf("%d %d\n",b[n],b[x2]);
		else printf("%d %d\n",b[n],b[x1]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'b' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                     ^
a.cc:9:23: error: 'i' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                       ^
a.cc:24:9: error: expected ',' or ';' before 'if'
   24 |         if(b[n]%2==0){
      |         ^~
a.cc:29:10: error: 'else' without a previous 'if'
   29 |         }else{
      |          ^~~~
Language: C++

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

int a[100001];
int main(){
	int n;
	scanf("%d",&b[i]);
	for(int i=1;i<=n;++i){
		scanf("%d",&b[i]);
	}
	sort(b+1,b+n+1);
	if(b[n]/2>b[n-1]){
		printf("%d %d\n",b[n],b[n-1]);
		return 0;
	}
	if(b[n]/2<b[1]){
		printf("%d %d\n",b[n],b[1]);
		return 0;
	}
	int x1=lower_bound(b+1,b+n+1,b[n]/2)-b;
	int x2=x1-1
	if(b[n]%2==0){
		if(b[x1]-b[n]/2>b[n]/2-b[x2])
			printf("%d %d\n"b[n],b[x2]]);
		else
			printf("%d %d\n",b[n],b[x1]);
	}else{
		int x3=max(0,b[x1]-b[n]/2-1),x4=b[n/2]-b[x2];
		if(x3>x4)
			printf("%d %d\n",b[n],b[x2]);
		else printf("%d %d\n",b[n],b[x1]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'b' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                     ^
a.cc:9:23: error: 'i' was not declared in this scope
    9 |         scanf("%d",&b[i]);
      |                       ^
a.cc:24:9: error: expected ',' or ';' before 'if'
   24 |         if(b[n]%2==0){
      |         ^~
a.cc:29:10: error: 'else' without a previous 'if'
   29 |         }else{
      |          ^~~~
a.cc:31:23: error: 'x4' was not declared in this scope; did you mean 'x3'?
   31 |                 if(x3>x4)
      |                       ^~
      |                       x3
Language: C++

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

#define MAX_NUM 55555
char isprime[MAX_NUM];

int main(void){
    memset(isprime,1,MAX_NUM);
    isprime[0] = isprime[1] = 0;
    
    int N;
    scanf("%d",&N);
    int cnt = 0;
    for(int i = 0; i < MAX_NUM; i++){
        if(isprime[i]){
            for(int j = 2; j < MAX_NUM / i; j++){
                isprime[j*i] = 0;
            }
            if(i%10==1){
                cnt++;
                printf("%d ",i);
            }
            if(cnt == N){
                puts("");
                return 0;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'memset' was not declared in this scope
    8 |     memset(isprime,1,MAX_NUM);
      |     ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdlib.h>
  +++ |+#include <cstring>
    3 |
Language: C++

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

int a[100001];
int main(){
	int n;
	scanf("%d",%b[i]);
	for(int i=1;i<=n;++i){
		scanf("%d",&b[i]);
	}
	sort(b+1,b+n+1);
	if(b[n]/2>b[n-1]){
		printf("%d %d\n",b[n],b[n-1]);
		return 0;
	}
	if(b[n]/2<b[1]){
		printf("%d %d\n",b[n],b[1]);
		return 0;
	}
	int x1=lower_bound(b+1,b+n+1,b[n]/2)-b;
	int x2=x1-1
	if(b[n]%2==0){
		if(b[x1]-b[n]/2>b[n]/2-b[x2])
			printf("%d %d\n"b[n],b[x2]]);
		else
			printf("%d %d\n",b[n],b[x1]);
	}else{
		int x3=max(0,b[x1]-b[n]/2-1),x4=b[n/2]-b[x2];
		if(x3>x4)
			printf("%d %d\n",b[n],b[x2]);
		else printf("%d %d\n",b[n],b[x1]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected primary-expression before '%' token
    9 |         scanf("%d",%b[i]);
      |                    ^
a.cc:9:21: error: 'b' was not declared in this scope
    9 |         scanf("%d",%b[i]);
      |                     ^
a.cc:9:23: error: 'i' was not declared in this scope
    9 |         scanf("%d",%b[i]);
      |                       ^
a.cc:24:9: error: expected ',' or ';' before 'if'
   24 |         if(b[n]%2==0){
      |         ^~
a.cc:29:10: error: 'else' without a previous 'if'
   29 |         }else{
      |          ^~~~
a.cc:31:23: error: 'x4' was not declared in this scope; did you mean 'x3'?
   31 |                 if(x3>x4)
      |                       ^~
      |                       x3
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int arr[55555];
vector<int> pr;

void prime(int n){
	for(int i = 0; i < n; i++){
		arr[i] = 1;
	}
	for(int i = 2; i < sqrt(n); i++){
		if(arr[i]){
			for(int j = 0; i * (j + 2) < n; j++){
				arr[i *(j + 2)] = 0;
			}
		}
	}

	for(int i = 2; i < n; i++){
		if(arr[i]){
			pr.push_back(i);
		}
	}
}

int main(void){
	int i,n;
	cin>>n;
	prime(55555);
	if(n%2==1){
		cout<<pr[0];
		for(i=1;i<n;i++){
			cout<<" "<<pr[i];
		}
		cout<<endl;
	}
	else{
		cout<<pr[1];
		for(i=2;i<=n;i++){
			cout<<" "<<pr[i];
		}
		cout<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'void prime(int)':
a.cc:11:28: error: 'sqrt' was not declared in this scope
   11 |         for(int i = 2; i < sqrt(n); i++){
      |                            ^~~~
Language: C++

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

int main() {
	int n;
	cin >> n;
	vector<int> prime(54);
	prime.at( 0 ) =  3 ;
prime.at( 1 ) =  5 ;
prime.at( 2 ) =  7 ;
prime.at( 3 ) =  11 ;
prime.at( 4 ) =  13 ;
prime.at( 5 ) =  17 ;
prime.at( 6 ) =  19 ;
prime.at( 7 ) =  23 ;
prime.at( 8 ) =  29 ;
prime.at( 9 ) =  31 ;
prime.at( 10 ) =  37 ;
prime.at( 11 ) =  41 ;
prime.at( 12 ) =  43 ;
prime.at( 13 ) =  47 ;
prime.at( 14 ) =  53 ;
prime.at( 15 ) =  59 ;
prime.at( 16 ) =  61 ;
prime.at( 17 ) =  67 ;
prime.at( 18 ) =  71 ;
prime.at( 19 ) =  73 ;
prime.at( 20 ) =  79 ;
prime.at( 21 ) =  83 ;
prime.at( 22 ) =  89 ;
prime.at( 23 ) =  97 ;
prime.at( 24 ) =  101 ;
prime.at( 25 ) =  103 ;
prime.at( 26 ) =  107 ;
prime.at( 27 ) =  109 ;
prime.at( 28 ) =  113 ;
prime.at( 29 ) =  127 ;
prime.at( 30 ) =  131 ;
prime.at( 31 ) =  137 ;
prime.at( 32 ) =  139 ;
prime.at( 33 ) =  149 ;
prime.at( 34 ) =  151 ;
prime.at( 35 ) =  157 ;
prime.at( 36 ) =  163 ;
prime.at( 37 ) =  167 ;
prime.at( 38 ) =  173 ;
prime.at( 39 ) =  179 ;
prime.at( 40 ) =  181 ;
prime.at( 41 ) =  191 ;
prime.at( 42 ) =  193 ;
prime.at( 43 ) =  197 ;
prime.at( 44 ) =  199 ;
prime.at( 45 ) =  211 ;
prime.at( 46 ) =  223 ;
prime.at( 47 ) =  227 ;
prime.at( 48 ) =  229 ;
prime.at( 49 ) =  233 ;
prime.at( 50 ) =  239 ;
prime.at( 51 ) =  241 ;
prime.at( 52 ) =  251 ;
prime.at( 53 ) =  257 ;
prime.at( 54 ) =  263 ;
	if(n % 2 == 0){
		for (int i = 0; i < n ; ++i){
			cout << prime[i];
		}	
		cout << endl;
		return 0;
	}else{
		cout << 2;
		for (int i = 0; i < n - 1 ; ++i){
			cout << prime.at[i];
		}	
		cout << endl;
		return 0;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:73:41: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   73 |                         cout << prime.at[i];
      |                                         ^
Language: C++

/***************************************************************
     File Name: D.cpp
     Created Time: 六  5/ 5 21:06:56 2018
 **************************************************************/
#define MEM0(x) memset(x,0,sizeof(x))
#define MEM1(x) memset(x,-1,sizeof(x))
#define MEMX(x) memset(x,0x3f,sizeof(x))
#include <iostream>

using namespace std;
const int MAXN = 500;
bool flag[MAXN];
int primes[MAXN / 3], pi;
void GetPrime_1() {
  int i, j;
  pi = 0;
  memset(flag, false, sizeof(flag));
  for (i = 2; i < MAXN; i++)
    if (!flag[i])
    {
      primes[pi++] = i;
      for (j = i; j < MAXN; j += i)
        flag[j] = true;
    }
}
int main() {
  GetPrime_1();
  // cout << pi << endl;
  // for (int i = 1; i < pi; ++i) cout << primes[i] << ' ';
  // cout << endl;
  int n;
  while (cin >> n) {
    for (int i = 1; i <= n; ++i) cout << primes[i] << ' ';
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'void GetPrime_1()':
a.cc:17:3: error: 'memset' was not declared in this scope
   17 |   memset(flag, false, sizeof(flag));
      |   ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <iostream>
  +++ |+#include <cstring>
    9 |
Language: C++

#include<stdio.h>

int n,a[56];
bool prime(int x){
	for(int i=2;i*i<=x;++i){
		if(x%i==0)return 0;
	}
	return 1;
}

int main(){
	scanf("%d",&n);
	a[0]=1;
	for(int i=1;i<=n;++i)a[i]=a[i-1]+2;
	while(1){
		for(int i=1;i<=n;++i){
			while(!prime(a[i])){
				a[i]+=2;
			}
		}int ans=0;
		for(int i=1;i<=n;++i)ans+=a[i];
		if(!prime(ans))a[i]+=2;
		else return printf("%d\n",ans),0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:34: error: 'i' was not declared in this scope
   22 |                 if(!prime(ans))a[i]+=2;
      |                                  ^
Language: C++

     for(int j = 0; i * (j + 2) < N; j++){
	arr[i *(j + 2)] = 0;
      }
    }
  }

  for(int i = 2; i < N; i++){
    if(arr[i]){
      // cout << i << endl;
    }
  }
}


int main(void){

  int N;
  cin >> N;
  Eratosthenes(55555);

  int cnt = 0;
  int i = 2;
  while(N > cnt){
    if(i != 2 and arr[i]) cout << " ";
    if(arr[i]){
      cout << i;
      cnt++;
    }
    i++;
  }
  cout << endl;

  return 0;
}


Compiler output:
a.cc:1:6: error: expected unqualified-id before 'for'
    1 |      for(int j = 0; i * (j + 2) < N; j++){
      |      ^~~
a.cc:1:21: error: 'i' does not name a type
    1 |      for(int j = 0; i * (j + 2) < N; j++){
      |                     ^
a.cc:1:38: error: 'j' does not name a type
    1 |      for(int j = 0; i * (j + 2) < N; j++){
      |                                      ^
a.cc:4:5: error: expected declaration before '}' token
    4 |     }
      |     ^
a.cc:5:3: error: expected declaration before '}' token
    5 |   }
      |   ^
a.cc:7:3: error: expected unqualified-id before 'for'
    7 |   for(int i = 2; i < N; i++){
      |   ^~~
a.cc:7:18: error: 'i' does not name a type
    7 |   for(int i = 2; i < N; i++){
      |                  ^
a.cc:7:25: error: 'i' does not name a type
    7 |   for(int i = 2; i < N; i++){
      |                         ^
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
a.cc: In function 'int main()':
a.cc:18:3: error: 'cin' was not declared in this scope
   18 |   cin >> N;
      |   ^~~
a.cc:19:3: error: 'Eratosthenes' was not declared in this scope
   19 |   Eratosthenes(55555);
      |   ^~~~~~~~~~~~
a.cc:24:19: error: 'arr' was not declared in this scope
   24 |     if(i != 2 and arr[i]) cout << " ";
      |                   ^~~
a.cc:24:27: error: 'cout' was not declared in this scope
   24 |     if(i != 2 and arr[i]) cout << " ";
      |                           ^~~~
a.cc:25:8: error: 'arr' was not declared in this scope
   25 |     if(arr[i]){
      |        ^~~
a.cc:26:7: error: 'cout' was not declared in this scope
   26 |       cout << i;
      |       ^~~~
a.cc:31:3: error: 'cout' was not declared in this scope
   31 |   cout << endl;
      |   ^~~~
a.cc:31:11: error: 'endl' was not declared in this scope
   31 |   cout << endl;
      |           ^~~~
Language: C++

#include<stdio.h>

int n,a[56];
bool prime(int x){
	for(int i=2;i*i<=x;++i){
		if(x%i==0)return 0;
	}
	return 1;
}

int main(){
	scanf("%d",&n);
	for(int i=1,a[0]=1;i<=n;++i)a[i]=a[i-1]+2;
	while(1){
		for(int i=1;i<=n;++i){
			while(!prime(a[i])){
				a[i]+=2;
			}
		}int ans=0;
		for(int i=1;i<=n;++i)ans+=a[i];
		if(!prime(ans))a[i]+=2;
		else return printf("%d\n",ans),0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: array must be initialized with a brace-enclosed initializer
   13 |         for(int i=1,a[0]=1;i<=n;++i)a[i]=a[i-1]+2;
      |                          ^
a.cc:21:34: error: 'i' was not declared in this scope
   21 |                 if(!prime(ans))a[i]+=2;
      |                                  ^
Language: C++

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

typedef long long LL;
typedef pair<int,int> pii;
typedef vector<int> vi;

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

bool isPrime[55560];
int res[5];
vi primes;
vi valid;
void sieve(){
    memset(isPrime,1,sizeof(isPrime));
    memset(res,0,sizeof(res));
    isPrime[0]=isPrime[1]=0;
    for (int i=2;i<55556;i++){
        if (isPrime[i]){
            for (int j=2*i;j<55556;j+=i){
                isPrime[j] = 0;
            }
            primes.push_back(i);
            res[i%5]++;
            if (i%5==4) valid.push_back(i);
        }
    }
}
int main(){
    sieve();
    // FOR(i,0,5) cout<<res[i]<<' ';
    // puts("");
    int N;
    cin>>N;
    FOR(i,0,N) cout<<valid[i]<<(i==N-1 ? '\n' : ' ');
    return 0;
}

Compiler output:
a.cc: In function 'void sieve()':
a.cc:17:5: error: 'memset' was not declared in this scope
   17 |     memset(isPrime,1,sizeof(isPrime));
      |     ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <vector>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

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

int main() {
	int n;
	vector<int> prime(54) = [3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 , 43 , 47 , 53 , 59 , 61 , 67 , 71 , 73 , 79 , 83 , 89 , 97 , 101 , 103 , 107 , 109 , 113 , 127 , 131 , 137 , 139 , 149 , 151 , 157 , 163 , 167 , 173 , 179 , 181 , 191 , 193 , 197 , 199 , 211 , 223 , 227 , 229 , 233 , 239 , 241 , 251 , 257];
	cin >> n;
	if(n % 2 == 0){
		for (int i = 0; i < n ; ++i){
			cout << prime.at(i);
		}	
		cout << endl;
		return 0;
	}else{
		cout << 2;
		for (int i = 0; i < n - 1 ; ++i){
			cout << prime.at(i);
		}	
		cout << endl;
		return 0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:31: error: expected ',' or ';' before '=' token
    7 |         vector<int> prime(54) = [3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 , 43 , 47 , 53 , 59 , 61 , 67 , 71 , 73 , 79 , 83 , 89 , 97 , 101 , 103 , 107 , 109 , 113 , 127 , 131 , 137 , 139 , 149 , 151 , 157 , 163 , 167 , 173 , 179 , 181 , 191 , 193 , 197 , 199 , 211 , 223 , 227 , 229 , 233 , 239 , 241 , 251 , 257];
      |                               ^
Language: C++

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

int main() {
	int ;
	vector<int> prime(54) = [3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 , 43 , 47 , 53 , 59 , 61 , 67 , 71 , 73 , 79 , 83 , 89 , 97 , 101 , 103 , 107 , 109 , 113 , 127 , 131 , 137 , 139 , 149 , 151 , 157 , 163 , 167 , 173 , 179 , 181 , 191 , 193 , 197 , 199 , 211 , 223 , 227 , 229 , 233 , 239 , 241 , 251 , 257]
	cin >> n;
	if (n % 2 == 0){
		for (int i = 0; i < n ; ++i){
			cout << prime.at(i);
		}	
		cout << endl;
		return 0;
	}else{
		cout << 2;
		for (int i = 0; i < n - 1 ; ++i){
			cout << prime.at(i);
		}	
		cout << endl;
		return 0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: declaration does not declare anything [-fpermissive]
    6 |         int ;
      |         ^~~
a.cc:7:31: error: expected ',' or ';' before '=' token
    7 |         vector<int> prime(54) = [3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 , 43 , 47 , 53 , 59 , 61 , 67 , 71 , 73 , 79 , 83 , 89 , 97 , 101 , 103 , 107 , 109 , 113 , 127 , 131 , 137 , 139 , 149 , 151 , 157 , 163 , 167 , 173 , 179 , 181 , 191 , 193 , 197 , 199 , 211 , 223 , 227 , 229 , 233 , 239 , 241 , 251 , 257]
      |                               ^
a.cc:9:13: error: 'n' was not declared in this scope
    9 |         if (n % 2 == 0){
      |             ^
Language: C++

//
//  main.cpp
//  FiveFiveEverywhere
//
//  Created by XsC on 2018/5/5.
//  Copyright © 2018年 夏思聪. All rights reserved.
//

#include <iostream>
#include "vector"

const int maxn=55565;

int n;
int num[maxn];
int seq[60];
std::vector<int> prime;

bool isPrime(int n){
    for(int i=2;i<n/2;i++){
        if(n%i==0)
            return false;
    }
    return true;
}

void init(){
    memset(num, 0, sizeof(num));
    num[2]=1;
    prime.emplace_back(2);
    for(int i=3;i<maxn;i++)
        if(isPrime(i)){
            num[i]=1;
            prime.emplace_back(i);
        }
}

int main(int argc, const char * argv[]) {
    scanf("%d",&n);
    if(n==5)
        printf("3 5 7 11 31");
    else if(n==6)
        printf("2 3 5 7 11 13");
    else if(n==7)
        printf("2 5 7 13 19 37");
    else if(n==8)
        printf("2 5 7 13 19 37 67 79");
    else{
        init();
        int i=prime.size()-1;
        for(int j=0;j<n;j++){
            seq[j]=prime[i--];
        }
        printf("%d",seq[0]);
        for(int j=1;j<n;j++){
            printf(" %d",seq[j]);
        }
        printf("\n");
    }
    return 0;
}


Compiler output:
a.cc: In function 'void init()':
a.cc:28:5: error: 'memset' was not declared in this scope
   28 |     memset(num, 0, sizeof(num));
      |     ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   10 | #include "vector"
  +++ |+#include <cstring>
   11 |
Language: C++

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

int main() {
	int ;
	vector<int> prime(54) = [3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 , 43 , 47 , 53 , 59 , 61 , 67 , 71 , 73 , 79 , 83 , 89 , 97 , 101 , 103 , 107 , 109 , 113 , 127 , 131 , 137 , 139 , 149 , 151 , 157 , 163 , 167 , 173 , 179 , 181 , 191 , 193 , 197 , 199 , 211 , 223 , 227 , 229 , 233 , 239 , 241 , 251 , 257]
	cin >> n;
	if (n % 2 == 0){
		for (int i = 0; i < n ; ++i){
			cout << prime.at(i);
		}	
		cout << endl;
		return 0;
	}else{
		cout << 2;
		for (int i = 0; i < n - 1 ; ++i){
			cout << prime.at(i);
		}	
		cout << endl;
		return 0;
	}
}

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

include <bits / stdc++.h>
using namespace std;
#define loop(i,b,e) for(int i=b;i<=e;i++)
#define loop2(i,e,b) for(int i=e;i>=b;i--)
#define io ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define fi first
#define se second
typedef long long ll;
typedef unsigned long long ull;
const int N = 1e6 + 5;
const ll mod = 1e9 + 7;
const int oo = 1e9;

bool prime[N];
int n;

void generateprime(int n) {
	int i;
	for (i = 0; i <= n; i++)
		prime[i] = true;
	for (i = 2; i*i <= n; i++)
		if (prime[i] == true)
			for (int j = i; i*j <= n; j++)
				prime[i*j] = false;
}

int main() {
	generateprime(1000000);
	scanf("%d", &n);
	int cnt = 0;
	loop(i, 11, 1000000) {
		if (cnt >= n) break;
		if (prime[i]) {
			printf("%d ", i);
			cnt++;
		}
	}
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits / stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:29:9: error: 'scanf' was not declared in this scope
   29 |         scanf("%d", &n);
      |         ^~~~~
a.cc:34:25: error: 'printf' was not declared in this scope
   34 |                         printf("%d ", i);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include <bits / stdc++.h>
Language: C++

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

using namespace std;

bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }

    return true;
}

int main() {
    int N;
    cin >> N;
    vector<int> s(N);
    int bc = 0;
    int n = 0;
    for (int j=2; n < N; j++) {
        if (IsPrime(j)) {
            if (bc%2==0){
                s[n] = j;
                n++;
            }
            bc++;
        }
    }
    for (int j=0; j < N; j++) {
        if (j==N-1) {
            cout << s[j] << endl;
        } else {
            cout << s[j] << " ";
        }
    }
}

Compiler output:
a.cc: In function 'bool IsPrime(int)':
a.cc:13:22: error: 'sqrt' was not declared in this scope
   13 |     double sqrtNum = sqrt(num);
      |                      ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

const int MOD=1e9+7;
const double PI=3.14159265359;


vector<int> getPrimes(int stop){
    int sieveStop=ceil(sqrt(stop));
    vector<int> psj;
    for(int i=2; i<=sieveStop; i++){
        bool isP=true;
        for(int j=2; j<i && isP; j++){
            isP=i%j;
        }
        if(isP) psj.push_back(i);
    }
    
    vector<bool> primesb(stop+1,true);
    for(int j:psj){
        for(int i=2; i*j<=stop; i++){
            primesb[i*j]=false;
        }
    }
    vector<int> ans;
    for(int i=2; i<=stop; i++){
        if(primesb[i]) ans.push_back(i);
    }
    return ans;
}

int main(){
    
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    
    auto pv=getPrimes(55555);
    //auto pvo=getPrimes(1000000);
    int n;
    cin>>n;
    
    //vector<int> cands(pv.begin()+1000, pv.end());
    //cout<<pv.size();
    int st=3500
    for(int i=st; i<st+n; i++){
        cout<<pv[i]<<" ";
    }
    
    return 0;
    
    
}


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

#include<iostream>
#define rep(i,j,n) for(int i=j;i<n;i++)
int sosuu[100]={11,31,41,61,71,101,131,151,181,191,211,241,251,271,281,311,331,401,421,431,461,491,521,541,571,601,631,641,661,691,701,751,761,811,821,881,911,941,971,991,1021,1031,1051,1061,1091,1151,1171,1181,1201,1231,1291,1301,1321,1361,1381};
int main(){ int n;cin>>n;rep(i,0,n){cout<<sosuu[i]<<" "; }cout<<endl;return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:19: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | int main(){ int n;cin>>n;rep(i,0,n){cout<<sosuu[i]<<" "; }cout<<endl;return 0;}
      |                   ^~~
      |                   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:37: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 | int main(){ int n;cin>>n;rep(i,0,n){cout<<sosuu[i]<<" "; }cout<<endl;return 0;}
      |                                     ^~~~
      |                                     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:4:59: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 | int main(){ int n;cin>>n;rep(i,0,n){cout<<sosuu[i]<<" "; }cout<<endl;return 0;}
      |                                                           ^~~~
      |                                                           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:4:65: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    4 | int main(){ int n;cin>>n;rep(i,0,n){cout<<sosuu[i]<<" "; }cout<<endl;return 0;}
      |                                                                 ^~~~
      |                                                                 std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++



#include <cstdio>
bool prime[60000];

int main(int argc, const char * argv[]) {
   
    
    int n;
    int cnt = 0;
    
    for(int i=2;i<=55555;i++){
        for(int j=i+i;j<=55555;j+=i){
            if(!prime[j]) prime[j] = true;
        }
    }
    
    scanf("%d",&n);
    
   // int ans = 0;
    for(int i=2;i<=55555;i++){
        if(!prime[i] && i%10 == 1){
           printf("%d ",i);
            cnt++;
            ans += i;
        }
        if(cnt==n) break;
    }
    
    //printf("\n%d",ans);
    
  
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:25:13: error: 'ans' was not declared in this scope
   25 |             ans += i;
      |             ^~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int primes[5000],tot;
bool p[5000];
int prime(){
	for(int i=2;i<=5000;i++){
		if(!p[i]) 
			primes[tot++]=i;
		for(int j=0;j<tot&&i*primes[j]<=5000;j++){
			p[i*primes[j]]=true;
			if(i%primes[j]==0) break;
		}
	}
}
int main()
{
	prime();
	int n;
	cin>>n;
	int arr[100],cnt=0;
	for(int i=0;i<n-1;i++){
		arr[cnt++]=primes[i];
		sum+=primes[i];
	}
	for(int i=n;i<tot;i++){
		if(!p[sum+primes[i]]){
		 arr[cnt++]=primes[i];
		 break;
		}
	}
	for(int i=0;i<cnt;i++){
		if(i>0)
			cout<<' ';
		cout<<arr[i];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int prime()':
a.cc:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
a.cc: In function 'int main()':
a.cc:24:17: error: 'sum' was not declared in this scope
   24 |                 sum+=primes[i];
      |                 ^~~
a.cc:27:23: error: 'sum' was not declared in this scope
   27 |                 if(!p[sum+primes[i]]){
      |                       ^~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int primes[500],tot;
bool p[500];
int prime(){
	for(int i=2;i<=500;i++){
		if(!p[i]) 
			primes[tot++]=i;
		for(int j=0;j<tot&&i*primes[j]<=500;j++){
			p[i*primes[j]]=true;
			if(i%primes[j]==0) break;
		}
	}
}
int main()
{
	pirme();
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		if(i>0) 
			cout<<' ';
		cout<<primes[i];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int prime()':
a.cc:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
a.cc: In function 'int main()':
a.cc:18:9: error: 'pirme' was not declared in this scope; did you mean 'prime'?
   18 |         pirme();
      |         ^~~~~
      |         prime