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

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

#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif

void init() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
}

void solve() {
  int primes[] = {3, 13, 23, 43, 53, 73, 83, 103, 113, 163, 173, 193, 223, 233, 263, 283, 293, 313, 353, 373, 383, 433, 443, 463, 503, 523, 563, 593, 613, 643, 653, 673, 683, 733, 743, 773, 823, 853, 863, 883, 953, 983, 1013, 1033, 1063, 1093, 1103, 1123, 1153, 1163, 1193, 1213, 1223, 1283, 1303}
  int n; scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    printf("%d", primes[i]);
  } 
}

int main() {
  init();
  int t = 1; //scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:17:3: error: expected ',' or ';' before 'int'
   17 |   int n; scanf("%d", &n);
      |   ^~~
a.cc:17:23: error: 'n' was not declared in this scope; did you mean 'yn'?
   17 |   int n; scanf("%d", &n);
      |                       ^
      |                       yn
Language: C++

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

#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif

void init() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
}

void solve() {
  int primes = {3, 13, 23, 43, 53, 73, 83, 103, 113, 163, 173, 193, 223, 233, 263, 283, 293, 313, 353, 373, 383, 433, 443, 463, 503, 523, 563, 593, 613, 643, 653, 673, 683, 733, 743, 773, 823, 853, 863, 883, 953, 983, 1013, 1033, 1063, 1093, 1103, 1123, 1153, 1163, 1193, 1213, 1223, 1283, 1303}
  int n; scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    printf("%d", primes[i]);
  } 
}

int main() {
  init();
  int t = 1; //scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:16:7: error: scalar object 'primes' requires one element in initializer
   16 |   int primes = {3, 13, 23, 43, 53, 73, 83, 103, 113, 163, 173, 193, 223, 233, 263, 283, 293, 313, 353, 373, 383, 433, 443, 463, 503, 523, 563, 593, 613, 643, 653, 673, 683, 733, 743, 773, 823, 853, 863, 883, 953, 983, 1013, 1033, 1063, 1093, 1103, 1123, 1153, 1163, 1193, 1213, 1223, 1283, 1303}
      |       ^~~~~~
a.cc:17:3: error: expected ',' or ';' before 'int'
   17 |   int n; scanf("%d", &n);
      |   ^~~
a.cc:17:23: error: 'n' was not declared in this scope; did you mean 'yn'?
   17 |   int n; scanf("%d", &n);
      |                       ^
      |                       yn
Language: C++


#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>

typedef unsigned long long ULLONG;
typedef long long LLONG;
static const LLONG MOD_NUM = 1000000007;

template<class _T> static void getint(_T& a) {
	const char* fmt = " %d";
	if (sizeof(_T) == sizeof(long long)) {
		fmt = " %lld";
	}

	if (scanf(fmt, &a) < 0) {
		printf("g1int Error\n");
	}
}
template<class _T> static void getint(_T& a, _T& b) {
	const char* fmt = " %d %d";
	if (sizeof(_T) == sizeof(long long)) {
		fmt = " %lld %lld";
	}

	if (scanf(fmt, &a, &b) < 0) {
		printf("g2int Error\n");
	}
}
template<class _T> static void getint(_T& a, _T& b, _T& c) {
	const char* fmt = " %d %d %d";
	if (sizeof(_T) == sizeof(long long)) {
		fmt = " %lld %lld %lld";
	}

	if (scanf(fmt, &a, &b, &c) < 0) {
		printf("g3int Error\n");
	}
}

static void ABC096D();

#if 1
int main()
{
	ABC096D();
	fflush(stdout);
	return 0;
}
#endif

static void ABC096D()
{
	int N;
	getint(N);
	
	std::vector<int> primeNumbers(1, 1);
	for (int i = 2; i <= 55555; i++) {
		std::map<int, int> primes;
		tp_getPrimes<int>(i, primes);
		if ((primes.size() == 1) && (primes.begin()->second == 1)){
			primeNumbers.push_back(primes.begin()->first);
		}
	}

	int count = 0;
	std::vector<int> ans(N);
	auto it = primeNumbers.begin();
	while ((it != primeNumbers.end()) && (count < N)) {
		if ((*it % 5) == 1) {
			ans[count] = *it;
			count++;
		}
		it++;
	}
	std::string str;
	for (int i = 0; i < N; i++) {
		char tmp[16] = { 0 };
		sprintf(tmp, "%d", ans[i]);

		if (i) {
			str += ' ';
		}
		str += tmp;
	}
	printf("%s\n", str.c_str());
}


Compiler output:
a.cc: In function 'void ABC096D()':
a.cc:68:17: error: 'tp_getPrimes' was not declared in this scope
   68 |                 tp_getPrimes<int>(i, primes);
      |                 ^~~~~~~~~~~~
a.cc:68:30: error: expected primary-expression before 'int'
   68 |                 tp_getPrimes<int>(i, primes);
      |                              ^~~
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.stream.IntStream;

/**
 * 解説どおりに作成したソースコード
 */
public class Main {

	/** 最大数 */
	static final int MAX = 55555;

	/** 合計を計算する数字の数 */
	static final int N = 5;

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			// MAXまでのすべての素数を計算
			boolean[] isPrime = new boolean[MAX + 1];
			Arrays.fill(isPrime, true);
			isPrime[0] = isPrime[1] = false;
			for (int i = 2; i <= ProblemD.MAX; i++) {
				if (isPrime[i]) {
					for (int j = i * 2; j <= ProblemD.MAX; j += i) {
						isPrime[j] = false;
					}
				}
			}
			@SuppressWarnings("unchecked")
			List<Integer>[] lists = new List[N];
			IntStream.range(0, N).forEach(i -> lists[i] = new ArrayList<>());
			IntStream.range(2, MAX).filter(i -> isPrime[i]).forEach(i -> lists[i % 5].add(5));
			int index = IntStream.range(1, N).filter(i -> lists[i].size() >= n).findFirst().getAsInt();
			IntStream.range(0, n).forEach(i -> System.out.println(lists[index].get(i)));
		}
	}
}


