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

#include <algorithm>
#include <boost/optional.hpp>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <numeric>
#include <queue>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>

#define REP(i, n) for(int i = 0, i##_MACRO = (n); i < i##_MACRO; i++)
#define RANGE(i, a, b) for(int i = (a), i##_MACRO = (b); i < i##_MACRO; i++)
#define EACH(e, a) for(auto&& e : a)
#define ALL(a) (a).begin(), (a).end()
#define AALL(a, n) (a), ((a) + (n))
#define FILL(a, n) memset((a), n, sizeof(a))
#define FILLZ(a) FILL(a, 0)
#define MODNUM (static_cast<int>(1e9 + 7))
#define MOD(x) ((x) % MODNUM)

using namespace std;

using ll = long long;
using VI = vector<int>;
using VI2D = vector<vector<int>>;

const int INF = 2e9;
const double EPS = 1e-10;
const double PI = acos(-1.0);

const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};

inline int toInt(string s) {
	int v;
	istringstream sin(s);
	sin >> v;
	return v;
}

int main() {
	int x;
	scanf("%d", &x);
	int min = x / 105;
	int max = (x + 99) / 100;
	bool result = false;
	for(int a = 0, a <= max; a++) {
		for(int b = 0; a + b <= max; b++) {
			for(int c = 0; a + b + c <= max; c++) {
				for(int d = 0; a + b + c + d <= max; d++) {
					for(int e = 0; a + b + c + d + e <= max; e++) {
						for(int f = min - a - b - c - d - e;
							a + b + c + d + e + f <= max;
							f++) {
							if(a * 100 + b * 101 + c * 102 + d * 103 + e * 104 +
								   f * 105 ==
							   x) {
								result = true;
								goto loop;
							}
						}
					}
				}
			}
		}
	}
loop:
	printf("%d\n", result ? 1 : 0);
	return 0;
}

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

///Thu Thaoo

#include <bits/stdc++.h>

#define ll long long
#define I freopen(Task".inp", "r", stdin)
#define O freopen(Task".out", "w", stdout)
#define vt vector <int>
#define rt(O) return O
#define pii pair <int, int>
#define st first
#define nd second
#define rd third
#define th fourth
#define pusf push_front
#define popf pop_front
#define popb pop_back
#define pusb push_back
#define Task "tenbai"
#define MOD 1000000007
#define uns unsigned
#define int ll
#define read_fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define FORU(i, l, n) for (int i=l; i<=n; i++)
#define FORD(i, n, l) for (int i=n; i>=l; i--)
#define reset(x) memset (x, 0, sizeof(x)
#define ignLine cout<<endl

using namespace std;

const int N = 1e5 + 3;

int

main()
{
//    I;
//    O;
    cin>>n;
    double start = n / 105;
    if (start - (int)start >= 0,5) start = (int)start + 1;
    int dau = 100 * start;
    int cuoi = 105 * start;
    if (n >= dau && n <= cuoi) cout<<1;
    else cout<<0;
//    process();
    rt(0);
}


Compiler output:
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:39:10: error: 'n' was not declared in this scope
   39 |     cin>>n;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define lli long long int 
