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

#include <iostream>
#include <string>
#include <algorithm>
#include <stdlib.h>
#include <math.h>
#define ll long long

using namespace std; 

int n;
ll a[1000000010];
ll sum = 0;

int main(){
	cin >> n;
	for (int i = 0; i < n; ++i)
	{
		cin >> a[i];
	}
	sum += a[0] - 1;
	ll limit = 2;
	// ll limit = 1;
	for (int i = 1; i < n; ++i)
	{
		ll tmp_limit = limit;
		if(a[i] == limit){
			limit++;
		}
		// int tmp_limit = limit;
		// while(true){
		// 	tmp_limit++;
		// 	if(a[i] % tmp_limit == a[i] % limit) 
		// }
		while(a[i] > tmp_limit){
			a[i] -= tmp_limit;
			sum++;
		}
		// if(a[i] + 1 > limit) limit = a[i] + 1;
	}
	cout << sum << endl;
}

Compiler output:
/tmp/ccCBoiKq.o: in function `main':
a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccCBoiKq.o
a.cc:(.text+0x7a): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccCBoiKq.o
a.cc:(.text+0xf7): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccCBoiKq.o
a.cc:(.text+0x102): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccCBoiKq.o
a.cc:(.text+0x13a): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccCBoiKq.o
collect2: error: ld returned 1 exit status
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
#define ll long long
#define ull unsigned ll
typedef long double ld;
#define ALL(a) begin(a),end(a)
#define ifnot(a) if(not (a))
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

// #define int ll
#ifdef _MSC_VER
const bool test = true;
#else 
const bool test = false;
#endif

int dx[] = { 0,1,0,-1 };
int dy[] = { 1,0,-1,0 };
#define INF (1 << 28)
ull mod = (int)1e9 + 7;
//.....................
#define MAX (int)1e5 + 5

int N;
ll A[MAX];

signed main() {
	cin >> N;
	rep(i, N) cin >> A[i];
	ll cnt = 0;
	ll max_v = 0;
	rep(i, N) {
		if (A[i] == 2) {
			max_v = max(max_v,2);
			int tmp = 0;
			dump(tmp);
		}
		else {
			int tmp = A[i] / (max_v + 1);
			if (A[i] % (max_v + 1) == 0) tmp--;
			dump(tmp);
			cnt += tmp;
			if (max_v == 0) max_v = 1;
			if (tmp == 0) max_v = A[i];
		}
	}
	cout << cnt << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:36: error: no matching function for call to 'max(long long int&, int)'
   39 |                         max_v = max(max_v,2);
      |                                 ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:39:36: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   39 |                         max_v = max(max_v,2);
      |                                 ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:39:36: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   39 |                         max_v = max(max_v,2);
      |                                 ~~~^~~~~~~~~
Language: C++

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

#define debug(x) cout<<#x<<": "<<x<<endl
#define rep(i,a,b) for(int i=a;i<b;i++)
#define PB push_back
#define SORT(v) sort(v.begin(), v.end())
#define REVSORT(v) sort(v.begin(), v.end(), std::greater<int>())

typedef long long ll;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	vector<ll>a;
	ll tmp;
	ll sell = 0;
	ll mx = 0;
	bool no2 = true;
	cin >> n;
	rep(i, 0, n){
		cin >> tmp;
		a.PB(tmp);
	}
	if (a[0] != 1){
		sell += a[0] - 1;
		a[0] = 1;
	}
	ll mins = 2;
	rep(i, 1, n){
//		if (a[i] == 2)no2 = false;
/*		if (no2){
			sell+=a[i] / 2;
			if (a[i] % 2 == 0)sell--;
			a[i] = 1;
		}*/
		else{
			sell += a[i] / mins;
			if (a[i] % mins == 0)sell--;
			if (mins == a[i])mins++;
			a[i] = 1;
		}
	}
	cout << sell << endl;



	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:17: error: 'else' without a previous 'if'
   42 |                 else{
      |                 ^~~~
Language: C++

#include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
//#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <numeric>
#include <list>
#include <assert.h>
#include <math.h>
//#include <array>
#include <valarray>
#include <stdio.h>
//#include <random>
//#include <windows.h>
//#pragma comment(lib, "winmm.lib")
#include <algorithm>

using namespace std;
typedef long long ll;
typedef long long int llint;
typedef pair<long long int, long long int> pii;
typedef pair<double, double> pdd;

long long  int nCm(long long int n, long long int m) {
	if (m == 1) {
		return n;
	}
	else {
		return n*nCm(n - 1, m - 1) / m;
	}
}

long long int npm(long long int n, long long int m) {
	if (m == 1) {
		return n;
	}
	else
		if (m == 0) {
			return 1;
		}
		else {
			return n*npm(n, m - 1);
		}
}



llint ketasu(llint a) {//桁数
	llint k = 1;
	while (true) {

		if ((a - a % 10) / 10 == 0) { break; }
		++k;
		a = (a - a % 10) / 10;
	}
	return k;
}


llint keta(llint a) {//最上位
	llint b = a;
	while (true) {

		if ((a - a % 10) / 10 == 0) { break; }
		a = (a - a % 10) / 10;
		b = a;
	}
	return b;
}

llint keta2(llint a, llint c) {//桁数目の桁
	llint b = a;
	for (llint i = 1; i<c; ++i) {

		if ((a - a % 10) / 10 == 0) { break; }
		a = (a - a % 10) / 10;
		b = a;
	}
	return b % 10;
}

llint pow10n(llint a) {//10^n
	llint s = 1;
	for (llint i = 0; i < a; ++i) {
		s *= 10;
	}
	return s;
}

llint hoge(llint a, llint b) {
	if (a%b == 0) {
		return a;
	}
	else {
		return a - a%b + b;
	}
}


llint main()
{
	llint N;
	cin >> N;
	vector<llint> money(N);
	llint nedan = 2;
	for (llint i = 0; i < N; ++i) {
		cin >> money[i];
	}
	llint kosuu = money[0]-1;
	for (llint i = 1; i < N; ++i) {
		if (money[i] != nedan ) {
			kosuu += hoge(money[i], nedan) / nedan - 1;
		}
		else {
			nedan++;
		}
	}
	cout << kosuu << endl;
}

Compiler output:
a.cc:107:1: error: '::main' must return 'int'
  107 | llint main()
      | ^~~~~
Language: Java


import java.util.Scanner;

public class codefes2016bc {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int a[] = new int[N];
		int nowp = 1;
		for (int i = 0; i < a.length; i++) {
			a[i] = scanner.nextInt();
		}

		long ans = 0;
		for (int i = 0; i < a.length; i++) {
			// System.out.println("a[" + i + ":" + a[i]);
			// System.out.println("po:" + nowp);
			if (a[i] == nowp) {
				nowp++;
				// System.out.println("nowp++");
				continue;

			}
			if (a[i] < nowp) {
				// System.out.println(ans);
				continue;
			}
			// System.out.println(ans + a[i] / nowp - 1);
			if (a[i] % nowp == 0 || nowp == 1) {
			ans = ans + a[i] / nowp-1;
			if (nowp == 1) {
				nowp++;
			}
			} else {
			ans = ans + a[i] / nowp;
			}

		}
		System.out.println(ans);

	}
}


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

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

#define debug(x) cout<<#x<<": "<<x<<endl
#define rep(i,a,b) for(int i=a;i<b;i++)
#define PB push_back
#define SORT(v) sort(v.begin(), v.end())
#define REVSORT(v) sort(v.begin(), v.end(), std::greater<int>())

typedef long long ll;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	vector<ll>a;
	ll tmp;
	ll sell = 0;
	ll mx = 0;
	bool no2 = true;
	cin >> n;
	rep(i, 0, n){
		cin >> tmp;
		a.PB(tmp);
	}
	if (a[0] != 1){
		sell += a[0] - 1;
		a[o] = 1;
	}
	rep(i, 1, n){
		if (a[i] == 2)no2 == false;
		if (no2){
			sell+=a[i] / 2;
			a[i] = 1;
		}
		else{
			sell += a[i] / 3;
			a[i] = 1;
		}
	}
	cout << sell << endl;



	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:19: error: 'o' was not declared in this scope
   32 |                 a[o] = 1;
      |                   ^
Language: C++

#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <cstdlib>

using namespace std;
typedef long long int ll;

bool debug = false;
#define show(x) if (debug) {cout << "" # x << " = " << x << endl;}
#define rep(x, a, b) for (int x = a; x < b; x++)

int main()
{
  ll n;

  cin >> n;

  vector<ll> a(n, 0);

  rep (i, 0, n) {
    cin >> a[i];
  }

  ll sum = 0;
  ll low = 1;
  
  rep(i, 0, n) {
    show(low);
    if (a[i] <= low) {
      low = max(a[i] + 1, low);
    } else {
      sum += (a[i] - low - 1) / low + 1;
      low = max(2, low);
    }
  }

  cout << sum << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:16: error: no matching function for call to 'max(int, ll&)'
   35 |       low = max(2, low);
      |             ~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:35:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   35 |       low = max(2, low);
      |             ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:35:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   35 |       low = max(2, low);
      |             ~~~^~~~~~~~
Language: C++

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

int main()
{
	long long N, tmp = 1, res = 0;
	cin >> N;
	for (int i = 0, a; i < N; i++) {
		cin >> a;
		if (a > tmp) {
			res += (a - 1) / tmp;
			tmp = max(tmp, 2);
		}
		else if(a == tmp)
			tmp++;
	}
	cout << res << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: no matching function for call to 'max(long long int&, int)'
   12 |                         tmp = max(tmp, 2);
      |                               ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:34: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   12 |                         tmp = max(tmp, 2);
      |                               ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:12:34: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 |                         tmp = max(tmp, 2);
      |                               ~~~^~~~~~~~
Language: C

#include<stdio.h>
#define MAX 100001
#define max2(a,b) a<b?b:a
#define max3(a,b,c) max2((max2(a,b)),c)
#define max4(a,b,c,d) max3((max2(a,b)),c,d)

int main(){
	int i,j,k;
	int ans = 0;
	int min = 0;
	int tmp,t;
	int flag = 0;
	int a[MAX];
	int n;
	
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		scanf("%d",&a[i]);
	}
	
	for(i = 0;i < n;i++){
		//if(min+1 < a[i]){
			t = (a[i]-1)/(min+1);
			ans += t;
			if(t)flag = 1;
			tmp = (a[i]-1)%(min+1)+1;
			if(!flag&&min < tmp){
				min = tmp;
			}
			if(flag&&min<a[i])min = a[i];
			flag = 0;
		//}
	}
	
	printf("%d\n",ans);
	return 0;
}#include<stdio.h>
#define MAX 100001
#define max2(a,b) a<b?b:a
#define max3(a,b,c) max2((max2(a,b)),c)
#define max4(a,b,c,d) max3((max2(a,b)),c,d)

int main(){
	int i,j,k;
	int ans = 0;
	int min = 0;
	int tmp,t;
	int flag = 0;
	int a[MAX];
	int n;
	
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		scanf("%d",&a[i]);
	}
	
	for(i = 0;i < n;i++){
		//if(min+1 < a[i]){
			t = (a[i]-1)/(min+1);
			ans += t;
			if(t)flag = 1;
			tmp = (a[i]-1)%(min+1)+1;
			if(!flag&&min < tmp){
				min = tmp;
			}
			if(flag&&min<a[i])min = a[i];
			flag = 0;
		//}
	}
	
	printf("%d\n",ans);
	return 0;
}

Compiler output:
main.c:37:2: error: stray '#' in program
   37 | }#include<stdio.h>
      |  ^
main.c:37:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   37 | }#include<stdio.h>
      |          ^
Language: C++

// In the name of God

#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>

using namespace std;

const int N = (int) 0, mod = (int) 0;
#define int long long
int32_t main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int n;
    cin >> n;
    int res = 0, mx = 0;
    for (int i = 0; i < n; ++i) {
        int x;
        cin >> x;
        int use = mx + 1;
        int p = x;
        if (p <= use) {
            mx = max(mx, p);
            continue;
        }
        res += (x - 1) / use;
        mx = max(mx, 1);
    }
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:39:17: error: no matching function for call to 'max(long long int&, int)'
   39 |         mx = max(mx, 1);
      |              ~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:39:17: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   39 |         mx = max(mx, 1);
      |              ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:39:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   39 |         mx = max(mx, 1);
      |              ~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,c[100005][30][30],q,r[30],ans[100005];
string s[100005];
void dfs(vector<int> x,int l){
	int o=0;
	vector<int>p[30];
	for(int i=0;i<x.size();i++){
		if(l<s[x[i]].size())p[s[x[i]][l]-'a'].PB(x[i]);
		else o++;
	}
	for(int i=0;i<x.size();i++){
		if(s[x[i]].size()<=l)continue;
		ans[x[i]]+=o;
		for(int j=0;j<26;j++){
			c[x[i]][s[x[i]][l]-'a'][j]+=int(p[j].size());
		}
	}
	for(int i=0;i<26;i++)if(p[i].size())dfs(p[i],l+1);
}
int main(void){
	scanf("%d",&n);
	for(int i=0;i<n;i++)cin>>s[i];
	scanf("%d",&q);
	vector<int>x;
	for(int i=0;i<n;i++)x.PB(i);
	dfs(x,0);
	while(q--){
		int k;
		scanf(" %d",&k);
		k--;
		int res=ans[k];
		for(int i=0;i<26;i++){
			char t;
			scanf(" %c",&t);
			r[t-'a']=i;
		}
		for(int i=0;i<26;i++){
			for(int j=0;j<26;j++){
				if(r[i]>r[j])res+=c[k][i][j];
			}
		}
		printf("%d\n",res+1);
	}
}

Compiler output:
a.cc: In function 'void dfs(std::vector<int>, int)':
a.cc:9:55: error: 'class std::vector<int>' has no member named 'PB'
    9 |                 if(l<s[x[i]].size())p[s[x[i]][l]-'a'].PB(x[i]);
      |                                                       ^~
a.cc: In function 'int main()':
a.cc:26:31: error: 'class std::vector<int>' has no member named 'PB'
   26 |         for(int i=0;i<n;i++)x.PB(i);
      |                               ^~
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>

using namespace std;

unordered_map<char, int> currentOrder;

struct comp {
	bool operator() (string a, string b) {
		int i = 0, j = 0;
		while (a[i] == b[j]) {
			++i;
			++j;
			if (i == a.length() || j == b.length()) {
				break;
			}
		}
		if (i == a.length() || j == b.length()) {
			return a.length() < b.length();
		} else {
			return currentOrder[a[i]] < currentOrder[b[j]];
		}
	}
} comp;

int find(vector<string> &str, string s) {
	int l = 0, r = str.size() - 1;
	while (l < r) {
		int mid = (l + r) / 2;
		if (comp(str[mid], s)) {
			l = mid + 1;
		} else {
			r = mid;
		}
	}
	return l;
}

int main(void) {

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

	int q; cin >> q;
	vector<int> result(q, -1);
	unordered_map< string, vector< pair<string, int> > > table;
	for (int i = 0; i < q; ++i) {
		int idx;
		string order;
		cin >> idx >> order;
		table[order].push_back(make_pair(str[idx - 1], i));
	}

	unordered_map< string, vector< pair<string, int> > >::iterator iter;
	for (iter = table.begin(); iter != table.end(); ++iter) {
		string order = iter->first;
		for (int i = 0; i < 26; ++i) {
			currentOrder[order[i]] = i;
		}
		currentOrder['\0'] = 
		sort(str.begin(), str.end(), comp);
		/*
		for (int i = 0; i < str.size(); ++i) {
			cout << str[i] << endl;
		}
		cout << endl;
		*/
		for (int i = 0; i < iter->second.size(); ++i) {
			result[iter->second[i].second] = find(str, iter->second[i].first) + 1;
		}
		// break;
	}

	for (int i = 0; i < q; ++i) {
		cout << result[i] << endl;
	}
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:21: error: void value not ignored as it ought to be
   67 |                 sort(str.begin(), str.end(), comp);
      |                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>

using namespace std;

unordered_map<char, int> currentOrder;

struct comp {
	bool operator() (string a, string b) {
		int i = 0, j = 0;
		while (a[i] == b[j]) {
			++i;
			++j;
		}
		return currentOrder[a[i]] < currentOrder[b[j]];
	}
} comp;

int find(vector<string> &str, string s) {
	int l = 0, r = str.size() - 1;
	while (l < r) {
		int mid = (l + r) / 2;
		if (comp(str[mid], s)) {
			l = mid + 1;
		} else {
			r = mid;
		}
	}
	return l;
}

int main(void) {

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

	int q; cin >> q;
	vector<int> result(q, -1);
	unordered_map< string, vector< pair<string, int> > > table;
	for (int i = 0; i < q; ++i) {
		int idx;
		string order;
		cin >> idx >> order;
		table[order].push_back(make_pair(str[idx - 1], i));
	}

	unordered_map< string, vector< pair<string, int> > >::iterator iter;
	for (iter = table.begin(); iter != table.end(); ++iter) {
		string order = iter->first;
		for (int i = 0; i < 26; ++i) {
			currentOrder[order[i]] = i;
		}
		sort(str.begin(), str.end(), comp);
		/*
		for (int i = 0; i < str.size(); ++i) {
			cout << str[i] << endl;
		}
		cout << endl;
		*/
		for (int i = 0; i < iter->second.size(); ++i) {
			result[iter->second[i].second] = find(str, iter->second[i].first) + 1;
		}
		// break;
	}

	for (int i = 0; i < q; ++i) {
		cout << result[i] << endl;
	}
	return 0;

}


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

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
struct S_STRU{
	int id;
	string s;
};
string g_Rule;
int compChar(char ch1,char ch2)
{
	int ch1Pos=-1,ch2Pos=-1;
	for (int i=0;i<26;i++){
		if (g_Rule[i] == ch1){
			ch1Pos = i;
		}
		if (g_Rule[i] == ch2){
			ch2Pos = i;
		}
		if (ch1Pos != -1 && ch2Pos != -1){
			break;
		}
	}
	if (ch1Pos>ch2Pos){
		return 1;
	}
	if (ch1Pos==ch2Pos){
		return 0;
	}
	if (ch1Pos<ch2Pos){
		return -1;
	}
}

bool less(const S_STRU& s1,const S_STRU& s2)
{
	int sLen1 = s1.s.length();
	int sLen2 = s2.s.length();
	int sLen = min(sLen1,sLen2);
	int pos=0;
	for (int i=0;i<sLen;i++){
		pos=compChar(s1.s[i],s2.s[i]);
		if (pos<0){
			return true;//s1<s2
		}else if (pos>0){
			return false;//s1>s2
		}
	}
	if (sLen1<sLen2){
		return true;
	}else{
		return false;
	}
}
int main(int argc, char* argv[])
{
	int N,Q;
	cin>>N;
	int i;
	vector<S_STRU> S(N);
	vector<S_STRU> S_Sort(N);

	string _s;
	for (i=0;i<N;i++){
		S[i].id = i+1;
		cin>>S[i].s;
		S_Sort[i].id=S[i].id;
		S_Sort[i].s=S[i].s;
	}
	cin>>Q;
	vector<int> k(Q);
	vector<string> p(Q);
	for (i=0;i<Q;i++){
		cin>>k[i];
		cin>>p[i];
	}
	for (i=0;i<Q;i++){
		g_Rule = p[i];
		sort(S_Sort.begin(),S_Sort.end(),less);
		for (int j=0;j<S_Sort.size();j++){
			if (S[k[i]-1].id==S_Sort[j].id){
				cout<<j+1<<endl;
				break;
			}
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:80:50: error: reference to 'less' is ambiguous
   80 |                 sort(S_Sort.begin(),S_Sort.end(),less);
      |                                                  ^~~~
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_function.h:356:12: note: candidates are: 'template<class _Tp> struct std::less'
  356 |     struct less;
      |            ^~~~
a.cc:36:6: note:                 'bool less(const S_STRU&, const S_STRU&)'
   36 | bool less(const S_STRU& s1,const S_STRU& s2)
      |      ^~~~
a.cc: In function 'int compChar(char, char)':
a.cc:34:1: warning: control reaches end of non-void function [-Wreturn-type]
   34 | }
      | ^
Language: C++

#include <iostream>
#include <cassert>
#include <vector>
// #include <algorithm>

using namespace std;

class TrieNode
{
public:
	void add(const char *p) {
		assert(*p);
		m_count++;
		if (m_count == 1) {
			m_pVal = p;
			m_isEnd = 1;
			return;
		}
		assert(*p == *m_pVal);
		if (m_next.empty()) {
			m_next.resize(26);
			const char *p1 = m_pVal + 1;
			if (*p1)
				m_next[*p1 - 'a'].add(p1);
			m_isEnd = (int)(!(*p1));
		}
		if (*(++p))
			m_next[*p - 'a'].add(p);
		else
			m_isEnd = 1;
	}
	
// private:
	int m_count = 0;
	const char *m_pVal = 0;
	int m_isEnd = 0;
	vector<TrieNode> m_next;
};

class TrieRoot
{
public:
	TrieRoot() : m_next(26) {}
	
	inline void add(const string &s) {
		if (!s.empty())
			m_next[s[0] - 'a'].add(s.c_str());
	}
	
	int query(const string &s, const string &order) {
		if (s.empty())
			return 1;
		int c = 0;
		const char *p = s.c_str();
		for (char ch : order) {
			if (ch == *p) break;
			c += m_next[ch - 'a'].m_count;
		}
		auto *pCurr = &m_next[*p - 'a'];
		while (*++p) {
			if (pCurr->m_count == 1)
				return c + 1;
			if (p - s.c_str() > 100000) return -1;
			// cout << *p << pCurr->m_isEnd << endl;
			while(*(p+1) && pCurr->m_count == pCurr->m_next[*p - 'a'].m_count)
				pCurr = &pCurr->m_next[*p++ - 'a'];
			c += pCurr->m_isEnd;
			for (char ch : order) {
				if (ch == *p) break;
				c += pCurr->m_next[ch - 'a'].m_count;
			}
			pCurr = &pCurr->m_next[*p - 'a'];
		}
		return c + 1;
	}
	
private:
	vector<TrieNode> m_next;
};

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
 
	int n, q, k;
	string s, o;
	TrieRoot root;
	vector<string> vs;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> s;
		vs.push_back(s);
		root.add(s);
	}
	// vector<string> vs1(vs);
	// sort(vs1.begin(), vs1.end());
	// for (auto &str : vs1)
	// 	root.add(str);
	cin >> q;
	for (int i = 0; i < q; i++) {
		cin >> k >> o;
		// cout << k << ' ' << vs[k-1] << ' ' << o << endl;
		if (N == 1)
		    cout << 1 << endl;
		else cout << root.query(vs[k-1], o) << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:103:21: error: 'N' was not declared in this scope
  103 |                 if (N == 1)
      |                     ^
Language: C++

#include <iostream>
#include <cassert>
#include <vector>

using namespace std;

class TrieNode
{
public:
	void add(const char *p) {
		// assert(*p);
		m_count++;
		if (m_count == 1) {
			m_pVal = p;
			m_isEnd = 1;
			return;
		}
		if (m_next.empty()) {
			m_next.resize(26);
			const char *p1 = m_pVal + 1;
			if (*p1)
				m_next[*p1 - 'a'].add(p1);
			m_isEnd = (int)(!(*p1));
		}
		if (*(++p))
			m_next[*p - 'a'].add(p);
		else
			m_isEnd = 1;
	}
	
// private:
	int m_count = 0;
	const char *m_pVal = 0;
	int m_isEnd = 0;
	vector<TrieNode> m_next;
};

class TrieRoot
{
public:
	TrieRoot() : m_next(26) {}
	
	inline void add(const string &s) {
		if (!s.empty())
			m_next[s[0] - 'a'].add(s.c_str());
	}
	
	int getRank(const string &s, const string &order) {
		if (s.empty())
			return 1;
		int c = 0;
		const char *p = s.c_str();
		for (char ch : order) {
			if (ch == *p) break;
			c += m_next[ch - 'a'].m_count;
		}
		auto *pNext = &m_next[*p++ - 'a'];
		while (*p) {
			// cout << *p << pNext->m_isEnd;
			if (pNext->m_count == 1)
				return c + 1;
			while(*(p+1) && pNext->m_count == pNext->m_next[*p - 'a'].m_count)
				pNext = &pNext->m_next[*p++ - 'a'];
			c += pNext->m_isEnd;
			for (char ch : order) {
				if (ch == *p) break;
				c += pNext->m_next[ch - 'a'].m_count;
			}
			pNext = &pNext->m_next[*p++ - 'a'];
		}
		return c + 1;
	}
	
private:
	vector<TrieNode> m_next;
};

int main() {
	int n, q, k;
	TrieRoot root;
	vector<string> vs;
	string s;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> s;
		vs.push_back(s);
		// root.add(s);
	}
	vector<string> vs1(vs);
	sort(vs1.begin(), vs1.end());
	for (auto &str : vs1)
		root.add(str);
	cin >> q;
	for (int i = 0; i < q; i++) {
		cin >> k >> s;
		// cout << k << ' ' << vs[k-1] << ' ' << s << endl;
		cout << root.getRank(vs[k-1], s) << endl;
	}
	return 0;
}


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

#include<iostream>
using namespace std;
const int NQmax = 100000;
int N,Q;
string S[NQmax];
int prefix[NQmax];
int former[26][26][NQmax];

struct trie {
  int k; // index of this node
  int n; // number of children
  struct trie *c[26];
};

void init(struct trie *t){
  t->k = -1;
  t->n = 0;
  for(int i=0; i<26; i++) t->c[i] = NULL;
}

struct trie *add(struct trie *t, string s){
  t->n++;
  if(s.empty()) return t;

  int c = s[0]-'a';
  if(t->c[c] == NULL){
    t->c[c] = new struct trie;
    init(t->c[c]);
  }
  return add(t->c[c], s.substr(1, s.size()-1));
}

int main(){
  cin >> N;
  for(int i=0; i<N; i++){
    cin >> S[i];
  }
  struct trie *root = new struct trie;
  init(root);
  for(int i=0; i<N; i++){
    add(root, S[i])->k = i;
  }

  for(int i=0; i<N; i++){
    struct trie *t=root;
    for(int j=0; j<S[i].size(); j++){
      int c = S[i][j]-'a';
      struct trie* s = t->c[c];
      if(t->k >= 0) prefix[i]++;
      for(int k=0; k<26; k++){
        if(k==S[i][j]-'a'|| t->c[k]==NULL) continue;
        former[k][c][i] += t->c[k]->n;
      }
      t=s;
    }
  }

  cin >> Q;
  for(int i=0; i<Q; i++){
    cin >> K[i];
    cin >> P[i];
    int res = prefix[K[i]-1]+1;
    for(int j=0; j<26; j++){
      for(int k=j; k<26; k++){
        res += former[P[i][j]-'a'][P[i][k]-'a'][K[i]-1];
      }
    }
    cout << res << endl;
  }


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:12: error: 'K' was not declared in this scope
   60 |     cin >> K[i];
      |            ^
a.cc:61:12: error: 'P' was not declared in this scope
   61 |     cin >> P[i];
      |            ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
    int tangoNum;
    cin >> tangoNum;
    string tango[tangoNum];
    int temp[tangoNum];
    int tempFlag[tangoNum];//とったかとってないか
    int kotae = 0;
    for (int i = 0; i < tangoNum; ++i)
    {
        cin >> tango[i];
        tempFlag[i] = 0;
    }
    int qNum;
    string query[qNum];
    int tangoFocus[qNum];//そのクエリーでの調べたい位置
    for (int i = 0; i < qNum; ++i)
    {
        cin >> tangoFocus[i];
        cin >> query[i];
    }
    for (int i = 0; i < qNum; ++i)
    {
        for (int j = 0; j < tangoNum; ++j)
        {
            int temp[j][tango[j].size()];
            for (int l = 0; l < tango[j].size(); ++l)//単語中のl文字目
            {
                temp[j][l] = query[i].find(tango[j][l]);
            }
        }
        for (int j = 0; j < tango[tangoFocus[i]].size(); ++j)//focus単語の文字数，上から何文字目か
        {
            for (int l = 0; l < tangoNum; ++l)//l番目の文字列と，前からj番目の文字と比較
            {
                if(temp[tangoFocus[i]][j]<temp[l][j] && tempFlag[l]==0 && l!=tangoFocus[i]){
                    kotae++;
                    tempFlag[l] = 1;
                }
            }
        }
        cout << kotae << endl;
        for (int j = 0; j < tangoNum; ++j)
        {
            tempFlag[j] = 0;
        }
        kotae = 0;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:39: error: invalid types 'int[int]' for array subscript
   39 |                 if(temp[tangoFocus[i]][j]<temp[l][j] && tempFlag[l]==0 && l!=tangoFocus[i]){
      |                                       ^
a.cc:39:50: error: invalid types 'int[int]' for array subscript
   39 |                 if(temp[tangoFocus[i]][j]<temp[l][j] && tempFlag[l]==0 && l!=tangoFocus[i]){
      |                                                  ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cstring>
#include <queue>
#include <algorithm>
#include <climits>
#include <string>
#include <cstdlib>
#include <sstream>
#include <cmath>
#include <cassert>
#include <iomanip> // cout << setprecision(9) << fixed;

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;

#define umap unordered_map
#define uset unordered_set
#define pqueue priority_queue

int main() {
    int N;
    cin >> N;
    vector<string> S(N);
    for (int j = 0; j < N; j++) {
        cin >> s[j];
    }
    int Q;
    cin >> Q;
    vector<int> k(Q);
    vector<string> p(Q);
    for (int i = 0; i < Q; i++) {
        cin >> k[i] >> p[i];
    }

    for (int i = 0; i < Q; i++) {
        string cp = s[k[i]];
        for (int j = 0; j < cp.size(); j++) {
            cp[j] = p[i][cp[j] - 'a'];
        }
        int cnt = 1;
        for (int j = 0; j < N; j++) {
            if (j == k[i]) {
                continue;
            }
            string cps = s[j];
            for (int j = 0; j < cps.size(); j++) {
                cps[j] = p[i][cps[j] - 'a'];
            }
            if (cps < cp) {
                cnt++;
            }
        }
        cout << cnt << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:16: error: 's' was not declared in this scope
   34 |         cin >> s[j];
      |                ^
a.cc:45:21: error: 's' was not declared in this scope
   45 |         string cp = s[k[i]];
      |                     ^
Language: C++

#include <stdio.h>
#define MAXN (400000)

class TrieNode {
public:
    bool exist;
    int  son_count;
    TrieNode* nodes[26]={0};
    TrieNode():son_count(0),exist(false){}
    TrieNode * & getNode(const char & chr)
    {
        return nodes[chr-'a'];
    }
}nodes[MAXN];

int nodes_cnt = 0;

class Trie {
public:
    Trie() {
        root = new TrieNode();
    }

    void insert(const char *  word) {
        TrieNode * now = root;
        while(*word)
        {
            now->son_count++;
            if(!now->getNode(*word))
                now = now->getNode(*word) = &nodes[nodes_cnt++];
            else
                now = now->getNode(*word);
            word++;
        }
        now->son_count ++;
        now->exist = true;
    }

    int get_rank(const char * word, const char * char_rank) {
        int rank = 1;
        TrieNode * now = root, *last = NULL, *tmp;
        while(*word)
        {
            for(int i = 0; char_rank[i] != *word; i++)
            {
                tmp = now->getNode(char_rank[i]);
                if(tmp)
                    rank+= tmp->son_count;
            }
            last = now;
            now = now->getNode(*word);
            word++;
            if(*word && last->exist)
                rank++;
        }
        return rank;
    }
private:
    TrieNode* root;
};
#define MAX_CHAR_LEN (1000000)
#define MAX_STR_CNT  (400000+5)

char char_buffer[MAX_CHAR_LEN];
char * str_table[MAX_STR_CNT];

int main()
{
    int N,Q,k;
    char char_rank[32], * ptr = char_buffer;
    Trie trie;
    scanf("%d",&N);
    for(int i = 0; i < N; i++)
    {
        str_table[i] = ptr;
        scanf("%s",ptr);
        trie.insert(ptr);
        ptr += strlen(ptr) + 1;
    }
    scanf("%d",&Q);
    for(int i = 0; i < Q; i++)
    {
        scanf("%d%s", &k, char_rank);
        int rank = trie.get_rank(str_table[k-1], char_rank);
        printf("%d\n", rank);
    }
    //printf("%d")
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:78:16: error: 'strlen' was not declared in this scope
   78 |         ptr += strlen(ptr) + 1;
      |                ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 | #define MAXN (400000)
Language: C++

#include <iostream>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <map>
#include <algorithm>

using namespace std;

struct Node {
	Node* next[26];
	int count;
	bool flag;

	Node() {
		count= 0;
		flag = false;
		memset(next, 0, sizeof(next));
	}
};

int n, q, id;
string s;
string arr[100010];
Node* root;

void insert(string s, Node* p) {
	for (int i = 0; i < s.length(); ++i) {
		if (NULL == p->next[s[i] - 'a']) {
			p->next[s[i] - 'a'] = new Node();
		}
		p->next[s[i] - 'a']->count += 1;
		p = p->next[s[i] - 'a'];
	}
	p->flag = true;
}

void in() {
	cin >> n;
	root = new Node();

	for (int i = 0; i < n; ++i) {
		cin >> s;
		arr[i] = s;
		insert(s, root);
	}
} 

void run() {
	cin >> q;

	for (int i = 0; i < q; ++i) {
		cin >> id >> s;
		--id;
		int ans = 0;
		Node* p = root;

		for (int j = 0; j < arr[id].length(); ++j) {
			for (int k = 0; k < s.length(); ++k) {
				//cout << s[k] << ";";
				if (s[k] == arr[id][j]) {
					break;
				} else {
					if (p->next[s[k] - 'a'] != NULL) {
						ans += p->next[s[k] - 'a']->count;
					}
				}
			}
			//cout << endl;
			p = p->next[arr[id][j] - 'a'];
			if (p->flag) {
				ans += 1;
			}
		}

		cout << ans << endl;
	}
}

void out() {

}

int main() {
	//freopen("data", "r", stdin);

	in();
	run();
	out();

	return 0;
}

Compiler output:
a.cc: In constructor 'Node::Node()':
a.cc:18:17: error: 'memset' was not declared in this scope
   18 |                 memset(next, 0, sizeof(next));
      |                 ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <algorithm>
  +++ |+#include <cstring>
    7 |
Language: C++

#include <stdio.h>
int main(int n,int a,int b,int ans=0,int t[1001]){
	scanf("%d%d%d",&n,&a,&b);
	for(int i=1; i<=n; i++) scanf("%d",&t[i]); 
	for(int i=1; i<=n; i++) ans+=((t[i]<a||t[i]>=b)?1:0);
	printf("%d\n",ans);
}

Compiler output:
a.cc:2:5: warning: second argument of 'int main(int, int, int, int, int*)' should be 'char **' [-Wmain]
    2 | int main(int n,int a,int b,int ans=0,int t[1001]){
      |     ^~~~
a.cc:2:5: warning: third argument of 'int main(int, int, int, int, int*)' should probably be 'char **' [-Wmain]
a.cc:2:5: warning: 'int main(int, int, int, int, int*)' takes only zero or two arguments [-Wmain]
a.cc:2:42: error: default argument missing for parameter 5 of 'int main(int, int, int, int, int*)'
    2 | int main(int n,int a,int b,int ans=0,int t[1001]){
      |                                      ~~~~^~~~~~~
a.cc:2:32: note: ...following parameter 4 which has a default argument
    2 | int main(int n,int a,int b,int ans=0,int t[1001]){
      |                            ~~~~^~~~~
Language: C++

#include <stdio.h>
int main(int n,int a,int b,int ans=0,int t[1001];){
	scanf("%d%d%d",&n,&a,&b);
	for(int i=1; i<=n; i++) scanf("%d",&t[i]); 
	for(int i=1; i<=n; i++) ans+=((t[i]<a||t[i]>=b)?1:0);
	printf("%d\n",ans);
}

Compiler output:
a.cc:2:49: error: expected ')' before ';' token
    2 | int main(int n,int a,int b,int ans=0,int t[1001];){
      |         ~                                       ^
      |                                                 )
a.cc:2:5: warning: second argument of 'int main(int, int, int, int, int*)' should be 'char **' [-Wmain]
    2 | int main(int n,int a,int b,int ans=0,int t[1001];){
      |     ^~~~
a.cc:2:5: warning: third argument of 'int main(int, int, int, int, int*)' should probably be 'char **' [-Wmain]
a.cc:2:5: warning: 'int main(int, int, int, int, int*)' takes only zero or two arguments [-Wmain]
a.cc:2:42: error: default argument missing for parameter 5 of 'int main(int, int, int, int, int*)'
    2 | int main(int n,int a,int b,int ans=0,int t[1001];){
      |                                      ~~~~^~~~~~~
a.cc:2:32: note: ...following parameter 4 which has a default argument
    2 | int main(int n,int a,int b,int ans=0,int t[1001];){
      |                            ~~~~^~~~~
a.cc:2:50: error: expected unqualified-id before ')' token
    2 | int main(int n,int a,int b,int ans=0,int t[1001];){
      |                                                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a,b;cin>>n>>a>>b;
  int ans=0;
  rep(i,0,n){
    int t;cin>>t;
    if(t<a||t>=b)ans++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   rep(i,0,n){
      |       ^
a.cc:6:3: error: 'rep' was not declared in this scope
    6 |   rep(i,0,n){
      |   ^~~
Language: C++

#include<iostream>

using namespace std;

int main(){
	int n , a , b , x,f;
	cin>>n>>a>>b;
	f = 0;
		for(int i = 0 ; i < n ; i++){
		cin>>x;
		if(x>=b || x < a) f++
		}
	cout<<f<<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:38: error: expected ';' before '}' token
   11 |                 if(x>=b || x < a) f++
      |                                      ^
      |                                      ;
   12 |                 }
      |                 ~
Language: C++

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

//#define _debug
#define FASTIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define sc(x) scanf("%d",&x)
#define ll long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define FORd(i,a,b) for(int i=a;i>b;i--)
#define ff first
#define ss second
#define sz(x) x.size()
#define pb push_back
//#define _online_judge

using namespace std;
using namespace __gnu_pbds;

typedef tree<int, //data type
 null_type, //
 less<int>, //
 rb_tree_tag, //red-black tree
 tree_order_statistics_node_update>
    new_data_set;

typedef pair<int,int> pii;
typedef vector<pii> vii;
const int con = static_cast<const int>(1e4 + 5);
const int MOD = 1000000007;

int main(){
    FASTIO;
#ifdef _online_judge
    freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
#endif

    int n,a,b;cin >> n >> a >> b;
    int x,ans=0;
    FOR(i,0,n){
        cin >> x;
        if(x =< a || x >= b) ans++;
    }
    cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:15: error: expected primary-expression before '<' token
   44 |         if(x =< a || x >= b) ans++;
      |               ^
Language: C++

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


void solve(long long N, long long A, long long B, std::vector<long long> t){
  int cnt = 0;
  rep(i,N){
    if(t[i]<A || t[i]>=B) cnt++;
  }
  cout << cnt << endl;
}

int main(){
    long long N;
  scanf("%lld",&N);
  long long A;
  scanf("%lld",&A);
  long long B;
  scanf("%lld",&B);
  std::vector<long long> t(N);
  for(int i = 0 ; i < N ; i++){
    scanf("%lld",&t[i]);
  }
    solve(N, A, B, std::move(t));
    return 0;
}


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

# -*- coding: utf-8 -*-


def main():
    n, a, b = map(int, input().split())
    count = 0

    for i in range(n):
        ti = int(input())

        if a <= ti < b:
            pass
        else:
            count += 1

    print(count)


if __name__ == '__main__':
    main()


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:19:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   19 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def main():
      | ^~~
Language: C++

#include <vector>
#include <iostream>
#include <string>
#include <map>
#include <fstream>
#include <sstream>
#include <set>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) FOR(i,0,b)
#define INF mugen
#define dump(x) cerr<<#x<<"="<<x<<endl
#define all(a) (a).begin(),(a).end()
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<vii> viii;
typedef pair<int,int> P;
template <class T> void chmin(T & a, T const & b) { if (b < a) a = b; }
template <typename T>
string to_string(const T &n){ostringstream stm;stm << n;return stm.str();}
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
using ll = long long;
const ll mod = LLONG_MAX;

vector<int> t;
signed main(){
  int N,A,B;
  cin>>N>>A>>B;
  rep(i,N){
    int a;
    cin>>a;t.push_back(a);
  }

  int ans=0;
  for(auto itr:t){
    if(itr<A || itr>=B )ans++;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc:23:16: error: 'LLONG_MAX' was not declared in this scope
   23 | const ll mod = LLONG_MAX;
      |                ^~~~~~~~~
a.cc:8:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    7 | #include <set>
  +++ |+#include <climits>
    8 | using namespace std;