Compiler output:
Main.java:25: error: cannot find symbol
			for (int i = 2; i <= ProblemD.MAX; i++) {
			                     ^
  symbol:   variable ProblemD
  location: class Main
Main.java:27: error: cannot find symbol
					for (int j = i * 2; j <= ProblemD.MAX; j += i) {
					                         ^
  symbol:   variable ProblemD
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(x) (x).begin(),(x).end()
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
template <class T> inline bool chmax(T &a, T b) {if (a < b){a = b;return true;}return false;}

bool isPrime(int x){
    int i;
    if(x < 2)return 0;
    else if(x == 2) return 1;
    if(x%2 == 0) return 0;
    for(i = 3; i*i <= x; i += 2) if(x%i == 0) return 0;
    return 1;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n; cin>>n;
    for(int i=1; i<= 55555; i++){
        if(isPrime(i) && i%5==1) cout<<i<<" "
    }
    cout<<endl;
    return 0;
}
// abc096_d

Compiler output:
a.cc: In function 'int main()':
a.cc:24:46: error: expected ';' before '}' token
   24 |         if(isPrime(i) && i%5==1) cout<<i<<" "
      |                                              ^
      |                                              ;
   25 |     }
      |     ~
Language: C++

#include <iostream>
#include <iomanip>
#include <algorithm>
using namespace std;
#include <cstdio>
#include <tuple>
#include <string>
#include <vector> 
#include <set>
#include <string.h>
#include <map>
#include <cmath>
#include <deque>
using ll = long long;
using Graph = vector<vector<int>>;
#include <queue>
#include <stack>
#include <cmath>


bitset<1000000> isPrime;
//素数テーブル作成
void makePrimeTable(int n){  
    isPrime = bitset<1000000>(0);//コンストラクタ呼び出し
    //まずはすべて１にする
    for(ll i = 2LL;i <= n;i++) isPrime.set(i);

    //倍数をすべて0にする
    for(ll i = 2LL;i <= n;i++){
        for(ll j = 2 * i;j <= n;j += i){
            //倍数番目をオフにする
            if(isPrime[j]) isPrime.reset(j);
        }
    }
    
}


int main(){

    int N_MAX = 55555;
    makePrimeTable(N_MAX);

    int n;
    cin >> n;

    vector<int> primeSeq;
    int index = 0;
    //N_MAXまでの素数を配列にすべて格納する
    for(int i = 2;i <= N_MAX;i++){
        if(isPrime[i] && i % 5 == 1) primeSeq.push_back(i);
    }

    //指定の長さ分出力する
    for(int i=0;i < n;i++) cout << primeSeq[i] << " ";
    
    return 0;
}

Compiler output:
a.cc:21:1: error: 'bitset' does not name a type
   21 | bitset<1000000> isPrime;
      | ^~~~~~
a.cc: In function 'void makePrimeTable(int)':
a.cc:24:5: error: 'isPrime' was not declared in this scope
   24 |     isPrime = bitset<1000000>(0);//コンストラクタ呼び出し
      |     ^~~~~~~
a.cc:24:15: error: 'bitset' was not declared in this scope
   24 |     isPrime = bitset<1000000>(0);//コンストラクタ呼び出し
      |               ^~~~~~
a.cc:19:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
   18 | #include <cmath>
  +++ |+#include <bitset>
   19 | 
a.cc: In function 'int main()':
a.cc:51:12: error: 'isPrime' was not declared in this scope
   51 |         if(isPrime[i] && i % 5 == 1) primeSeq.push_back(i);
      |            ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(n);i++)
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
const int MAX = 1000000;
const ll INF = (1LL << 31) - 1;
const double pi=acos(-1);
bool is_prime(long long n) {
    if (n <= 1) return false;
    for (long long p = 2; p * p <= n; ++p) {
        if (n % p == 0) return false;
    }
    return true;
}
int main(){
  vector<int>prime;
  for(int i=1;i<=55555){
    if(is_prime(i))prime.push_back(i);
  }
  int n;
  cin >> n;
  rep(i,n){
    if(i!=0)cout<<" ";
    cout << prime[i];
  }
}


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

#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
using vc = vector<char>;
using vvc = vector<vc>;
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
vll arr(55556);
vll pr(0);
void Eratosthenes(){
	for(ll i = 2; 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.pb(arr[i]);//cout << i << endl;
		}
	}
}
int main(){
  ll n;
  cin>>n;
  vll ans(0);
  ll cu=0
  rep(i,n){
    if(sz(ans)==n) break;
    if(i<5){
      ans.pb(arr[i]);
      cu+=a[i];
      continue;
    }
    if(cu==arr[i]){
      i++;
    }
    else{
      cu-=a[i-5];
      cu+=a[i];
      ans.pb(arr[i]);
    }
  }
  rep(i,n) COUT(ans[i]);
}