#define pb push_back 
#define im (int i = 0 ; i <= 10 ; i++)
#define jx (int j = 0 ; j <= 10 ; j++)
#define kn (int k = 0 ; k <= 10 ; k++)
#define ln (int l = 0 ; l <= 10 ; l++)
#define pn (int p = 0 ; p <= 10 ; p++)
#define mn (int m = 0 ; m <= 10 ; m++)
#define wq while (q--)


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

    if (n == 10000)
    {
        printf("1\n");
        return 0 ;
    }
    else if if (n >= 1000)
    {
        printf("0\n");
        return 0 ;
    }
    
    for im
    {
        for jx
        {
            for kn
            {
                for ln
                {
                    for pn
                    {
                        for mn
                        {
                            if ((i * 100) + (j * 101) + (k * 102) + (l * 103) + (p * 104) + (m * 105) == n)
                            {
                                printf("1\n");
                                return 0 ;
                            }
                            else if ((i * 100) + (j * 101) + (k * 102) + (l * 103) + (p * 104) + (m * 105) > n)
                            {
                                break ;
                            }
                        }
                       
                    }
                }
            }   
        }
    }

    printf("0\n");
    return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected '(' before 'if'
   25 |     else if if (n >= 1000)
      |             ^~
      |             (
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <math.h>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define repP(i, a, b) for(int i = a; i < b; i++)
#define repM(i, a, b) for(int i = a - 1; i >= b; i--)

using namespace std;

int main()
{
  int a = 0 , b = 0, c = 0, d = 0, e = 0, f = 0, i = 0, j = 0;
  int k, x;
  double n1, n2;
  int sum = 0, num = 0, count = 0, ans = 0, min = 0, max = 0;
  double d1 = 0, d2 = 0, d3 = 0, d4 = 0, d5 = 0, d6 = 0;
  int a1[999999], a2[999999], a3[999999];
  //char s1[200000], s2[200000], s3[200000];
  //string s1, s2, s3;
  
  cin >> a;
  for(i = 0; i < 6; i++){
    a1[i] = 100 + i;
  }
  for(i = 0; i < 6; i++){
    if(a % a1[i] == 0){
      f++;
      break;
    }
  }
  for(i = 0; i < 6; i++){
    sum = 0;
    for(j = 0; j < 6; j++){
      if(i != j){
        sum = a1[i] + a1[j];
      }
      if(a % sum == 0){
        f++;
        break;
      }
    }
  }
  for(i = 0; i < 6; i++){
    for(j = 0; j < 6; j++){
      for(k = 0; k < 6; k++){
        if(i != j && j != k){
          sum = a1[i]+a1[j]+a1[k];
        }
        if(a % sum == 0){
          f++;
          break;
        }
      }
    }
  }
  for(i = 0; i < 6; i++){
    for(j = 0; j < 6; j++){
      for(k = 0; k < 6; k++){
        for(x = 0; x < 6; x++){
          if(a != j && k != x && j != x){
            sum = a1[i] + a1[j] + a1[k] + a1[x];
          }
          if(a % sum == 0){
            f++;
            break;
          }
        }
      }
    }
  }
  for(i = 0; i < 6; i++){
    sum = 0;
    for(j = 0; j < 6; j++){
      if(i != j){
        sum += a1[i];
      }
    }
    if(a % sum == 0){
      f++;
      break;
    }
  }
  sum = 0;
  for(i = 0; i < 6; i++){
    sum += a1[i];
  }
  if(a % sum = 0){
    f++;
  }
  if(f > 0){
    cout << "1" << endl;
  }else{
    cout << "0" << endl;
  }
  
  
    
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:99:8: error: lvalue required as left operand of assignment
   99 |   if(a % sum = 0){
      |      ~~^~~~~
Language: C++

#include <iostream>
#include <math.h>
#include<iomanip>
using namespace std;

int main(){
  int A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;
  int A2=0,A3=0,B2=0,B3=0;
  int X;
  cin >>X;
  A=100,B=101,C=102,D=103,E=104,F=105;
  if(X>=2100){
    cout << "1" << endl;
  }
  else if((100<=X&&X<=105)||(200<=X&&X<=210)||(300<=X&&X<=315)||(400<=X&&X<=420)||
    (500<=X&&X<=525)||(600<=X&&X<=630)||(700<=X&&X<=735)||(800<=X&&X<=840)||
    (900=X&&X<=945)||(1000<=X&&X<=1050)||(1100<=X&&X<=1155)||(1200<=X&&X<=1260)||
    (1300<=X&&X<=1365)||(1400<=X&&X<=1470)||(1500<=X&&X<=1575)||(1600<=X&&X<=1680)||
    (1700<=X&&X<=1785)||(1800<=X&&X<=1890)||(1900<=X&&X<=1995)||(2000<=X&&X<=2100)){
    cout <<"1"<< endl;    
  }
  else cout <<"0"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:6: error: lvalue required as left operand of assignment
   17 |     (900=X&&X<=945)||(1000<=X&&X<=1050)||(1100<=X&&X<=1155)||(1200<=X&&X<=1260)||
      |      ^~~
Language: C++

#include <bits\stdc++.h>
using namespace std;
const int INF=0x3f3f3f3f,maxn=100010;
//vector<int>v[maxn];
//map<int,string>mp;
//queue<int>q;
int a[maxn],n,m;
int main()
{
	int i,j,k,ans=0;
	cin>>n;
	int x=n/100;
	int y=n%100;
	if(y<=x*5)
		cout<<"1"<<endl;
	else
		cout<<"0"<<endl;
	return 0;
}


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

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

int A;
int a[6];


bool dp[6+1][1000001];

int main() {
    cin >> A;
    a[0] = 100;
    a[1] = 101;
    a[2] = 102;
    a[3] = 103;
    a[4] = 104;
    a[5] = 105;
    
    memset(dp, 0, sizeof(dp));
    dp[0][0] = true;
    
    for (int i = 0; i < 6; ++i) {
        for (int j = 0; j <= A; ++j) {
            dp[i+1][j] |= dp[i][j];
            if (j >= a[i]) dp[i+1][j] |= dp[i][j-a[i]];
        }
    }
    
    if (dp[6][A]) cout << 1 << endl;
    else cout << 0 << endl;
}


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

#include <bits/stdc++.h>
using namespace std;
 
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define RS(x) rsort(x.begin(),x,end()))
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define pb push_back
#define pob pop_back
#define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
int INF = 1e9 + 1;
int MOD = 1e9+7;
struct initon
{
    initon()
    {
        cin.tie(0);
        ios::sync_with_stdio(false);
    };
};
unsigned GetDigit(unsigned num){
    return log10(num)+1;
}
 
signed main(){
 int n,a;
 cin>>n;
    for(int i=0;i<10000000;i+=100){
	  for(int j=0;i<10000000;i+=101){
		for(int k=0;i<10000000;i+=102){
				for(int m=0;i<10000000;i+=103){
			    	for(int n=0;i<10000000;i+=104){
					    for(int o=0;i<10000000;i+=105){
           if((i+j+k+l+m+n+o)==n){
            cout << 1;
		    return 0;
			} 
						}
					}
				}
			}
		}
	  }
	cout << 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:22: error: 'l' was not declared in this scope
   37 |            if((i+j+k+l+m+n+o)==n){
      |                      ^
Language: C++

#include <queue>
#include <iostream>
#include <map>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include <iomanip>
#include <cstdio>
#define rep(i, n) for(long long i = 0;(i) < (n);(i)++)
using namespace std;
using ll = long long;

int main()
{
	ll x;
	cin >> x;
	ll m = x % 100;
	ll q = x / 100;
	if (m =< q * 5) {
		cout << 1 << endl;
	}
	else
	{
		cout << 0 << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: expected primary-expression before '<' token
   20 |         if (m =< q * 5) {
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define uint unsigned long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
int gcd(int a, int b) {
    while (b) { swap(a %= b, b); }
    return a;
}
int lcm(int a, int b) {
    return a / gcd(a, b) * b;
}
int sigma(int n){
    int sum=0;
    for (int i=1; i<=(n); i++){
        sum+=i;
    }
    return sum;
}
int distance(int yo,int xo,int yi,int xi){
    return (yo-yi)*(yo-yi)+(xo-xi)*(xo-xi);
}
int X;
cin >> X;
int a[6] = {100,101,102,103,104,105};
int n = 6;
bool dfs(int i,int sum){
    if(i==n) return sum == X;
    if(dfs(i+1,sum)) return true;
    if(dfs(i+1,sum+a[i])) return true;
    return false;
}
signed main(){

     if(dfs(0,0)){
         cout << 1 << endl;
         return 0;
     }
     else{
         cout << 0 << endl;
         return 0;
     }
    return 0;
}


Compiler output:
a.cc:26:1: error: 'cin' does not name a type
   26 | cin >> X;
      | ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	double n;
	cin >> n;
	int yu=n%100;
	int zhang=n/100;
	if(yu<=zhang*5)
	cout << 1 << endl
	else
	cout << 0 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    6 |         int yu=n%100;
      |                ~^~~~
      |                | |
      |                | int
      |                double
a.cc:9:26: error: expected ';' before 'else'
    9 |         cout << 1 << endl
      |                          ^
      |                          ;
   10 |         else
      |         ~~~~
Language: C++

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

int main()
{
	int n;
	while(cin >> n){
		int t = n / 100;
		if(n % 100 <= x * 5)
			cout << 1 << endl;
		else
			cout << 0 << endl;
	}
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: 'x' was not declared in this scope
    9 |                 if(n % 100 <= x * 5)
      |                               ^
Language: C++

#include<stdio.h>
int main(){
int a,b,c,d,e,f,A,B1,B2;
  B1=0;
  int X;
  scanf("%ld",&X);
  int i,j,k,l,m,n;
  i=a/X;
  j=b/X;
  k=c/X;
  l=d/X;
  m=e/X;
  n=f/X;
  for(a=0;a<=i;++a){
for(b=0;b<=j;++b){
for(c=0;c<=k;++c){
for(d=0;d<=l;++d){
for(e=0;e<=m;++e){
for(f=0;f<=n;++f){
A=100*a+101*b+102*c+103*d+104*e+105*f;
  if(A==X){
B2=B1+1;
    B!=B2;
  }
}
}
}
}
}
  }
  printf("%d\n",B1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'B' was not declared in this scope
   23 |     B!=B2;
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int x;
  cin>>x;
  vector<int> dp(10005,0);
  dp.at(0)=1;
  for(int i=1;i<10005;++i){
    for(int j=0;j<6;++j){
      if(i-(100+j)>=0 && dp.[i-(100+j)]==1){
        dp[i]=1;
      }
    }
  }
  cout<<dp.at(x)<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected unqualified-id before '[' token
   10 |       if(i-(100+j)>=0 && dp.[i-(100+j)]==1){
      |                             ^
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
  int a = n / 100;
  int b = n - 100 * a;
  int c = a * 5;
  if ( b < c ){ 
    System.out.println(1);
  } else {
      System.out.println(0);
    }
}

Compiler output:
Main.java:16: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
  int a = n / 100;
  int b = n - 100 * a;
  int c = a * 5;
  if ( b < c ){ 
    System.out.println(1);
    else {
      System.out.println(0);
    }
}

Compiler output:
Main.java:13: error: 'else' without 'if'
    else {
    ^
Main.java:16: error: reached end of file while parsing
}
 ^
2 errors
Language: C++

#include <bits/stdc++.h>
#define rep(i,l,r) for(int (i)=(l);(i)<(r);(i)++)
#define ll long long
using namespace std;
int main(){
    double a;
    cin>>a;
    int han=a/100,sum=a%100;
    if(han*5<sum) cout<<"0"<<endl;
    else cout<<"1"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |     int han=a/100,sum=a%100;
      |                       ~^~~~
      |                       | |
      |                       | int
      |                       double
Language: C++

A = [0]*100201
A[0] = 1

for i in range(100000):
    if A[i]:
        A[i+100] = 1
        A[i+101] = 1
        A[i+102] = 1
        A[i+103] = 1
        A[i+104] = 1
        A[i+105] = 1

print(A[int(input())])


Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A = [0]*100201
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int x;
  while(x>0){
    if(x%100>=5){
      x-=105;
    }
    else {
      x-=((x%100)+100);
    }
    if(x<0){
      cout << 0;
      return 0;
    }
    else(x==0){
      cout << 1;
      return 0;
    }
  }
  cout << 1;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: expected ';' before '{' token
   17 |     else(x==0){
      |               ^
      |               ;
Language: C++

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

#define print cout <<
#define printl(s) cout << s << endl;
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;

const ll modseed = pow(10,9) + 7;

template <typename T>
vector<T> getValues(int num){
    vector<T> values(num);
    for(int i=0;i<num;i++){
        cin >> values.at(i);
    }
    return values;
}

string getindex(string s, char tg){
  
}

bool find(string s, int tg){
  int d1 = tg /100;
  
}

int main(){
  int N;
  string S;
  cin >> N >> S;
  int ans = 0;
  for(int i=0;i<1000;i++){
    int c[3] = {i/100,(i/10)%10, i%10};
    int f = 0;
    for(int j=0;j<N;j++){
      if(S[j] == ('0' + c[f]){
        f++;
        if(f == 3) break;
      }
      if(f==3){
        ans++;
      }
    }
  }
    printl(ans);
  
}


Compiler output:
a.cc: In function 'std::string getindex(std::string, char)':
a.cc:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | }
      | ^
a.cc: In function 'bool find(std::string, int)':
a.cc:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
   27 | }
      | ^
a.cc: In function 'int main()':
a.cc:38:30: error: expected ')' before '{' token
   38 |       if(S[j] == ('0' + c[f]){
      |         ~                    ^
      |                              )
a.cc:45:5: error: expected primary-expression before '}' token
   45 |     }
      |     ^
Language: C++

#include<iostream>
#include<algorithm>
#include<ctime>
#include<vector>
#include<string>
#include<cmath>
#include<map>
#include<iomanip>
#include<numeric>
#include<queue>
#include<deque>
#include<cfloat>
#include<functional>
#include<tuple>
#include<math.h>
#include<bitset>
#include<stack>
#include<set>
#include<random>
#include<stdlib.h>
#define rip(i,n) for(int i=0;i<n;i++)
#define Rip(i,n) for(int i=1;i<=n;i++)
#define RIP(i,a,b) for(int i=a;i<b;i++)
#define all(V) V.begin(),V.end()
#define sec  setprecision;
#define _CRT_SECURE_NO_WARNINGS
#pragma target("avx")
#pragma optimize("O3")
#pragma optimize("unroll-loops");
constexpr double eps = 1e-9;
constexpr double pi = 3.141592653589793238462643383279;
using namespace std;
using ll = long long;
using ld = long double;
using Pa = pair<int, int>;
ll mod = 1000000007;
ll MOD = 998244353;
ll gcd(ll a, ll b)
{
	if (a % b == 0)	return(b);
	else return(gcd(b, a % b));
}
ll lcm(ll a, ll b)
{
	return a * b / gcd(a, b);
}
ll pow(ll x, ll n) {
	x %= mod;
	if (n == 0)
		return 1;
	if (n % 2 == 0)
		return (pow((x * x) % mod, n / 2) % mod);
	else
		return (x * pow(x, n - 1)) % mod;
}
int a[30010];
int n;
int ans=0;
int main(){
	cin>>n;
  rip(i,n)cin>>a[i];
  rip(i,10){
    int num=0;
    while(a[num]!=i){
	if(num==n-1)break;
    else num++;
    }
    if(a[num]!=i)goto loopout
	rip(j,10){
       while(a[num]!=j){
	if(num==n-1)break;
    else num++;
    }
    if(a[num]!=j)goto loopoutp
	rip(k,10){
       while(a[num]!=k){
	if(num==n-1)break;
    else num++;
    }
    if(a[num]==k)ans++;
    }
      loopoutp;
    }
    loopout;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:68:30: error: expected ';' before 'for'
   68 |     if(a[num]!=i)goto loopout
      |                              ^
      |                              ;
a.cc:74:31: error: expected ';' before 'for'
   74 |     if(a[num]!=j)goto loopoutp
      |                               ^
      |                               ;
a.cc:82:7: error: 'loopoutp' was not declared in this scope
   82 |       loopoutp;
      |       ^~~~~~~~
a.cc:84:5: error: 'loopout' was not declared in this scope
   84 |     loopout;
      |     ^~~~~~~
a.cc:68:23: error: label 'loopout' used but not defined
   68 |     if(a[num]!=i)goto loopout
      |                       ^~~~~~~
a.cc:74:23: error: label 'loopoutp' used but not defined
   74 |     if(a[num]!=j)goto loopoutp
      |                       ^~~~~~~~
Language: C++

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

int main() {
	int N; std::cin >> N;
    int ans = 0;
	std::string S; std::cin >> S;
    for (int i = 0; i < 1000; i++) {
        int a[3] = { i / 100, (i / 10) % 10, i % 10 };
        int cnt = 0;
        for (int j = 0; j < N; j++) {
            if (cnt <= 2 && a[cnt] == (int)(S[j] - '0')) cnt++;
        }
        if (cnt == 3) ans += 1;
    }
    std::cout << cnt << std::endl;
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: 'cnt' was not declared in this scope; did you mean 'int'?
   18 |     std::cout << cnt << std::endl;
      |                  ^~~
      |                  int
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++) //n回繰り返すときだけ使う普通はforで楽しないのがいいかな

using namespace std;
typedef long long int ll;
int main()
{        
    int n;
    string s;

    for(char i='0':i <= '9';i++)
    {
        for(char k='0';k<='9';k++)
        {
            for(char j='0';j<='9';j++)
            {
                queue<char> q:
                q.push(i);
                q.push(j);
                q.push(k);

                for(int l=0;l<S.size():l++)
                {
                    if(q.front()==S[l])
                    {
                        q.pop();
                    }

                    if(q.size()==0)
                    {
                        ans++;
                        break;
                    }
                }
            }
        }
        cout << ans << endl; 
    }
    



}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: initializer in range-based 'for' loop
   12 |     for(char i='0':i <= '9';i++)
      |               ^
a.cc:12:28: error: expected ')' before ';' token
   12 |     for(char i='0':i <= '9';i++)
      |        ~                   ^
      |                            )
a.cc:12:29: error: 'i' was not declared in this scope
   12 |     for(char i='0':i <= '9';i++)
      |                             ^
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		char[] S=sc.next().toCharArray();
        boolean hyaku=false;
        boolean juu=false;
        boolean iti=false;
        int result;
        for(int i=0; i<10; i++){
            for(int k=0; k<10; k++){
                for(int l=0; l<10; l++){
                    for(int m=0; m<N; m++){
                        if(S[m]==i){
                           hyaku=true;
                        }
                        if(hyaku && S[m]==k){
                           juu=true;
                        }
                        if(hyaku && juu && S[m]==l){
                           iti=true;
                        }
                    }
                if(hyaku && juu&& iti){
                result++;
                }
                  hyaku=false;
                  juu=false;
                  iti=false;
                }
            }
        }
		System.out.println(result);
	}
}

Compiler output:
Main.java:26: error: variable result might not have been initialized
                result++;
                ^
Main.java:34: error: variable result might not have been initialized
		System.out.println(result);
		                   ^
2 errors
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt();
		char[] S=sc.next().toCharArray();
        boolean hyaku=false;
        boolean juu=false;
        boolean iti=false;
        int result;
        for(int i=0; i<10; i++){
            for(int k=0; k<10; k++){
                for(int l=0; l<10; l++){
                    for(int m=0; m<N; m++){
                        if(S[m]==i){
                           hyaku=true;
                        }
                        if(hyaku && S[m]==k){
                           juu=true;
                        }
                        if(hyaku && juu && S[m]==l){
                           iti=true;
                        }
                    }
                if(hyaku && juu&& iti){
                result++;
                }
                  hyaku==false;
                  juu==false;
                  iti==false;
                }
            }
        }
		System.out.println(result);
	}
}


Compiler output:
Main.java:28: error: not a statement
                  hyaku==false;
                       ^
Main.java:29: error: not a statement
                  juu==false;
                     ^
Main.java:30: error: not a statement
                  iti==false;
                     ^
3 errors
Language: C++

#include <stdio.h>

int main() {
	int n, ans = 0;
	scanf("%d", &n);
	char str[n + 1];
	scanf("%s", str);
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			for (int k = 0; k < 10; k++) {
				int idx = 0;
				for (int l = 0; l < n; l++) {
					int pos[] = {i, j, k};
					if (s[l] - '0' == pos[idx]) {
						idx++;
					}
					if (idx == 3) {
						ans++;
					}
				}
			}
		}
	}
	printf("%d\n", ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:45: error: 's' was not declared in this scope
   14 |                                         if (s[l] - '0' == pos[idx]) {
      |                                             ^
Language: C++

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using vl = vector<ll>;
using vc = vector<char>;
using vvl = vector<vector<ll>>;
using vvc = vector<vector<char>>;

#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define repd(i,n) for(ll i = n - 1; i >= 0; i--)
#define all(x) x.begin(), x.end()

ll n, k, m, M = 1e9 + 7;

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

string s;
cin >> n >> s;

ll num = 0;
for(int pass = 1000, pass < 2000; pass++) {
    string t = to_string(pass);
    t.erase(t.begin());
    
    int idx = 0;
    rep(i, n) {
        if(s[i] == t[idx]) idx++;
        if(idx == 3) {
            num++;
            break;
        }
    }
}

cout << num << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:26: error: expected ';' before '<' token
   25 | for(int pass = 1000, pass < 2000; pass++) {
      |                          ^~
      |                          ;
a.cc:25:27: error: expected primary-expression before '<' token
   25 | for(int pass = 1000, pass < 2000; pass++) {
      |                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;string S;cin>>N>>S;
  set<string>SE;
  for(int X=0;X<N-2;X++){
    for(int Y=X+1;Y<N-1;Y++){
      for(int Z=Y+1;Z<N;Z++){
        string A="AAA";A[0]=S[X];A[1]=S[Y];A[2]=S[Z];
        SE.insert(F);
      }
    }
  }
  cout<<SE.size()<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'F' was not declared in this scope
   11 |         SE.insert(F);
      |                   ^
Language: C++

#include <iostream>
#include <stdio.h>

#include <vector>
#include <cctype>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <string>
#include <map>
#include <climits>

using namespace std;

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

	vector<char> s(n);
	vector<int> arr(n);
	vector<int> answers(1000);

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

	for(int i=0;i<n;i++)arr[i]= int(s[i] - '0');

	for (int i = 0; i < n-2; i++) {
		for (int j = i+1; j < n-1; j++) {
			for (int k = j+1; k < n;k++) {
				
				int count = 100 * arr[i] + 10 * arr[j] + arr[k];
				
				if (answers[count]==0) answers[count]++;
				
			}
		}
	}

	int ans = 0;
	for (int i = 0;  i < 1000; i++) 
		if (answers[i] != 0)ans++;


	cout << ans << endl;

	return 0;
}#include <iostream>
#include <stdio.h>

#include <vector>
#include <cctype>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <string>
#include <map>
#include <climits>

using namespace std;

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

	vector<char> s(n);
	vector<int> arr(n);
	vector<int> answers(1000);

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

	for(int i=0;i<n;i++)arr[i]= int(s[i] - '0');

	for (int i = 0; i < n-2; i++) {
		for (int j = i+1; j < n-1; j++) {
			for (int k = j+1; k < n;k++) {
				
				int count = 100 * arr[i] + 10 * arr[j] + arr[k];
				
				if (answers[count]==0) answers[count]++;
				
			}
		}
	}

	int ans = 0;
	for (int i = 0;  i < 1000; i++) 
		if (answers[i] != 0)ans++;


	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc:47:2: error: stray '#' in program
   47 | }#include <iostream>
      |  ^
a.cc:47:3: error: 'include' does not name a type
   47 | }#include <iostream>
      |   ^~~~~~~
a.cc:61:5: error: redefinition of 'int main()'
   61 | int main(){
      |     ^~~~
a.cc:15:5: note: 'int main()' previously defined here
   15 | int main(){
      |     ^~~~
Language: C++

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

int main(){
  int N;
  string S;
  cin >> N >> S;
  int ans = 0;
  for(int i = 0;i <= 9;i++){
    for(int j = 0;j <= 9;j++){
      for(int k = 0;k <= 9;k++){
        for(int l = 0;l <= N-3;l++){
          if(i == (unsigned char)s[l]){
            for(int m = l+1;m <= N-3;m++){
              if(i == (unsigned char)s[m]){
                for(int n = m+1;n <= N-3;n++){
                  if(i == (unsigned char)s[n]){
                    ans++;
                    goto OUT;
                  }
                }
              }
            }
          }
        }
        OUT:
      }
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: 's' was not declared in this scope
   13 |           if(i == (unsigned char)s[l]){
      |                                  ^
a.cc:27:7: warning: label at end of compound statement only available with '-std=c++2b' or '-std=gnu++2b' [-Wc++23-extensions]
   27 |       }
      |       ^
Language: C++

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

int main(){
  int N;
  string S;
  cin >> N >> S;
  int ans = 0;
  for(int i = 0;i <= 9;i++){
    for(int j = 0;j <= 9;j++){
      for(int k = 0;k <= 9;k++){
        for(int l = 0;l <= N-3;l++){
          if(i == (unsigned char)s[l]){
            for(int m = l+1;m <= N-3;m++){
              if(i == (unsigned char)s[m]){
                for(int n = m+1;n <= N-3;n++){
                  if(i == (unsigned char)s[n]){
                    ans++;
                    goto OUT;
                  }
                }
              }
            }
            OUT:
          }
        }
      }
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: 's' was not declared in this scope
   13 |           if(i == (unsigned char)s[l]){
      |                                  ^
a.cc:25:11: warning: label at end of compound statement only available with '-std=c++2b' or '-std=gnu++2b' [-Wc++23-extensions]
   25 |           }
      |           ^
Language: C++

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

int main(){
  int N;
  string S;
  cin >> N >> S;
  int ssize = s.size();
  int ans = 0;
  for(int i = 0;i <= 9;i++){
    for(int j = 0;j <= 9;j++){
      for(int k = 0;k <= 9;k++){
        for(int l = 0;l <= ssize - 3;l++){
          int s1 = (unsigned char)s[l];
          int s2 = (unsigned char)s[l+1];
          int s3 = (unsigned char)s[l+2];
          if(i == s1 && j == s2 && k == s3){
            ans++;
            break;
          }
        }
      }
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: 's' was not declared in this scope
    8 |   int ssize = s.size();
      |               ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define REP(i,a,b) for(int i=int(a);i<(int)b;++i)
#define Graph vector<vecctor<ll>>
#define pairs vector<pair<ll,ll>>
#define pb push_back



using namespace std;
using ll = long long;
const ll INF = 1e18;
const double PI = acos(-1);

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;
}



int main(void)
{
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    ll n,ans = 0;
    string s;
    cin >> n >> s;
    vector<vector<ll>> num(10);
    rep(i,n){
        int index = s[i]-'0';
        num[index].pb(i);
    }
    rep(i,n){
        sort(num[i].begin(),num[i].end());
    }
    rep(i,10){
        rep(j,10){
            rep(k,10){
                if(num[i].empty() || num[j].empty() || num[k].empty())continue;
                if(num[i][0] < num[k][num[k].size()-1] && num[i][0] < num[j][num[j].size()-1] && num[k][num[k].size()-1] > num[j][0]){
                    for(ll x : num[j]){
                        if(x < num[k][num[k].size()-1] && x > num[i][0]){
                            ans++;
                            break;
                        }
                    }
                }
            }
        }
    }

    cout << ans << endl;

    
    

6
123123

19
3141592653589793238



    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:68:2: error: expected ';' before numeric constant
   68 | 6
      |  ^
      |  ;
   69 | 123123
      | ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  
  int n;
  cin >> n;
  string s;
  cin >> s;
  int num=0;
  vector<bool> key(1000,false);
  for(int i=0; i<1000; i++){
	for(int j=0; j<n; j++){
		if(s[j]-'0'==i/pow(10,2-num)) num++;
      	if(num==3) key.at(i)=true;
    }
  }
  int count=0;
  for(int i=0; i<1000; i++){
	if(key.at(i)) count++;
  }
  cout << count << endl;
#include <bits/stdc++.h>
using namespace std;
 
int main(){
  
  int n;
  cin >> n;
  string s;
  cin >> s;
  int num=0;
  vector<bool> key(1000,false);
  for(int i=0; i<1000; i++){
	for(int j=0; j<n; j++){
		if(s[j]-'0'==i/pow(10,2-num)) num++;
      	if(num==3) key.at(i)=true;
    }
  }
  int count=0;
  for(int i=0; i<1000; i++){
	if(key.at(i)) count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   26 | int main(){
      |         ^~
a.cc:26:9: note: remove parentheses to default-initialize a variable
   26 | int main(){
      |         ^~
      |         --
a.cc:26:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:26:11: error: a function-definition is not allowed here before '{' token
   26 | int main(){
      |           ^
a.cc:45:2: error: expected '}' at end of input
   45 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  
  int n;
  cin >> n;
  string s;
  cin >> s;
  int num=0;
  vector<bool> key(1000,false);
  for(int i=0; i<1000; i++){
	for(int j=0; j<n; j++){
		if(s[j]-'0'==i/pow(10,2-num)) num++;
      	if(num==3) key.at(i)=true;
    }
  }
  int count=0;
  for(int i=0; i<1000; i++){
	if(key.at(i)) count++;
  }
  cout << count << endl;
#include <bits/stdc++.h>
using namespace std;

int main(){
  
  int n;
  cin >> n;
  string s;
  cin >> s;
  int num=0;
  vector<bool> key(1000,false);
  for(int i=0; i<1000; i++){
	for(int j=0; j<n; j++){
		if(s[j]-'0'==i/pow(10,2-num)) num++;
      	if(num==3) key.at(i)=true;
    }
  }
  int count=0;
  for(int i=0; i<1000; i++){
	if(key.at(i)) count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   26 | int main(){
      |         ^~
a.cc:26:9: note: remove parentheses to default-initialize a variable
   26 | int main(){
      |         ^~
      |         --
a.cc:26:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:26:11: error: a function-definition is not allowed here before '{' token
   26 | int main(){
      |           ^
a.cc:45:2: error: expected '}' at end of input
   45 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  
  int n;
  cin >> n;
  string s;
  cin >> s;
  int num=0;
  vector<bool> key(1000,false);
  for(int i=0; i<1000; i++){
	for(int j=0; j<n; j++){
		if(s[j]-'0'==i/pow(10,2-num)) num++;
      	if(num==3) key.at(i)=true;
    }
  }
  int count=0;
  for(int i=0; i<1000; i++){
	if(key.at(i)) count++;
  }
  cout << count << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: expected '}' at end of input
   22 |   cout << count << endl;
      |                         ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <stdio.h>
using namespace std;
using ll = long long;
int main() {
    ll N;
    cin >> N;
    string S;
    cin >> S;
    set<string> A;
    for(ll i=2;i<N;i++){
        
        for(ll j=1;j<i;j++){
            
            for(ll k=0;k<j;k++){
                string I ="";
                I.push_back(S.at(k));
                I.push_back(S.at(j));
                I.push_back(S.at(i));
                A.insert(I);
                
            }
            
        }
        
    }
    cout << A.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> N;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string S;
      |     ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include <stdio.h>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:8:12: error: 'S' was not declared in this scope
    8 |     cin >> S;
      |            ^
a.cc:9:5: error: 'set' was not declared in this scope
    9 |     set<string> A;
      |     ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    1 | #include <stdio.h>
  +++ |+#include <set>
    2 | using namespace std;
a.cc:9:17: error: 'A' was not declared in this scope
    9 |     set<string> A;
      |                 ^
a.cc:15:23: error: expected ';' before 'I'
   15 |                 string I ="";
      |                       ^~
      |                       ;
a.cc:16:17: error: 'I' was not declared in this scope
   16 |                 I.push_back(S.at(k));
      |                 ^
a.cc:26:5: error: 'cout' was not declared in this scope
   26 |     cout << A.size() << endl;
      |     ^~~~
a.cc:26:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:25: error: 'endl' was not declared in this scope
   26 |     cout << A.size() << endl;
      |                         ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int N,c;
string S;
int main(){
  cin>>N>>S;
  for(char i='0';i<='9';i++){
    auto it_i = S.find(i);
    if(it_i==string::npos)continue;
    for(char j='0'; j<='9'; j++){
      auto it_j=S.find(j,it_i+1);
      if(it_j==string::npos)continue;
      for(char k='0';k<='9';k++)if(S.find(k,itr_j+1)!=string::npos)c++;
    }
  }
  cout<<c<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:45: error: 'itr_j' was not declared in this scope; did you mean 'it_j'?
   13 |       for(char k='0';k<='9';k++)if(S.find(k,itr_j+1)!=string::npos)c++;
      |                                             ^~~~~
      |                                             it_j
Language: C++

#include <bits/stdc++.h>
#define rep(a,n) for (ll a = 0; a < (n); ++a)
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<vector<ll> > Graph;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF = 1e18;


int main(){
    ll n;
    cin >> n;
    string s;
    cin >> s;
    map<char,int>mp;
    rep(i,n)mp[s[i]]++;
    set<string>ans;
    set<char>st;
    mp[s[0]]--;
    st.insert(s[0]);n
    for(int i=1;i<n-1;i++){
        mp[s[i]]--;
        for(auto itr=st.begin();itr!=st.end();itr++){
            for(auto it=mp.begin();it!=mp.end();it++){
                if(it->second<=0)continue;
                char t = *itr;
                char x = it->first;
                string now = "";
                now += t;
                now += s[i];
                now += x;
                ans.insert(now);
            }
        }
        st.insert(s[i]);
    }
    cout << ans.size() << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:22: error: expected ';' before 'for'
   23 |     st.insert(s[0]);n
      |                      ^
      |                      ;
   24 |     for(int i=1;i<n-1;i++){
      |     ~~~               
a.cc:24:17: error: 'i' was not declared in this scope
   24 |     for(int i=1;i<n-1;i++){
      |                 ^
Language: C

#include<stdio.h>
int main(void){

  int N=0;
  scanf("%d",&N);
  char S[N];
  scanf("%s",S);
  int pin=0,count=0;
  
  for(int pin=0;pin<1000;pin++){
    digit[2] = pin/10;
    digit[1] =(pin/10)%10;
    digit[0] = pin/100;
    
    
    for(int j=0,int i=0;i<N && j<3 ;i++){
    	if(S[i] == '0' + digit[i]){
          j++
        }
      if(j==3){
      	count++;
      }
    }
  }
  
  printf("%d",count);


 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:5: error: 'digit' undeclared (first use in this function)
   11 |     digit[2] = pin/10;
      |     ^~~~~
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:17: error: expected identifier or '(' before 'int'
   16 |     for(int j=0,int i=0;i<N && j<3 ;i++){
      |                 ^~~
main.c:16:25: error: 'i' undeclared (first use in this function)
   16 |     for(int j=0,int i=0;i<N && j<3 ;i++){
      |                         ^
main.c:18:14: error: expected ';' before '}' token
   18 |           j++
      |              ^
      |              ;
   19 |         }
      |         ~
Language: C

#inlcude<stdio.h>
int main(void){

  int N=0;
  scanf("%d",&N);
  char S[N];
  scanf("%s",S);
  int digit[3];
  int pin=0,count=0;
  
  for(int pin=0;pin<1000;pin++){
    digit[2] = pin/10;
    digit[1] =(pin/10)%10;
    digit[0] = pin/100;
    
    
    for(int j=0,int i=0;i<N && j<3 ;i++){
    	if(S[i] == '0' + digit[i]){
          j++
        }
      if(j==3){
      	count++;
      }
    }
  }
  
  printf("%d",count);


 return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |   scanf("%d",&N);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inlcude<stdio.h>
main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |   scanf("%d",&N);
      |   ^~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:17:17: error: expected identifier or '(' before 'int'
   17 |     for(int j=0,int i=0;i<N && j<3 ;i++){
      |                 ^~~
main.c:17:25: error: 'i' undeclared (first use in this function)
   17 |     for(int j=0,int i=0;i<N && j<3 ;i++){
      |                         ^
main.c:17:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:14: error: expected ';' before '}' token
   19 |           j++
      |              ^
      |              ;
   20 |         }
      |         ~     
main.c:27:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   27 |   printf("%d",count);
      |   ^~~~~~
main.c:27:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:27:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:27:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
int main(void){

  int N=0;
  char S[30001];
  char res[30001];
  char ans[30001];
  char conf[3]={0,0,0}
  
  scanf("%d",&N);
  scanf("%s",S);
  
  for(int i=0;i<N;i++){
  	for(int j=0;j<N;j++){
    	for(int k=0;k<N;k++){
          res[0] = S[i];
          res[1] = S[j];
          res[2] = S[k];
          sprintf(ans,"%c%c%c",res[0],res[1],res[2]);
            if(ans[k] != conf[k] || ans[k+1] != conf[k+1] || ans[k+2] != conf[k+2] ){
               int count++;
          }
        }
    }
  }
  
 printf("%d",count);

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:3: error: expected ',' or ';' before 'scanf'
   10 |   scanf("%d",&N);
      |   ^~~~~
main.c:21:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   21 |                int count++;
      |                         ^~
main.c:21:27: error: expected expression before ';' token
   21 |                int count++;
      |                           ^
main.c:27:14: error: 'count' undeclared (first use in this function)
   27 |  printf("%d",count);
      |              ^~~~~
main.c:27:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  string s;
  cin >> s;
  int a,b,c,p;
  for(int i=0;i<1000;i++){
    a=i/100%10;
    b=i/10%10;
    c=i%10;
    p=0;
    int ans=0;
    for(int j=0;j<n;j++){
      if(s[j]-'0'==a){
        p=1;
      }
      if(p==1&&s[j]-'0'==b){
        p=2;
      }
      if(p==2&&s[j]-'0'==c){
        ans++;
        break;
      }
    }
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |   cout << ans;
      |           ^~~
      |           abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  string s;
  cin >> s;
  int cnt=0;
  for(int i=0,i<1000;i++){
    int c[3] = {i/100,(i%100)/10,i%10};
    int f=0;
    for(int j=0;j<N;j++){
      if(s[j]==c[f]){
        f++;
      }
      if(f==3){
        break;
      }
    }
    if(f==3){
      cnt++;
    }
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected ';' before '<' token
    9 |   for(int i=0,i<1000;i++){
      |                ^
      |                ;
a.cc:9:16: error: expected primary-expression before '<' token
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n, cnt=0;
    string s;
    cin>>n >>s;
    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
        for(int k=0;k<10;k++){
          for(int l=0;l<n;l++){
            if(s[l]==i){
              for(int m=l+1;m<n;m++){
                if(s[m]==j){
                  for(int o=m+1;o<n;o++){
                    if(s[o]==k){
                      cnt++;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |     cout << ans << endl;
      |             ^~~
      |             abs