Compiler output:
a.cc: In function 'void Eratosthenes()':
a.cc:45:27: error: 'n' was not declared in this scope
   45 |         for(ll i = 2; i < n; i++){
      |                           ^
a.cc:48:33: error: 'n' was not declared in this scope
   48 |         for(int i = 2; i < sqrt(n); i++){
      |                                 ^
a.cc:56:28: error: 'n' was not declared in this scope
   56 |         for(int i = 2; i < n; i++){
      |                            ^
a.cc: In function 'int main()':
a.cc:9:19: error: expected ',' or ';' before 'for'
    9 | #define rep(i, n) for (ll i = 0; i < (n); i++)
      |                   ^~~
a.cc:67:3: note: in expansion of macro 'rep'
   67 |   rep(i,n){
      |   ^~~
a.cc:67:7: error: 'i' was not declared in this scope
   67 |   rep(i,n){
      |       ^
a.cc:9:34: note: in definition of macro 'rep'
    9 | #define rep(i, n) for (ll i = 0; i < (n); i++)
      |                                  ^
Language: C++

#include<stdio.h>
#include<string>
#include<vector>
#include<algorithm>
#include<iostream>

using namespace std;

int main()
{
    int a[]={3,13,23,43,53,73,83,103,113,163,173,193,223,233,263,283,293,313,353,373,383,433,
                443,463,503,523,563,593,613,643,653,673,683,733,743,773,823,853,863,883,953,983,
                1013,1033,1063,1093,1103,1123,1153,1163,1193,1213,1223,1283,1303,1373,1423,1433,
                1453,1483,1493},n;
    cin>>n;
    for(int i=0;i<n-1;i++)
        cout<<a[i]<<' ';
    cout<<a[i]<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'i' was not declared in this scope
   18 |     cout<<a[i]<<endl;
      |             ^
Language: C++

/**
 *    created by : PawPaw       
**/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>  

using namespace __gnu_pbds;  
using namespace std;

typedef tree<int, null_type, less<int>, rb_tree_tag,  
        tree_order_statistics_node_update>  
        ordered_set;  

#define F(i,a,b) for(int i = (int)(a); i <= (int)(b); i++)
#define RF(i,a,b) for(int i = (int)(a); i >= (int)(b); i--)
#define LL long long
#define PHI acos(-1)
#define EPS 0.000000001
#define N 100001
#define MOD 1000000007
#define PB push_back
#define MP make_pair
#define FbO find_by_order
#define OoK order_of_key

vector<int> prime;
bool isprime[N+3];

void sieve(){
  fill(isprime, isprime+N, true);
  F(i, 2, N){
    if(isprime[i]){
      prime.PB(i);
      if(prime.size() == 56) break;
      for(LL j = (LL)(i*i) ; j <= N ; j += i)
        isprime[j] = false;
    }
  }
}

int solve(){
  sieve();
  int n;
  cin >> n;
  int st = 0, en = n-1;
  if(n % 2 == 1){
    st++;
    en++;
  }

  F(i, st, en){
    if(i != st) cout << " ";
    cout << prime[i];
    sum += prime[i];
  }
  cout << endl;
  return 0;
}

void fun(){
  int t = 1;
  // cin >> t;
  while(t--) solve();
} 

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

Compiler output:
a.cc: In function 'int solve()':
a.cc:56:5: error: 'sum' was not declared in this scope
   56 |     sum += prime[i];
      |     ^~~
Language: C++

p = [True] * 100010
p[0] = p[1] = False
for i in range(2, 100000):
    if p[i] == True:
        for j in range(2 * i, 100000, i):
            p[j] = False

n = int(input())
a = []
i = 6
while len(a) < n:
    if p[i]:
        a.append(i)
    i += 5

for i in a:
    print(i, end = " ")

Compiler output:
a.cc:1:1: error: 'p' does not name a type
    1 | p = [True] * 100010
      | ^
Language: C++

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

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

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

    vector<int> ans;
    for(int i=5; i<=55555 && ans.size() != n; ++i){
        if(isPrime(i)){
            if(ans.size() < 4)　ans.push_back(i);
            else{
                if(!isPrime(accumulate(ans.end()-4, ans.end(), i))){
                    ans.push_back(i);
                }
            }
        }
    }

    cout << ans[0];
    for(int i=1; i < n; ++i)　cout << " " << ans[i];
    cout << endl;
}


Compiler output:
a.cc:19:31: error: extended character 　 is not valid in an identifier
   19 |             if(ans.size() < 4)　ans.push_back(i);
      |                               ^
a.cc:29:29: error: extended character 　 is not valid in an identifier
   29 |     for(int i=1; i < n; ++i)　cout << " " << ans[i];
      |                             ^
a.cc: In function 'int main()':
a.cc:19:31: error: '\U00003000ans' was not declared in this scope
   19 |             if(ans.size() < 4)　ans.push_back(i);
      |                               ^~~~~
a.cc:29:29: error: '\U00003000cout' was not declared in this scope
   29 |     for(int i=1; i < n; ++i)　cout << " " << ans[i];
      |                             ^~~~~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

bool fivedivideone(int p) {
	if (p == 1) return false;

  else if (p%5 == 1) return true;
	
	else return false ;
}

int n;

int main() {
	cin >> n;
	for (int i = 11; i <= 55555; i += 20 ) {
      
		if (fivediveideone(i) == true) {
          
			if (i != 11) cout << " ";
			cout << i;
          n--;
		}
      
		if (n == 0) break;
	}
  
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: 'fivediveideone' was not declared in this scope; did you mean 'fivedivideone'?
   20 |                 if (fivediveideone(i) == true) {
      |                     ^~~~~~~~~~~~~~
      |                     fivedivideone
Language: C++

#include <iostream>
#include <bits/srdc++.h>

using namespace std;

bool fivedivideone(int p) {
	if (p == 1) return false;

  else if (p%5 == 1) return true;
	
	else return false ;
}

int n;

int main() {
	cin >> n;
	for (int i = 11; i <= 55555; i += 20 ) {
      
		if (fivediveideone(i) == true) {
          
			if (i != 11) cout << " ";
			cout << i;
          n--;
		}
      
		if (n == 0) break;
	}
  
	cout << endl;
	return 0;
}


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

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

bool is_prime(int _Num){
    if(_Num < 2)return false;
    if(_Num % 2 == 0){
        if(_Num == 2)return true;
        else return false;
    }
    bool _prime = true;
    for(int i = 3; i <= sqrt(_Num); i += 2){
        if(_Num % i == 0){
            _prime = false;
            break;
        }
    }
    return _prime;
}

int main(){
    int N, M;
    cin >> N;
    vector<int> prime;
    for(int i = 2; i <= 55555; i++){
        if(is_prime(i))prime.push_back(i);
    }
    M = prime.size();// = 5637
    
    for(int i - 0; i < N; i++){
        cout << prime[i] << " ";
    }
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:14: error: expected ';' before '-' token
   29 |     for(int i - 0; i < N; i++){
      |              ^~
      |              ;
a.cc:29:25: error: expected ')' before ';' token
   29 |     for(int i - 0; i < N; i++){
      |        ~                ^
      |                         )
a.cc:29:27: error: 'i' was not declared in this scope
   29 |     for(int i - 0; i < N; i++){
      |                           ^
Language: C++

#include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define REP(i, b, n) for (Int i = b; i < Int(n); i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
using Int = long long;
Int inf = 1000000000000000001LL;
using vi = vector<Int>;
using vvi = vector<vi>;
using mapis = unordered_map<Int,string>;
using mapii = unordered_map<Int,Int>;
using pii = pair<Int,Int>;

Int GCD(Int a, Int b){
    if(b==0) return a;
    if(a < b) return GCD(b, a);
    unsigned r;
    while ((r=a%b)) {
        a = b;
        b = r;
    }
    return b;
}

Int modinv(Int a, Int m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

Int binary_search_index(Int Y, vi &q){
    int left = 0, right = q.size() - 1;
    while (right >= left) {
        int mid = left + (right - left) / 2;
        if (q[mid] == Y) return mid;
        else if (q[mid] > Y) right = mid - 1;
        else if (q[mid] < Y) left = mid + 1;
    }
    return -1;
}

bool compare_by_b(pair<int, int> a, pair<int, int> b) {
    if(a.second != b.second){
        return a.second < b.second;
    }else{
        return a.first < b.first;
    }
}

int root_sum(int target, vi &parents, vi &nodes_value, vi &memo, int sum){
    if(memo[target] != -1){
        sum += memo[target];
        return sum;
    }
    if (parents[target] == target){
        sum+=nodes_value[target];
        return sum;
    }else{
        sum+=nodes_value[target];
        return root_sum(parents[target],parents, nodes_value, memo, sum);
    }
}


bool is_prime(int n, map<int,int> &memo){
    if(memo[n] == 1){
        return false;
    }else if(memo[n] == 2){
        return true;
    }

    bool prime = true;
    double sqrt_n = sqrt(double(n)+0.1);
    for(int i =2; i<int(sqrt_n); i++){
        if(memo[i]==2 && n%i==0){
            prime = false;
        }
    }
    if(prime){
        memo[n] = 2;
    }else{
        memo[n] = 1;
    }

    return prime;
}

int main() {
    Int N;
    cin >> N;

    map<int,int> memo;
    memo[0]=1;
    memo[1]=1;
    memo[2]=2;
    vi answers;

    REP(i,2,55555){
        if(is_prime(i,memo) && i%5 == 1){
            answers.push_back(i);
        }

        if(answers.size() == N){
            break;
        }
    }

    rep(i,answers.size()){
        cout << answers[i] << " ";
    }
    cout << endl;


    return 0;
}

Compiler output:
a.cc: In function 'bool is_prime(int, std::map<int, int>&)':
a.cc:93:21: error: 'sqrt' was not declared in this scope; did you mean 'sqrt_n'?
   93 |     double sqrt_n = sqrt(double(n)+0.1);
      |                     ^~~~
      |                     sqrt_n
Language: C++

#include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define REP(i, b, n) for (Int i = b; i < Int(n); i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
using Int = long long;
Int inf = 1000000000000000001LL;
using vi = vector<Int>;
using vvi = vector<vi>;
using mapis = unordered_map<Int,string>;
using mapii = unordered_map<Int,Int>;
using pii = pair<Int,Int>;

Int GCD(Int a, Int b){
    if(b==0) return a;
    if(a < b) return GCD(b, a);
    unsigned r;
    while ((r=a%b)) {
        a = b;
        b = r;
    }
    return b;
}

Int modinv(Int a, Int m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

Int binary_search_index(Int Y, vi &q){
    int left = 0, right = q.size() - 1;
    while (right >= left) {
        int mid = left + (right - left) / 2;
        if (q[mid] == Y) return mid;
        else if (q[mid] > Y) right = mid - 1;
        else if (q[mid] < Y) left = mid + 1;
    }
    return -1;
}

bool compare_by_b(pair<int, int> a, pair<int, int> b) {
    if(a.second != b.second){
        return a.second < b.second;
    }else{
        return a.first < b.first;
    }
}

int root_sum(int target, vi &parents, vi &nodes_value, vi &memo, int sum){
    if(memo[target] != -1){
        sum += memo[target];
        return sum;
    }
    if (parents[target] == target){
        sum+=nodes_value[target];
        return sum;
    }else{
        sum+=nodes_value[target];
        return root_sum(parents[target],parents, nodes_value, memo, sum);
    }
}


bool is_prime(int n, map<int,int> &memo){
    if(memo[n] == 1){
        return false;
    }else if(memo[n] == 2){
        return true;
    }

    bool prime = true;
    for(int i =2; i<sqrt(n); i++){
        if(memo[i]==2 && n%i==0){
            prime = false;
        }
    }
    if(prime){
        memo[n] = 2;
    }else{
        memo[n] = 1;
    }

    return prime;
}

int main() {
    Int N;
    cin >> N;

    map<int,int> memo;
    memo[0]=1;
    memo[1]=1;
    memo[2]=2;
    vi answers;

    REP(i,2,55555){
        if(is_prime(i,memo) && i%5 == 1){
            answers.push_back(i);
        }

        if(answers.size() == N){
            break;
        }
    }

    rep(i,answers.size()){
        cout << answers[i] << " ";
    }
    cout << endl;


    return 0;
}

Compiler output:
a.cc: In function 'bool is_prime(int, std::map<int, int>&)':
a.cc:93:21: error: 'sqrt' was not declared in this scope
   93 |     for(int i =2; i<sqrt(n); i++){
      |                     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using vec=vector<ll>;
using mat=vector<vec>;
#define For(i,a,b) for(i=a;i<b;i++)
#define rep(i,N) For(i,0,N)
#define rep1(i,N) For(i,1,N)
#define all(v) (v).begin(),(v).end()
#define vsort(v) sort(all(v))
#define mod 1000000007
using data=pair<ll,ll>;
long mmid(long a,long b,long c){return a<b?(b<c?b:max(a,c)):(b>c?b:min(a,c));}
ll modinv(ll a){ ll b=mod,u=1,v=0,t; while(b){ t=a/b; a-=t*b; swap(a,b); u-=t*v; swap(u,v); } return (u+mod)%mod; }
ll moddevide(ll a,ll b){return (a*modinv(b))%mod;}
ll modncr(ll n,ll r){ ll i,plus=1; rep(i,r){ plus=(plus*(n-i))%mod; plus=moddevide(plus,i+1); } return plus; }
ll euclidean_gcd(ll a, ll b) { if(a<b) return euclidean_gcd(b, a); ll r; while ((r=a%b)){a=b;b=r;} return b; }
ll countdigits(ll n){ ll ans=0; while(n){n/=10;ans++;} return ans; }
ll sumdigits(ll n){ ll ans=0; while(n){ans+=n%10;n/=10;} return ans; }
void printmap(vector<ll>& a,ll H,ll W){ ll i,j; For(i,0,H+2){ For(j,0,W+2){cout<<a[i*(W+2)+j];} cout<<endl; } } void inputmap(vector<ll>& a,ll H,ll W){ ll i,j; string ss; For(i,1,H+1){ cin>>ss; For(j,1,W+1){ if(ss[j-1]=='#'){ a[i*(W+2)+j]=1; }else{ a[i*(W+2)+j]=0; } } } }

void eratosthenes(vec& a,ll N){
  ll i,j;
  vec ch(N+1,1);
  for(i=2;i<=N;i++){
    if(ch[i]){
      a.push_back(i);
      for(j=2;i*j<=N;j++){
        ch[i*j]=0;
      }
    }
  }
}

int main(){
  ll i;
  ll n; cin>>n;
  vector<ll> ch;
  eratosthenes(ch,55556);
  ll tmp = 11;
  vector<ll> ans;
  while(1){
     if(binary_search(all(ch),tmp)){ 
        n--;
        ans.push_back(tmp);
        if(n==0) break;
     }
    tmp+=10;
  }
  for(auto i : ans){
    cout <<i<< ” ”;
  }
}

Compiler output:
a.cc:51:16: error: extended character ” is not valid in an identifier
   51 |     cout <<i<< ” ”;
      |                ^
a.cc:51:18: error: extended character ” is not valid in an identifier
   51 |     cout <<i<< ” ”;
      |                  ^
a.cc: In function 'int main()':
a.cc:51:16: error: '\U0000201d' was not declared in this scope
   51 |     cout <<i<< ” ”;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using vec=vector<ll>;
using mat=vector<vec>;
#define For(i,a,b) for(i=a;i<b;i++)
#define rep(i,N) For(i,0,N)
#define rep1(i,N) For(i,1,N)
#define all(v) (v).begin(),(v).end()
#define vsort(v) sort(all(v))
#define mod 1000000007
using data=pair<ll,ll>;
long mmid(long a,long b,long c){return a<b?(b<c?b:max(a,c)):(b>c?b:min(a,c));}
ll modinv(ll a){ ll b=mod,u=1,v=0,t; while(b){ t=a/b; a-=t*b; swap(a,b); u-=t*v; swap(u,v); } return (u+mod)%mod; }
ll moddevide(ll a,ll b){return (a*modinv(b))%mod;}
ll modncr(ll n,ll r){ ll i,plus=1; rep(i,r){ plus=(plus*(n-i))%mod; plus=moddevide(plus,i+1); } return plus; }
ll euclidean_gcd(ll a, ll b) { if(a<b) return euclidean_gcd(b, a); ll r; while ((r=a%b)){a=b;b=r;} return b; }
ll countdigits(ll n){ ll ans=0; while(n){n/=10;ans++;} return ans; }
ll sumdigits(ll n){ ll ans=0; while(n){ans+=n%10;n/=10;} return ans; }
void printmap(vector<ll>& a,ll H,ll W){ ll i,j; For(i,0,H+2){ For(j,0,W+2){cout<<a[i*(W+2)+j];} cout<<endl; } } void inputmap(vector<ll>& a,ll H,ll W){ ll i,j; string ss; For(i,1,H+1){ cin>>ss; For(j,1,W+1){ if(ss[j-1]=='#'){ a[i*(W+2)+j]=1; }else{ a[i*(W+2)+j]=0; } } } }

void eratosthenes(vec& a,ll N){
  ll i,j;
  vec ch(N+1,1);
  for(i=2;i<=N;i++){
    if(ch[i]){
      a.push_back(i);
      for(j=2;i*j<=N;j++){
        ch[i*j]=0;
      }
    }
  }
}

int main(){
  ll i;
  ll n; cin>>n;
  vector<ll> ch;
  eratosthenes(ch,55556);
  ll tmp = 11;
  vector<ll> ans;
  while(1){
     if(binary_search(all(ch),tmp)){ 
        n--;
        ans.push_back(tmp);
        if(n==0) break;
     }
    tmp+=10;
  }
  for(auto i : ans){
    cout << i << ” ”;
  }
}

Compiler output:
a.cc:51:18: error: extended character ” is not valid in an identifier
   51 |     cout << i << ” ”;
      |                  ^
a.cc:51:20: error: extended character ” is not valid in an identifier
   51 |     cout << i << ” ”;
      |                    ^
a.cc: In function 'int main()':
a.cc:51:18: error: '\U0000201d' was not declared in this scope
   51 |     cout << i << ” ”;
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using vec=vector<ll>;
using mat=vector<vec>;
#define For(i,a,b) for(i=a;i<b;i++)
#define rep(i,N) For(i,0,N)
#define rep1(i,N) For(i,1,N)
#define all(v) (v).begin(),(v).end()
#define vsort(v) sort(all(v))
#define mod 1000000007
using data=pair<ll,ll>;
long mmid(long a,long b,long c){return a<b?(b<c?b:max(a,c)):(b>c?b:min(a,c));}
ll modinv(ll a){ ll b=mod,u=1,v=0,t; while(b){ t=a/b; a-=t*b; swap(a,b); u-=t*v; swap(u,v); } return (u+mod)%mod; }
ll moddevide(ll a,ll b){return (a*modinv(b))%mod;}
ll modncr(ll n,ll r){ ll i,plus=1; rep(i,r){ plus=(plus*(n-i))%mod; plus=moddevide(plus,i+1); } return plus; }
ll euclidean_gcd(ll a, ll b) { if(a<b) return euclidean_gcd(b, a); ll r; while ((r=a%b)){a=b;b=r;} return b; }
ll countdigits(ll n){ ll ans=0; while(n){n/=10;ans++;} return ans; }
ll sumdigits(ll n){ ll ans=0; while(n){ans+=n%10;n/=10;} return ans; }
void printmap(vector<ll>& a,ll H,ll W){ ll i,j; For(i,0,H+2){ For(j,0,W+2){cout<<a[i*(W+2)+j];} cout<<endl; } } void inputmap(vector<ll>& a,ll H,ll W){ ll i,j; string ss; For(i,1,H+1){ cin>>ss; For(j,1,W+1){ if(ss[j-1]=='#'){ a[i*(W+2)+j]=1; }else{ a[i*(W+2)+j]=0; } } } }

void eratosthenes(vec& a,ll N){
  ll i,j;
  vec ch(N+1,1);
  for(i=2;i<=N;i++){
    if(ch[i]){
      a.push_back(i);
      for(j=2;i*j<=N;j++){
        ch[i*j]=0;
      }
    }
  }
}

int main(){
  ll n; cin>>n;
  vector<ll> ch;
  eratosthenes(ch,55556);
  ll tmp = 11;
  vector<ll> ans;
  while(1){
     if(binary_search(all(ch),tmp)){ 
        n--;
        ans.push_back(tmp);
        if(n==0) break;
     }
    tmp+=10;
  }
  rep(i,n) cout << ans[i] << ” ”;
}

Compiler output:
a.cc:49:30: error: extended character ” is not valid in an identifier
   49 |   rep(i,n) cout << ans[i] << ” ”;
      |                              ^
a.cc:49:32: error: extended character ” is not valid in an identifier
   49 |   rep(i,n) cout << ans[i] << ” ”;
      |                                ^
a.cc: In function 'int main()':
a.cc:49:7: error: 'i' was not declared in this scope
   49 |   rep(i,n) cout << ans[i] << ” ”;
      |       ^
a.cc:6:24: note: in definition of macro 'For'
    6 | #define For(i,a,b) for(i=a;i<b;i++)
      |                        ^
a.cc:49:3: note: in expansion of macro 'rep'
   49 |   rep(i,n) cout << ans[i] << ” ”;
      |   ^~~
a.cc:49:30: error: '\U0000201d' was not declared in this scope
   49 |   rep(i,n) cout << ans[i] << ” ”;
      |                              ^
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <queue>
#include <stack>
#include <cmath>

using namespace std;
using ll = long long;
using ull = unsigned long long;


void ABC085D()
{
	int N;
	ll H;
	cin >> N >> H;
	vector<ll> a(N), b(N);
	for (int i = 0; i < N; ++i)
	{
		cin >> a[i] >> b[i];
	}
	sort(a.begin(), a.end(), greater<ll>());
	sort(b.begin(), b.end(), greater<ll>());
	auto nB = distance(b.begin(), lower_bound(b.begin(), b.end(), a.front(), greater<ll>()));

	for (int i = 0; i < nB; ++i)
	{
		H -= b[i];
		if (H <= 0)
		{
			cout << i + 1 << endl;
			return;
		}
	}
	ll ct = H / a.front();
	if (ct * a.front() < H)
		++ct;
	cout << ct + nB << endl;
}int main()
{
	ABC096D();
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:9: error: 'ABC096D' was not declared in this scope; did you mean 'ABC085D'?
   48 |         ABC096D();
      |         ^~~~~~~
      |         ABC085D
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()

int main() {
  int n; cin >> n;
  vector<int> ans;
  for (int i = 2; i <= 55555; i ++) {
    if (i % 5 == 1) {
      boo flag = true;
      for (int j = 2; j * j <= i; j ++) {
        if (i % j == 0) flag = false;
      }
      if (flag) ans.push_back(i);
    }
  }

  rep(i, n) {
    if (i) cout << " ";
    cout << ans[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 'boo' was not declared in this scope; did you mean 'bool'?
   12 |       boo flag = true;
      |       ^~~
      |       bool
a.cc:14:25: error: 'flag' was not declared in this scope
   14 |         if (i % j == 0) flag = false;
      |                         ^~~~
a.cc:16:11: error: 'flag' was not declared in this scope
   16 |       if (flag) ans.push_back(i);
      |           ^~~~
Language: C++

#include <iostream>
#include<cstring>
#include <cstdio>
#include <windows.h>
using namespace std;
int d[55556];
int x[56];
int n;
const int INF=100000;
int main()
{
    cin>>n;
    memset(d,0,sizeof(d));
    //把不是素数的数标记成INF
    for(int i=2;i<=55555/2;i++)
    {
        for(int j=2;i*j<=55555;j++)
        {
            if(d[i*j]==0)
            {
                d[i*j]=INF;
            }
        }
    }
    int second=0;
    int t=0;
    int sum=0;
    for(int i=2;i<=55555;i++)
    {
        if(d[i]==INF)
            continue;
            d[i]=i;
            sum+=i;
            x[t]=i;
            t++;
            if(t==1)
                second=i;
            if(t==n&&d[sum]==INF)
            {
                for(int j=0;j<n;j++)
                {
                    if(j==n-1)
                        cout<<x[j];
                    else
                    cout<<x[j]<<" ";
                }
                exit(0);
            }
            if(t==n&&d[sum]!=INF)
            {
                i=second;
                sum=0;
                t=0;
            }
    }
}


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

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

int a[10000];
int main()
{
	a[1] = 2;
	a[2] = 3;
	int k = 2;
	for (int i = 4;i < 55555;i++)
	{
		int j;
		for (j = 1;j <= sqrt(k)+1;j++)
		{
			if (i%a[j] == 0)
				break;
		}
		if (j > sqrt(k) + 1)
		{
			k++;
			a[k] = i;
		}
	}

	int n;
	cin >> n;

	//for (int i = 1; a[i]!=0;i++)
		//cout << a[i] << endl;
	if (n % 2 == 0)
	{
		int i;
		for (i = 2;i <= n;i++)
			printf("%d ", a[i]);
		printf("%d\n", a[i + 1]);
	}
	else
	{
		int i;
		for (i = 1;i < n;i++)
			printf("%d ", a[i]);
		printf("%d\n", a[i]);
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:33: error: 'sqrt' was not declared in this scope
   15 |                 for (j = 1;j <= sqrt(k)+1;j++)
      |                                 ^~~~
a.cc:20:25: error: 'sqrt' was not declared in this scope
   20 |                 if (j > sqrt(k) + 1)
      |                         ^~~~
Language: C++

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

template<size_t max_N, size_t prime_size>
struct Prime{
    bool sieve[max_N];
    int_fast64_t prime[prime_size];
    size_t counter = 0;
    constexpr Prime() : sieve(), prime() {
        for(int_fast64_t i = 0; i < max_N; ++i)
            sieve[i] = true;
        for(int_fast64_t i = 2; i < max_N; ++i){
            if(sieve[i] && i % 5 == 2){
                prime[counter] = i;
                ++counter;
                if(counter > prime_size)break;
            }
            for(int_fast64_t j = i * i; j < max_N; j += i)
                sieve[j] = false;
        }
    }
};

constexpr auto p = Prime<5555555, 600000>();

long long int N;

int main(){

    scanf("%lld", &N);
    for(int i = 0; i < N; ++i)cout << p.prime[i] << " ";
    return 0;

}

Compiler output:
a.cc:24:43:   in 'constexpr' expansion of 'Prime<5555555, 600000>()'
a.cc:10:9: error: 'constexpr' loop iteration count exceeds limit of 262144 (use '-fconstexpr-loop-limit=' to increase the limit)
   10 |         for(int_fast64_t i = 0; i < max_N; ++i)
      |         ^~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
int prime[55555];         // i番目の素数
bool is_prime[55555 + 1]; // is_prime[i]がtrueならiは素数

int sieve(int n) {
    int p = 0;
    for(int i = 0; i <= n; i++) {
        is_prime[i] = true;
    }
    is_prime[0] = is_prime[1] = false;
    for(int i = 2; i < n + 1; i++) {
        if(is_prime[i]) {
            prime[p++] = i;
            for(int j = 2 * i; j <= n; j += i) {
                is_prime[j] = false;
            }
        }
    }
    return p;
}

int main() {
    int N;
    cin >> N;
    long long sum = 0;
    sieve(10000);
    int i = 0;
    REP(cnt, N) {
        while(prime[i] % 5 != 1) {
            i++;
        }
        cout << prime[i] << " ";
        i++;
    }
    cout << endl;
    return 0;
}
ｆ

Compiler output:
a.cc:67:1: error: '\U0000ff46' does not name a type
   67 | ｆ
      | ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  vector<int> a = {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 n;
  cin >> n;
  for (int i = 0; i<n; i++){
    cout << a[i];
    if (i!=n-1) cout << " ";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:23: error: expected '}' before numeric constant
    4 |   vector<int> a = {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};
      |                   ~   ^~
a.cc:4:23: error: expected ',' or ';' before numeric constant
a.cc: At global scope:
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> n;
      |   ^~~
a.cc:7:3: error: expected unqualified-id before 'for'
    7 |   for (int i = 0; i<n; i++){
      |   ^~~
a.cc:7:19: error: 'i' does not name a type
    7 |   for (int i = 0; i<n; i++){
      |                   ^
a.cc:7:24: error: 'i' does not name a type
    7 |   for (int i = 0; i<n; i++){
      |                        ^
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: Java

public class Main{
	public static void main(String[]$){
		Arrays.asList(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).subList(0,scanner.nextInt()).forEach(System.out::println);
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Arrays.asList(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).subList(0,scanner.nextInt()).forEach(System.out::println);
		^
  symbol:   variable Arrays
  location: class Main
Main.java:3: error: cannot find symbol
		Arrays.asList(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).subList(0,scanner.nextInt()).forEach(System.out::println);
		                                                                                                                                                                                                                                                               ^
  symbol:   variable scanner
  location: class Main
2 errors
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <array>
#include <queue>
#include <map>
#include <set>
#include <sstream>
#include <stdio.h>
#include <cstdio>
#include <cstring>

using namespace std;

#define Rep(i,a,b) for(int i = a; i < b; i++)
#define rep(i,b) Rep(i,0,b)
#define rrep(i,a) for(int i = a; i >= 0; i--)
#define allof(a) (a).begin(), (a).end()

typedef long long ll;
const int inf = 1e9 + 7;
const ll infll = 1ll << 60ll;
const ll mod = 1e9 + 7;
// 0~3までは右左下上 4~7までは斜め
constexpr int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
constexpr int dy[] = { 0, -1, 0, 1, 1, -1, -1, 1 };

/*
// 最大公約数
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}

// 最小公倍数
ll lcm(ll a, ll b) {
	return a * b / gcd(a, b);
}*/

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() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;
	cin >> n;

	// 要素数が変わってもn=55の時の組から適当に選べばよい

	vector<int> prime;

	Rep(i, 2, 55556) {
		if (isPrime(i)) prime.push_back(i);
	} // 素数が5600個ある

	// 55個選ぶ
	// 合計が素数なんて少ないんじゃ？
	// 合計が5の倍数を目指す
	// 下一桁が3であるやつを55個探す

	vector<int> ans(55);
	int cnt = 0;
	for (auto p : prime) {
		if (p % 10 == 3) {
			ans[cnt] = p;
			cnt++;
			if (cnt == 55) break;
		}
	}

	rep(i, n) {
		cout << ans[i] << " ";
	}

	cout << endl;


	return 0;
}

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

using namespace std;
typedef long long ll;
#define mod 1000000007

bool isprime(int p){
    if(p==1) return false;
    for(int i=2;i*i<p;i++){
        if(p%i==0) return false;
    }
    return true;
}

int main(){
   int n;
   cin>>n;
   for(int i=11; i<=55555; i+=10){
       if(isprime(i)){
           if(i!=11) cout<<" ";
           cout<<i;
           n--;
       }
       if(n==0) break;
   }
   cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: 'cin' was not declared in this scope
   15 |    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:18:22: error: 'cout' was not declared in this scope
   18 |            if(i!=11) cout<<" ";
      |                      ^~~~
a.cc:18:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:12: error: 'cout' was not declared in this scope
   19 |            cout<<i;
      |            ^~~~
a.cc:19:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:4: error: 'cout' was not declared in this scope
   24 |    cout<<endl;
      |    ^~~~
a.cc:24:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:10: error: 'endl' was not declared in this scope
   24 |    cout<<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<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
#define rep(i, n) for(int i = 0; i < n; i++)
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
int main(){
    ll n; cin >> n;
    int a[56] = {11,31,41,61,71,101,131,151,211,241,251,271, //12
    281,311,331,401,421,431,461,491,521,541,571,601,631,641,//13
    661,691,701,751,761,811,821,881,911,941,971,991,1021,1031,//14
    1051,1061,1091,1151,1171,1181,1201,1231,1291,1301,1321,//11  
    1361,1381,1451,1471,1481,1511};
    for(int i = 0; i < n; i++){
        cout << a[i] << " ";
    }
    cout << endl;
}






Compiler output:
a.cc: In function 'int main()':
a.cc:19:34: error: too many initializers for 'int [56]'
   19 |     1361,1381,1451,1471,1481,1511};
      |                                  ^
Language: C++

#include <iostream>
#include <algorithm>

int n;
bool prime[55560];
int main() {
	std::cin >> n;

	std::fill(prime, prime + 55555 + 1, true);
	for (int i = 2, end = std::sqrt(55555); i <= end; i++) {
		if (prime[i]) {
			for (int j = 0; i * (j + 2) <= 55555; j++) {
				prime[i *(j + 2)] = false;
			}
		}
	}
	prime[0] = prime[1] = false;

	int ans[60];
	int cnt = 0;
	for (int i = 6; cnt < n; i += 5)
		if (prime[i])
			ans[cnt++] = i;

	for (int i = 0; i < n; ++i)
		std::cout << ans[i] << std::endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:36: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   10 |         for (int i = 2, end = std::sqrt(55555); i <= end; i++) {
      |                                    ^~~~
      |                                    sort
Language: C++

#define MAXN 300000
int prime[MAXN];/* i番目の素数 */
bool is_prime[MAXN]; /*iは素数か？*/
int num_prime[MAXN]; /* i番目までの素数の数 */
int sieve(int n){
  int p=0;
  for(int i=0;i<=n;i++) is_prime[i]=true;
  is_prime[0]=is_prime[1]=false;
  for(int i=2;i<=n;i++){
    if(is_prime[i]){
      prime[p++]=i;
      for(int j=2*i;j<=n;j+=i) is_prime[j]=false;
    }
  }
  for(int i=1;i<MAXN;i++){
    num_prime[i]=num_prime[i-1]+is_prime[i];
  }
  return p; 
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status