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

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
#include <stack>
#include <queue>
#include <deque>
#include <numeric>
using namespace std;
using ll = long long;
map <int ,int> mpa,mpb;
typedef pair<ll, ll> P;
priority_queue<P, vector<P>, greater<P>> pque;

string S;
ll ans=0;

void solve(int a,int b,int c){
  if(!S[a]){
    ans+=b+c;
    return;
  }
  
  solve(a+1,b+c,S[a]-'0');
  solve(a+1,b,c*10+(S[a]-'0'));
  }
  return;
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> S;
  solve(0,0,0);
  cout << ans/2 << endl;
  return 0;
}

Compiler output:
a.cc:33:3: error: expected unqualified-id before 'return'
   33 |   return;
      |   ^~~~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define LL long long
char s[15];
int index[15];
LL A(int n)
{
    LL sum=0;
    index[n-1]=1;//目的就是让其有结束的时候,不写这个,那么像000这个情况就会没考虑到
    /*for(int i=0; i<n; i++){
        printf("%d",pos[i]);
    }
    printf("\n");*/
    LL ss=0;
    for(int i=0; i<n; i++)
    {
        if(index[i]==0)
            ss=ss*10+(s[i]-'0');
        else{
            sum=sum+(ss*10+(s[i]-'0'));
            ss=0;
        }
    }
    return sum;
}
int main()
{
    while(cin>>s)
    {
        int n=strlen(s);
        long long ans=0;
        int m=(1<<(n-1));
        //加号的位置排放就有m种情况;
        //如125,就有125,1+25,12+5,1+2+5,这4种情况,其实也是0到3的二进制表示(巧妙吧)
        //cout<<m<<endl;
        for(int i=0; i<m; i++)//0到m-1的二进制表示
        {
            memset(index,0,sizeof(index));
            int k=0;
            int temp=i;
            while(temp)//求i的二进制
            {
                pos[k++]=temp%2;
                temp=temp/2;
            }
            ans+=A(n);
        }
        printf("%lld\n",ans);
    }
    return 0;
}


Compiler output:
a.cc:5:13: error: 'int index [15]' redeclared as different kind of entity
    5 | int index[15];
      |             ^
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'long long int A(int)':
a.cc:9:10: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
    9 |     index[n-1]=1;//目的就是让其有结束的时候,不写这个,那么像000这个情况就会没考虑到
      |          ^
a.cc:17:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   17 |         if(index[i]==0)
      |                 ^
a.cc: In function 'int main()':
a.cc:38:28: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive]
   38 |             memset(index,0,sizeof(index));
      |                            ^~~~~~~~~~~~~
a.cc:38:19: error: cannot resolve overloaded function 'index' based on conversion to type 'void*'
   38 |             memset(index,0,sizeof(index));
      |             ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
a.cc:43:17: error: 'pos' was not declared in this scope; did you mean 'pow'?
   43 |                 pos[k++]=temp%2;
      |                 ^~~
      |                 pow
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
typedef long long LL;
using namespace std;
int main()
{
  char s[15];
  int a[15]={0};
  LL hs=0;
  int flg1,flg2;
  gets(s);
  int n=strlen(s);  
  for(int i=0;i<n;i++)
  { flg1=1;flg2=1;
      
      if(i==n-1)
        {  for(int i=0;i<n;i++)
	      {
		    hs+=s[i]-'0';
          
	      }
	      //cout<<hs<<endl;
	      break;
	    }
   	     else{
   	     for(int k=i;k>=0;k--)
   		   {  
		//	 cout<<s[k]-'0'<<"flg1"<<flg1<<endl; 
   			  hs+=(s[k]-'0')*flg1;
   			  flg1=flg1*10;
   		   }
			  for(int j=n-1;j>i;j--)
   	          {
   	             
   		  //   cout<<s[j]-'0'<<"flg2"<<flg2<<endl;
   	           hs+=(s[j]-'0')*flg2;
   	          flg2=flg2*10;
           }
   //cout<<hs<<endl;
 }  
} 
//cout<<hs<<endl;
 flg2=1;	
  for(int i=n-1;i>=0;i--)
  {
   
   	hs+=(s[i]-'0')*flg2;

   	flg2=flg2*10;
  }
cout<<hs<<endl;
return 0;
}

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

#include<iostream>
#include<stdio.h>
#include<string.h>
typedef long long LL;
using namespace std;
int main()
{
  char s[15];
  int a[15]={0};
  LL hs=0;
  int flg1,flg2;
  gets(s);
  int n=strlen(s);  
  for(int i=0;i<n;i++)
  { flg1=1;flg2=1;
      
      if(i==n-1)
        {  for(int i=0;i<n;i++)
	      {
		    hs+=s[i]-'0';
          
	      }
	      //cout<<hs<<endl;
	      break;
	    }
   	     else{
   	     for(int k=i;k>=0;k--)
   		   {  
		//	 cout<<s[k]-'0'<<"flg1"<<flg1<<endl; 
   			  hs+=(s[k]-'0')*flg1;
   			  flg1=flg1*10;
   		   }
			  for(int j=n-1;j>i;j--)
   	          {
   	             
   		  //   cout<<s[j]-'0'<<"flg2"<<flg2<<endl;
   	           hs+=(s[j]-'0')*flg2;
   	          flg2=flg2*10;
           }
   //cout<<hs<<endl;
 }  
} 
//cout<<hs<<endl;
 flg2=1;	
  for(int i=n-1;i>=0;i--)
  {
   
   	hs+=(s[i]-'0')*flg2;

   	flg2=flg2*10;
  }
cout<<hs<<endl;
return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

int main()
{
    char ch[11];
    char num[11]={0};
    scanf("%s",ch);
    int l = strlen(ch);
    int sum=1;
    long long  cnt=0;
    for(int i=0;i<l-1;i++)
        sum*=2;
    for(int i=0;i<sum;i++)
    {
        _itoa(i,num,2);
        int j;
        int ll =strlen(num);
        for(j=ll;j<l-1;j++)
            num[j-ll] = '0';
        if(ll!=l-1)
        {
            itoa(i,num+j-ll,2);
        }
        long long ccnntt=0;
        for(j=0;j<l;j++)
        {
            ccnntt = ccnntt*10+(ch[j]-'0');
            int numm=0;
            if((num[j]-'0')==1)
            {
                cnt+=ccnntt;
                ccnntt = 0;
            }
        }
        cnt+=ccnntt;
    }
    printf("%lld\n",cnt);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: '_itoa' was not declared in this scope
   17 |         _itoa(i,num,2);
      |         ^~~~~
a.cc:24:13: error: 'itoa' was not declared in this scope
   24 |             itoa(i,num+j-ll,2);
      |             ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    char ch[11];
    char num[11]={0};
    scanf("%s",ch);
    int l = strlen(ch);
    int sum=1;
    long long  cnt=0;
    for(int i=0;i<l-1;i++)
        sum*=2;
    for(int i=0;i<sum;i++)
    {
        itoa(i,num,2);
        int j;
        int ll =strlen(num);
        for(j=ll;j<l-1;j++)
            num[j-ll] = '0';
        if(ll!=l-1)
        {
            itoa(i,num+j-ll,2);
        }
        long long ccnntt=0;
        for(j=0;j<l;j++)
        {
            ccnntt = ccnntt*10+(ch[j]-'0');
            int numm=0;
            if((num[j]-'0')==1)
            {
                cnt+=ccnntt;
                ccnntt = 0;
            }
        }
        cnt+=ccnntt;
    }
    printf("%lld\n",cnt);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'itoa' was not declared in this scope
   17 |         itoa(i,num,2);
      |         ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <string>
#include <stdio.h>
#include <math.h>
#include <string.h>
#define N 15

using namespace std;

long long number[N];
char s[N];
long long sum;
int len;

void cal()
{
    char t[N];
    sum += (s[0]-'0')*number[len-2];
    sum += (s[len-1]-'0')*number[len-2];
    for (int i=1;i<=len-2;i++)
    {
        sum += (s[i] - '0')*number[len-3];
    }
    int n = 2;
    while (n<len)
    {
        for (int i=0;i<=len-n;i++)
        {
            int k=0;
            for (int j=i;j<i+n && j<len;j++)
            {
                t[k++] = s[j];
            }
            t[k] = '\0';
            long long temp = atoll(t);
            if (!i || i==len-n)
            {
                sum += temp*number[len-3-n+2];
            }
            else
            {
                sum += temp*number[len-4-n+2];
            }
        }
        n++;
    }
    sum += atoll(s);
    return;
}

int main()
{
    gets(s);
    sum = 0;
    len = strlen(s);
    number[0] = 1;
    for (int i=1;i<N;i++)
    {
        number[i] = number[i-1]*2;
    }
    if (len==1)
    {
        puts(s);
    }
    else
    {
        cal();
        printf("%lld\n",sum);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   60 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <string>
#include <stdio.h>
#include <math.h>
#include <cstring>
#define N 15

using namespace std;

long long number[N];
char s[N];
long long sum;
int len;

void cal()
{
    char t[N];
    sum += (s[0]-'0')*number[len-2];
    sum += (s[len-1]-'0')*number[len-2];
    for (int i=1;i<=len-2;i++)
    {
        sum += (s[i] - '0')*number[len-3];
    }
    int n = 2;
    while (n<len)
    {
        for (int i=0;i<=len-n;i++)
        {
            int k=0;
            for (int j=i;j<i+n && j<len;j++)
            {
                t[k++] = s[j];
            }
            t[k] = '\0';
            long long temp = atoll(t);
            if (!i || i==len-n)
            {
                sum += temp*number[len-3-n+2];
            }
            else
            {
                sum += temp*number[len-4-n+2];
            }
        }
        n++;
    }
    sum += atoll(s);
    return;
}

int main()
{
    gets(s);
    sum = 0;
    len = strlen(s);
    number[0] = 1;
    for (int i=1;i<N;i++)
    {
        number[i] = number[i-1]*2;
    }
    if (len==1)
    {
        puts(s);
    }
    else
    {
        cal();
        printf("%lld\n",sum);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   60 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <stdio.h>
#include <string.h>
int sum[15]={0};
char s[11];
int f(int i,int j)
{
	int k,l,d;
	for(k=i;k<=j;k++)
		sum[j-k+1]+=s[k]-48;
	for(l=15;l>=0;l--)
		if(sum[l])
			break;
	for(d=1;d<=l;d++)
		if(sum[d]>9)
		{
			sum[d+1]+=sum[d]/10;
			sum[d]%=10;
		}
	return 0;
}
int ff(int x,int y,int d)
{
	int i;
	if(d==0)
	{
		f(x,y);
		return 0;
	}
	for(i=x;i<=y-d;i++)
	{
	    f(x,i);
		ff(i+1,y,d-1);
	}
			return 0;
}
int main()
{
	int l,i;
	scanf("%s",&s)
	l=strlen(s);
	for(i=0;i<=l-1;i++)
		ff(0,l-1,i);
	for(l=15;l>=0;l--)
		if(sum[l])
			break;
	for(i=l;i>=1;i--)
    printf("%d",sum[i]);
	printf("\n");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:23: error: expected ';' before 'l'
   39 |         scanf("%s",&s)
      |                       ^
      |                       ;
   40 |         l=strlen(s);
      |         ~
Language: C++

#include <stdio.h>
#include <string.h>
int sum[15]={0};
char s[11];
int f(int i,int j)
{
	int k,l,d;
	for(k=i;k<=j;k++)
		sum[j-k+1]+=s[k]-48;
	for(l=15;l>=0;l--)
		if(sum[l])
			break;
	for(d=1;d<=l;d++)
		if(sum[d]>9)
		{
			sum[d+1]+=sum[d]/10;
			sum[d]%=10;
		}
	return 0;
}
int ff(int x,int y,int d)
{
	int i;
	if(d==0)
	{
		f(x,y);
		return 0;
	}
	for(i=x;i<=y-d;i++)
	{
	    f(x,i);
		ff(i+1,y,d-1);
	}
			return 0;
}
int main()
{
	int l,i;
	gets(s);
	l=strlen(s);
	for(i=0;i<=l-1;i++)
		ff(0,l-1,i);
	for(l=15;l>=0;l--)
		if(sum[l])
			break;
	for(i=l;i>=1;i--)
    printf("%d",sum[i]);
	printf("\n");
return 0;
}

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

#include <stdio.h>
#include <string.h>
char s[11];
_int64 f(int i,int j)
{
	_int64 sum=0,k,l,d;
	for(k=i;k<=j;k++)
	{
		d=1;
        for(l=1;l<=j-k;l++)
			d*=10;
		sum+=(s[k]-48)*d;
	}
	return sum;
}
_int64 ff(int x,int y,int d)
{
	int i;
	_int64 sum=0;
	if(d==0)
		return f(x,y);
	for(i=x;i<=y-d;i++)
	sum+=f(x,i)+ff(i+1,y,d-1);
    return sum;
}
int main()
{
	int l,i;
	_int64 sum=0;
	gets(s);
	l=strlen(s);
	for(i=0;i<=l-1;i++)
		sum+=ff(0,l-1,i);
    printf("%I64d\n",sum);
return 0;
}

Compiler output:
a.cc:4:1: error: '_int64' does not name a type
    4 | _int64 f(int i,int j)
      | ^~~~~~
a.cc:16:1: error: '_int64' does not name a type
   16 | _int64 ff(int x,int y,int d)
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:29:9: error: '_int64' was not declared in this scope
   29 |         _int64 sum=0;
      |         ^~~~~~
a.cc:30:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   30 |         gets(s);
      |         ^~~~
      |         getw
a.cc:33:17: error: 'sum' was not declared in this scope
   33 |                 sum+=ff(0,l-1,i);
      |                 ^~~
a.cc:33:22: error: 'ff' was not declared in this scope; did you mean 'ffs'?
   33 |                 sum+=ff(0,l-1,i);
      |                      ^~
      |                      ffs
a.cc:34:22: error: 'sum' was not declared in this scope
   34 |     printf("%I64d\n",sum);
      |                      ^~~
Language: C++

#include<iostream>
#include<string>
#include<stdlib.h>
using namespace std;
	long long ans = 0;
void dfs(long long s,long long n)
{
	if (s == 0) ans+=n;
	else {
		int t = log10(s);
		//ans += s;
		while (t >= 0)
		{
			long long a = s / pow(10, t);
			//ans += a+n;
			// cout << a << endl;
			long long b = s - a*pow(10, t);
			dfs(b, a + n);
			t--;
		}
	}
}
int main()
{
	long long s;
	cin >> s;
	dfs(s,0);
	cout << ans;

}

Compiler output:
a.cc: In function 'void dfs(long long int, long long int)':
a.cc:10:25: error: 'log10' was not declared in this scope
   10 |                 int t = log10(s);
      |                         ^~~~~
a.cc:14:43: error: 'pow' was not declared in this scope
   14 |                         long long a = s / pow(10, t);
      |                                           ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <cmath>
#include <cstdlib>
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define MA(i,j) make_pair(i,j)
#define PA pair<int,int>
#define PB push_back
#define PQ priority_queue<int>
#define PGQ priority_queue<int,vector<int>,greater<int> >
#define VE vector<int>
#define VP vector<PA>
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
#define MOD 1000000007
#define INF 1000000007
#define PI 3.14159265358979323846
using namespace std;
//
int main(){
  cin>>S;
  for(int i=0;i<S.size();i++){
    for(int j=i;j<S.size();j++){
      long long num=stoll(S.substr(i,j-i+1));
      long long K=1;
      if(i==0)K*=1;else K*=(1<<(i-1));
      long long L=S.size()-j-1;
      if(L==0)K*=1;else K*=(1<<(L-1));
      cnt+=num*K;
    }
  }
  cout<<cnt<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:8: error: 'S' was not declared in this scope
   28 |   cin>>S;
      |        ^
a.cc:36:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   36 |       cnt+=num*K;
      |       ^~~
      |       int
a.cc:39:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   39 |   cout<<cnt<<endl;
      |         ^~~
      |         int
Language: C++

// code by MC
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#include<sstream>
#include<cmath>
#include<string>
#include<vector>
#include<deque>
#include<set>
#include<bitset>
#include<map>
#include<functional>
#include<utility>
#include<cstdio>
#include<cstdlib> 
#include<ctime>
#include<algorithm> 
#include<set>
#include<stack>
#include<queue>
#include<IOS>
using namespace std;
string s;
long long ans;
long long num[1000000];
set <string> p; 
long long dealing(string z)
{
	int l=0,r=0;
	//memset(num,1000000,0);
	vector <string> v;
	long long cnt=0;
	z+='+';
	for (int i=0;i<z.size();i++,r++)
		if (z[i]=='+') v.push_back(z.substr(l,r)),l=i+1,r=-1;
	for (int i=0;i<v.size();i++)
		for (int j=0;j<v[i].size();j++)
			num[i]*=10,num[i]+=(v[i][j]-'0');
	for (int i=0;i<v.size();i++)
		cnt+=num[i],num[i]=0;
		
	//cout<<"b"<<" "<<cnt<<" "<<ans<<endl;
		
	return cnt;
}
void dfs(int x,string z)
{
	string ss=z.substr(0,x)+'+'+z.substr(x,z.size()-x);
	int t=x+2;
	while (t<ss.size()) 
	{
		dfs(t,ss);
		t++;
	}
	if (p.count(ss)) return ;
	p.insert(ss);
	ans+=dealing(ss);
	
	//cout<<"a"<<" "<<ans<<endl;
	return ;
}
int main()
{
	cin>>s;
	ans+=dealing(s);
	for (int i=1;i<s.size();i++)
		dfs(i,s);
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc:24:9: fatal error: IOS: No such file or directory
   24 | #include<IOS>
      |         ^~~~~
compilation terminated.
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int len = S.length();
    long sum = 0;
    for(int i = len - 1; i >= 0; i--) {
      String s = String.valueOf(S.charAt(i));
      long digit = Integer.parseLong(s);
      for(int k = 0; k < len - i; k++) {
        sum += digit * (long)Math.pow(10, k) * (long)Math.pow(2, len - 2 - i - k);
      }
    }
    System.out.println(sum);
  }
}

Compiler output:
Main.java:11: error: cannot find symbol
      long digit = Integer.parseLong(s);
                          ^
  symbol:   method parseLong(String)
  location: class Integer
1 error
Language: C++

#include <stdio.h>
 
char s[11];
typedef long long ll;
ll res = 0;
int p[11], sz=0;
 
void solve(int a, ll b, ll c) {
  if (!s[a]) {
    res += b+c;
    return;
  }
 
  solve(a+1, b+c, s[a]-'0');
  solve(a+1, b, (s[a]-'0')+c*10);
}
 
int main(void) {
  scanf_s("%s", s);
 
  solve(0, 0, 0);
 
  printf("%lld\n", res/2);
 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   19 |   scanf_s("%s", s);
      |   ^~~~~~~
      |   scanf
Language: C++

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

vector<string> hako;
void saiki(string cs,int i){
  if(i>=cs.length()) hako.push_back(cs);
  else {
    saiki(cs,i+1);
    saiki(cs.insert(i,"+"),i+2);
  }
}

int main(void){
  int i,j,k;
  string s;
  int a,b,c;
  long long int res,tmp,t;

  cin>>s;
  tmp=0;
  k=s.length();
  N=k+k-1;
  saiki(s,1);

  for(i=0;i<hako.size();i++){
   
    tmp=t=0;
    for(j=0;j<hako[i].length();j++){
      if(hako[i][j]=='+') {tmp+=t; t=0;}
      else t=t*10+(long long int)(hako[i][j]-'0');
    }
    tmp+=t;
    res+=tmp;
  }
  cout<<res<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:3: error: 'N' was not declared in this scope
   26 |   N=k+k-1;
      |   ^
Language: C++

#include <vector>
#include <string>
using namespace std;
int N;
vector<string> hako;
void saiki(string cs,int i){
  if(i>=cs.length()) hako.push_back(cs);
  else {
    saiki(cs,i+1);
    saiki(cs.insert(i,"+"),i+2);
  }

}

int main(void){
  int i,j,k;
  string s;
  int a,b,c;
  long long int res,tmp,t;

  cin>>s;
  tmp=0;
  k=s.length();
  N=k+k-1;
  saiki(s,1);

  for(i=0;i<hako.size();i++){

    tmp=t=0;
    for(j=0;j<hako[i].length();j++){
      if(hako[i][j]=='+') {tmp+=t; t=0;}
      else t=t*10+int(hako[i][j]-'0');
    }
    tmp+=t;
    res+=tmp;
  }
  cout<<res<<endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: 'cin' was not declared in this scope
   21 |   cin>>s;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:37:3: error: 'cout' was not declared in this scope
   37 |   cout<<res<<endl;
      |   ^~~~
a.cc:37:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:37:14: error: 'endl' was not declared in this scope
   37 |   cout<<res<<endl;
      |              ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

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

int main() {
	string s;
	__int64 ans =0;
	__int64 a[10];
	cin >> s;
	int array_length = s.length();
	for(int i=0;i<array_length;i++){
		a[i] = s[i]-'0';
	}
	int n=1;
	int nn=1;
	int nnn=1;
	int temp;
	int b = array_length;
	for(int i=0;i<array_length;i++){
		temp = array_length-nnn;
		for(int k=0;k<b;k++){
			ans += a[i] * n * pow(10,temp);
			if(k !=0){
				n=n+n;
			}
			temp=temp-1;
				cout << ans <<endl;
		}
		nn=nn*2;
		n=nn;
		nnn++;
		b--;
	}

	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
    8 |         __int64 ans =0;
      |         ^~~~~~~
      |         __ynf64
a.cc:9:16: error: expected ';' before 'a'
    9 |         __int64 a[10];
      |                ^~
      |                ;
a.cc:13:17: error: 'a' was not declared in this scope
   13 |                 a[i] = s[i]-'0';
      |                 ^
a.cc:23:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |                         ans += a[i] * n * pow(10,temp);
      |                         ^~~
      |                         abs
a.cc:23:32: error: 'a' was not declared in this scope
   23 |                         ans += a[i] * n * pow(10,temp);
      |                                ^
Language: C++

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

int main() {
	string s;
	long long int ans =0;
	long long int a[10];
	cin >> s;
	int array_length = s.length();
	for(int i=0;i<array_length;i++){
		a[i] = s[i]-'0';
	}
	int n=1;
	int nn=1;
	int nnn=1;
	int temp;
	int b = array_length;
	for(int i=0;i<array_length;i++){
		temp = array_length-nnn;
		for(int k=0;k<b;k++){
			ans += a[i] * n * pow(10,temp);
			if(k !=0){
				n=n+n;
			}
			temp=temp-1;
				cout << ans <<endl;
		}
		nn=nn*2;
		n=nn;
		nnn++;
		b--;
	}

	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:43: error: 'pow' was not declared in this scope
   22 |                         ans += a[i] * n * pow(10,temp);
      |                                           ^~~
Language: C++

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

int main() {
	string s;
	__int64 ans =0;
	__int64 a[10];
	cin >> s;
	int array_length = s.length();
	for(int i=0;i<array_length;i++){
		a[i] = s[i]-'0';
	}
	int n=1;
	int nn=1;
	int nnn=1;
	int temp;
	int b = array_length;
	for(int i=0;i<array_length;i++){
		temp = array_length-nnn;
		for(int k=0;k<b;k++){
			ans += a[i] * n * pow(10,temp);
			if(k !=0){
				n=n+n;
			}
			temp=temp-1;
				cout << ans <<endl;
		}
		nn=nn*2;
		n=nn;
		nnn++;
		b--;
	}

	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    7 |         __int64 ans =0;
      |         ^~~~~~~
      |         __int64_t
a.cc:8:16: error: expected ';' before 'a'
    8 |         __int64 a[10];
      |                ^~
      |                ;
a.cc:12:17: error: 'a' was not declared in this scope
   12 |                 a[i] = s[i]-'0';
      |                 ^
a.cc:22:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |                         ans += a[i] * n * pow(10,temp);
      |                         ^~~
      |                         abs
a.cc:22:32: error: 'a' was not declared in this scope
   22 |                         ans += a[i] * n * pow(10,temp);
      |                                ^
a.cc:22:43: error: 'pow' was not declared in this scope
   22 |                         ans += a[i] * n * pow(10,temp);
      |                                           ^~~
Language: C++

# coding: utf-8

answer = 0


def calc(leftnum, sum, tempsum , is_insert):

    hitoketa = leftnum % 10
    leftnum = int(leftnum / 10)

    if tempsum == 0:
        tempsum = hitoketa
    else:
        tempsum = int(str(hitoketa) + str(tempsum))

    if is_insert:
        sum += tempsum
        tempsum = 0

    if leftnum == 0:
        if is_insert:
            global answer
            answer += sum
        return

    calc(leftnum, sum, tempsum, True)
    calc(leftnum, sum, tempsum, False)

if __name__ == '__main__':
    inp = int(input())
    calc(inp, 0, 0, True)
    calc(inp, 0, 0, False)
    print(answer)

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

#include <bits/stdc++.h>
using namespace std;
typedef  long long ll;
//double pi=3.1415926535898;
//double pi=acos(-1.0);
#define scarr(a,s,e) for(int i=s;i<=int(e);i++) scanf("%d ",&a[i]);
#define prarr(a,s,e) for(int i=s;i<=int(e);i++) printf("%d ",a[i]);
#define speed      ios::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL);
#define rng(i,a,b) for(int i=a;i>=int(b);i--)
#define rep(i,a,b) for(int i=a;i<=int(b);++i)
#define lop(i,n)   for(int i=0;i<int(n);i++)
#define ms(x,a)    memset(x,a,sizeof(x))
#define all(x)     (x).begin(),(x).end()
#define sz(x)      int(x.size())
#define pb         push_back
#define mkp        make_pair
#define fr         first
#define se         second
#define sc(x)      scanf("%d",&x)
#define scl(x)     scanf("%lld",&x)
#define pr(x)      printf("%d ",x)
#define prl(x)     printf("%lld ",x)
#define prln(x)    printf("%d\n",x)
#define prlln(x)   printf("%lld\n",x)
#define r0         return 0;
#define CC         continue;
#define scd(x)     scanf("%lf",&x)
#define prd(x)     printf("%.10f\n",x);
#define bb(x)      cerr<< x <<endl;
#define ii         pair<int,int>
#define vi         vector<int>
//#define max(a,b) a<b?b:a
//#define min(a,b) a<b?a:b
const ll M   = 1e7+9 ;
const ll inf = 1e19  ;
const int si = 1e5+9 ;
//////////////////////    Hi    ^_^  hack me if you can :P
string s;
ll ans;
void solve(ll i,ll a,ll b)
{
    if(i==n)
    {
        ans+=a+b;
        return;
    }
    solve(i+1,a+b,s[i]-'0');
    solve(i+1,a,(s[i]-'0')+10*c);
}
int main()
{
    cin >> s;
    n =sz(s);
    solve(0,0,0);
    cout<< ans/2 ;
    r0;
}

Compiler output:
a.cc:35:16: warning: overflow in conversion from 'double' to 'll' {aka 'long long int'} changes value from '1.0e+19' to '9223372036854775807' [-Woverflow]
   35 | const ll inf = 1e19  ;
      |                ^~~~
a.cc: In function 'void solve(ll, ll, ll)':
a.cc:42:11: error: 'n' was not declared in this scope
   42 |     if(i==n)
      |           ^
a.cc:48:31: error: 'c' was not declared in this scope
   48 |     solve(i+1,a,(s[i]-'0')+10*c);
      |                               ^
a.cc: In function 'int main()':
a.cc:53:5: error: 'n' was not declared in this scope; did you mean 'yn'?
   53 |     n =sz(s);
      |     ^
      |     yn
Language: C++

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <stdlib.h>

using namespace std;


long long int calc(long long int pre, int offset, const char *str) {
	long long int res = 0;
	string tmp = "";
	char* pEnd;

	if (strlen(str) == offset) {
		res = pre + strtoll(str, &pEnd, 10);
	}
	else {
		// +
		for (int i = 0; i < offset; i++) {
			tmp += str[i];
		}
		res += calc(pre + atoi(tmp.c_str()), 1, &str[offset]);

		// no
		res += calc(pre, offset + 1, str);
	}

	return res;
}

int main() {
	string s;
	cin >> s;
	
	cout << calc(0, 1, s.c_str());
		
	return 0;
}

Compiler output:
a.cc: In function 'long long int calc(long long int, int, const char*)':
a.cc:16:13: error: 'strlen' was not declared in this scope
   16 |         if (strlen(str) == offset) {
      |             ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <stdlib.h>
  +++ |+#include <cstring>
    7 |
Language: C++

#include<stdio.h>
typedef long long int ll;
char a[11];
ll as(int b, ll c. ll d){
	if(a[b]=='\0') return c+d;
	else return as(b+1, c*10+a[n]-'0')+as(b+1,a[b]-'0',d+c);
}
int main(){
	scanf("%s",a);
	printf("%lld\n",as(1,a[0]-'0',0));
	return 0;
}

Compiler output:
a.cc:4:18: error: expected ',' or '...' before '.' token
    4 | ll as(int b, ll c. ll d){
      |                  ^
a.cc: In function 'll as(int, ll)':
a.cc:5:33: error: 'd' was not declared in this scope
    5 |         if(a[b]=='\0') return c+d;
      |                                 ^
a.cc:6:36: error: 'n' was not declared in this scope
    6 |         else return as(b+1, c*10+a[n]-'0')+as(b+1,a[b]-'0',d+c);
      |                                    ^
a.cc:6:60: error: 'd' was not declared in this scope
    6 |         else return as(b+1, c*10+a[n]-'0')+as(b+1,a[b]-'0',d+c);
      |                                                            ^
a.cc: In function 'int main()':
a.cc:10:27: error: too many arguments to function 'll as(int, ll)'
   10 |         printf("%lld\n",as(1,a[0]-'0',0));
      |                         ~~^~~~~~~~~~~~~~
a.cc:4:4: note: declared here
    4 | ll as(int b, ll c. ll d){
      |    ^~
Language: C++

#include<stdio.h>
typedef long long int ll;
char a[11];
ll as(int b, ll c, ll d){
	if(a[b]=='\0') return c+d
	else return as(b+1, c*10+a[b]-'0',d)+as(b+1,a[b]-'0',d+c);
	
}
int main(){
	scanf("%s",a);
	printf("%11d\n",as(1,a[0]-'0',0));
}

Compiler output:
a.cc: In function 'll as(int, ll, ll)':
a.cc:5:34: error: expected ';' before 'else'
    5 |         if(a[b]=='\0') return c+d
      |                                  ^
      |                                  ;
    6 |         else return as(b+1, c*10+a[b]-'0',d)+as(b+1,a[b]-'0',d+c);
      |         ~~~~
Language: C++

#include<stdio.h>
typedef long long int ll;
char a[11];
ll as(int b, ll c, ll d){
	if(a[b]=='\0') return c+d;
	else return as(b+1, c*10+a[b]-'0',d)+as(b+1,a[b]-'0',d+c);
}
int mian(){
	scanf("%s",a);
	printf("%11d\n",as(1,a[0]-'0',0));
	return 0;
}

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

#include<stdio.h>
typedef long long int ll
char a[11];
ll as(int b, ll c, ll d){
	if(a[b]=='\0') return c+d
	else return as(b+1, c*10+a[b]-'0',d)+as(b+1,a[b]-'0',d+c);
	
}
int main(){
	scanf("%s",a);
	printf("%11d\n",as(1,a[0]-'0',0));
}

Compiler output:
a.cc:3:1: error: expected initializer before 'char'
    3 | char a[11];
      | ^~~~
a.cc:4:1: error: 'll' does not name a type
    4 | ll as(int b, ll c, ll d){
      | ^~
a.cc: In function 'int main()':
a.cc:10:20: error: 'a' was not declared in this scope
   10 |         scanf("%s",a);
      |                    ^
a.cc:11:25: error: 'as' was not declared in this scope
   11 |         printf("%11d\n",as(1,a[0]-'0',0));
      |                         ^~
Language: C++

#include <stdio.h>
typedef long long int ll;
char a[11];
ll as(int b, llc, lld){
	if(a[b]=='\0') return c+d;
	else return as(b+1, c*10+a[b]-'0',d)+as(b+1,a[b]-'0',d+c);
}
int main(){
	scanf("%s",a);
	printf("%lld",as(1,a[0]-'0',0));
	return 0;
}

Compiler output:
a.cc:4:14: error: 'llc' has not been declared
    4 | ll as(int b, llc, lld){
      |              ^~~
a.cc:4:19: error: 'lld' has not been declared
    4 | ll as(int b, llc, lld){
      |                   ^~~
a.cc: In function 'll as(int, int, int)':
a.cc:5:31: error: 'c' was not declared in this scope
    5 |         if(a[b]=='\0') return c+d;
      |                               ^
a.cc:5:33: error: 'd' was not declared in this scope
    5 |         if(a[b]=='\0') return c+d;
      |                                 ^
a.cc:6:29: error: 'c' was not declared in this scope
    6 |         else return as(b+1, c*10+a[b]-'0',d)+as(b+1,a[b]-'0',d+c);
      |                             ^
a.cc:6:43: error: 'd' was not declared in this scope
    6 |         else return as(b+1, c*10+a[b]-'0',d)+as(b+1,a[b]-'0',d+c);
      |                                           ^
Language: C++

#include <iostream>
#include <vector>
//#include <cstdio>
//#include <cstdlib>
#include <sstream>

using namespace std;

int stoi(string s)
{
  int x;
  istringstream stream(s);
  stream >> x;
  return x;
}

vector<int> split(const string &input, char delimiter)
{
  istringstream stream(input);
  string field;
  vector<int> result;
  while(getline(stream, field, delimiter))
    result.push_back(stoi(field));
  return result;
}

int main()
{ 
  string S;
  cin >> S;
  const int N = S.size()-1;
  int ans = 0;
  for(int i = 0; i < 1<<N; i++){
    string Sp = S;
    int n = 0;
    for(int j = 0; j < N; j++)
      if((i & (1<<j)) != 0){
        Sp.insert(j+n+1,"+");
        n++;
      }
    vector<int> v = split(Sp, '+');
    for(vector<int>::iterator ite = v.begin(); ite != v.end(); ite++){
      //cout << *ite << endl;
      ans += *ite;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'std::vector<int> split(const std::string&, char)':
a.cc:23:26: error: call of overloaded 'stoi(std::string&)' is ambiguous
   23 |     result.push_back(stoi(field));
      |                      ~~~~^~~~~~~
a.cc:9:5: note: candidate: 'int stoi(std::string)'
    9 | int stoi(string s)
      |     ^~~~
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
Language: C++

int power10_memo[11];

int fact_memo[11];
int nchoosek(int n, int k){
    return fact_memo[n]/(fact_memo[n-k]*fact_memo[k]);
}
long long formulas(string in){
    vector<int> digit_nums;
    
    fact_memo[0] = 1;
    power10_memo[0] = 1;
    for(int i = 1; i < 11; i++){
        fact_memo[i] = fact_memo[i-1]*i;
        power10_memo[i] = power10_memo[i-1]*10;
    }
    int combs = 0;
    int n = in.length()-1;
    for(int k = 0; k <= in.length()-1; k++)
        combs += nchoosek(n, k);
    digit_nums.insert(digit_nums.begin(), combs);
    long long sum = 0;
    for(int i = in.length()-1; i >= 0; i--){
        
        for(int j = digit_nums.size()-1; j >= 0; j--){
            int num_times = digit_nums[j];
            sum += num_times*(long long)power10_memo[digit_nums.size()-1-j]*(in[i]-48);
        }
        digit_nums[0] /= 2;
        digit_nums.insert(digit_nums.begin(), digit_nums[0]);
        
    }
    return sum;
}

int main()
{
    string input;
    cin >> input;
    
    cout << formulas(input) << endl;
    return 0;
}


Compiler output:
a.cc:7:20: error: 'string' was not declared in this scope
    7 | long long formulas(string in){
      |                    ^~~~~~
a.cc: In function 'int main()':
a.cc:37:5: error: 'string' was not declared in this scope
   37 |     string input;
      |     ^~~~~~
a.cc:38:5: error: 'cin' was not declared in this scope
   38 |     cin >> input;
      |     ^~~
a.cc:38:12: error: 'input' was not declared in this scope; did you mean 'int'?
   38 |     cin >> input;
      |            ^~~~~
      |            int
a.cc:40:5: error: 'cout' was not declared in this scope
   40 |     cout << formulas(input) << endl;
      |     ^~~~
a.cc:40:21: error: 'formulas' cannot be used as a function
   40 |     cout << formulas(input) << endl;
      |             ~~~~~~~~^~~~~~~
a.cc:40:32: error: 'endl' was not declared in this scope
   40 |     cout << formulas(input) << endl;
      |                                ^~~~
Language: C++

long a,b,i;main(c){for(;c=getchar()-48,c;b=b*10+(1l<<i++)*c)a+=a+b;printf("%ld\n",a+b);}

Compiler output:
a.cc:1:16: error: expected constructor, destructor, or type conversion before '(' token
    1 | long a,b,i;main(c){for(;c=getchar()-48,c;b=b*10+(1l<<i++)*c)a+=a+b;printf("%ld\n",a+b);}
      |                ^
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main()
{
	char str[11];
	int s = 0, ss = 0, l, m[11], a, b, c;

	cin >> str;

	l = strlen(str);


	for (a = 0; a < l; a++) {
		for (b = 0; b < l - a; b++) {
			for (c = 0; c < a; c++) {
				m[c] = str[c];
				s = s * 10 + m[c];
			}
			cout << s << endl;
			ss += s;
			s = 0;
		}
	}
	
	cout << ss << endl;


	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'strlen' was not declared in this scope
   13 |         l = strlen(str);
      |             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <utility>
using namespace std;

int main(){
	_int64 s, m[10],sum;
	cin >> s;
	int j = 0;
	while (1){
		m[j] = s % 10;
		s = s / 10;
		j++;
		if (s == 0)break;
	}
	//sはj桁の数、m[0]は一の位
	sum = 0;
	for (int i = 0; i < pow(2, j - 1); i++){
		_int64 tmp = m[0];
		if (j > 1){
			_int64 jj = i;
			int mul = 1;
			for (int k = 1; k < j; k++){
				if (jj % 2 == 0)mul = mul * 10;
				else mul = 1;
				tmp += m[k] * mul;
				jj = jj / 2;
			}
		}
		sum += tmp;
	}
	cout << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: '_int64' was not declared in this scope; did you mean 'sinf64'?
    9 |         _int64 s, m[10],sum;
      |         ^~~~~~
      |         sinf64
a.cc:10:16: error: 's' was not declared in this scope
   10 |         cin >> s;
      |                ^
a.cc:13:17: error: 'm' was not declared in this scope
   13 |                 m[j] = s % 10;
      |                 ^
a.cc:19:9: error: 'sum' was not declared in this scope
   19 |         sum = 0;
      |         ^~~
a.cc:21:23: error: expected ';' before 'tmp'
   21 |                 _int64 tmp = m[0];
      |                       ^~~~
      |                       ;
a.cc:23:31: error: expected ';' before 'jj'
   23 |                         _int64 jj = i;
      |                               ^~~
      |                               ;
a.cc:26:37: error: 'jj' was not declared in this scope; did you mean 'j'?
   26 |                                 if (jj % 2 == 0)mul = mul * 10;
      |                                     ^~
      |                                     j
a.cc:28:33: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   28 |                                 tmp += m[k] * mul;
      |                                 ^~~
      |                                 tm
a.cc:28:40: error: 'm' was not declared in this scope
   28 |                                 tmp += m[k] * mul;
      |                                        ^
a.cc:29:33: error: 'jj' was not declared in this scope; did you mean 'j'?
   29 |                                 jj = jj / 2;
      |                                 ^~
      |                                 j
a.cc:32:24: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   32 |                 sum += tmp;
      |                        ^~~
      |                        tm
Language: C++

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

string S;
ll ans = 0;

int keta(ll num) {
	int ret = 0;
	while (num > 0) {
		ret++;
		num /= 10;
	}
	return ret;
}


ll stoi(string s) {
	ll ten = 1;
	ll ans = 0;
	for (int i=s.length()-1; i>=0; i--) {
		ans += ten * (s[i] - '0');
		ten *= 10;
	}
	return ans;
}

signed main()
{
	cin >> S;

	//int k = keta(S);
	int k = S.length();
	k--;

	for (int i=0; i<1<<k; i++) {
		string pre_num = "";
		int wa = 0;
		for (int j=0; j<k; j++) {
			pre_num += S[j];
			if (i >> j & 1) {
				wa += stoi(pre_num);
				pre_num = "";
			}
		}
		pre_num += S[k];
		wa += stoi(pre_num);
		ans += wa;
	}
	//ans += atoi(S.c_str());

	cout << ans << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:43: error: call of overloaded 'stoi(std::string&)' is ambiguous
   44 |                                 wa += stoi(pre_num);
      |                                       ~~~~^~~~~~~~~
a.cc:20:4: note: candidate: 'll stoi(std::string)'
   20 | ll stoi(string s) {
      |    ^~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
a.cc:49:27: error: call of overloaded 'stoi(std::string&)' is ambiguous
   49 |                 wa += stoi(pre_num);
      |                       ~~~~^~~~~~~~~
a.cc:20:4: note: candidate: 'll stoi(std::string)'
   20 | ll stoi(string s) {
      |    ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
Language: C

#include<stdio.h>
#include<math.h>
int main(){
  int a[10000][2];
  int f[10000];
  int list[5][5];
  int k[10];
  int h,w,n,i,j,k,x,y,z,x2,y2;
  for(i=0;i<10;i++)k[i]=0;
  scanf("%d%d%d",&h,&w,&n);
  for(i=0;i<n;i++){
    scanf("%d%d",&a[i][0],&a[i][1]);
    f[i]=0;
    if(a[i][0]-2<1||a[i][0]+2>w)f[i]|=(1<<1)+(1<<4)+(1<<7);
    if(a[i][0]-1<1)f[i]|=(1<<0)+(1<<3)+(1<<6);
    if(a[i][0]+1>w)f[i]|=(1<<2)+(1<<5)+(1<<8);
    if(a[i][1]-2<1||a[i][1]+2>h)f[i]|=(1<<3)+(1<<4)+(1<<5);
    if(a[i][1]-1<1)f[i]|=(1<<0)+(1<<1)+(1<<2);
    if(a[i][1]+1>h)f[i]|=(1<<6)+(1<<7)+(1<<8);
  }
  for(i=0;i<n;i++){
    for(j=0;j<5;j++)for(k=0;k<5;k++)list[j][k]=0;
    list[2][2]=i;
    for(j=i+1;j<n;j++){
      x=a[j][0]-a[i][0];y=a[j][1]-a[i][1];
      if(abs(x)<3&&abs(y)<3){list[2+x][2+y]=j;}
    }
    for(y=0;y<3;y++){
      for(x=0;x<3;x++){
        z=0;
        if(!(f[i]&(1<<(y*3+x)))){
          for(y2=0;y2<3;y2++){
            for(x2=0;x2<3;x2++){
              if(list[x+x2][y+y2]){
                z++;
                f[list[x+x2][y+y2]]|=1<<(2-x2)+(2-y2)*3;
              }
            }
          }
        }
        k[z]++;
      }
    }
  }
  k[0]=(h-2)*(w-2);
  for(i=1;i<10;i++)k[0]-=k[i];
  for(i=0;i<10;i++)printf("%d\n",k[i]);
}


Compiler output:
main.c: In function 'main':
main.c:8:17: error: conflicting types for 'k'; have 'int'
    8 |   int h,w,n,i,j,k,x,y,z,x2,y2;
      |                 ^
main.c:7:7: note: previous declaration of 'k' with type 'int[10]'
    7 |   int k[10];
      |       ^
main.c:26:10: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   26 |       if(abs(x)<3&&abs(y)<3){list[2+x][2+y]=j;}
      |          ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | int main(){
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
#define tii tuple<int,int,int>
#define Priq priority_queue<int,vi,greater<int>>
#define pb push_back
#define mp make_pair
#define INF (1ll<<60)
signed main(){
  int H,W,N; cin>>H>>W>>N;
  vi ans(10);
  ans[0]=(H-2)*(W-2);
  set<pii> S;
  rep(_,0,N){
    int A,B; cin>>A>>B;
    S.insert(mp(A,B));
  }
  vi R={0,0,1,1,1,-1,-1,-1,0},S={1,-1,0,-1,1,-1,0,1,0};
  for(auto p:S){
    int X=p.first,Y=p.second;
    rep(i,0,9){
      int A=X+R[i],B=Y+S[i];
      if(1<A&&A<H&&1<B&&B<W){
        int count=0;
        rep(j,0,9){
          int C=A+R[j],D=B+S[j];
          if((C<=A||D<=B)&&(A!=C||B!=D)){
            count=-1;
            break;
          }
          if(S.count(mp(C,D)))
            count++;
        }
        if(count!=-1){
          ans[0]--;
          ans[count]++;
        }
      }
    }
  }
  rep(i,0,10) cout<<ans[i]<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:28:31: error: conflicting declaration 'std::vector<long long int> S'
   28 |   vi R={0,0,1,1,1,-1,-1,-1,0},S={1,-1,0,-1,1,-1,0,1,0};
      |                               ^
a.cc:23:12: note: previous declaration as 'std::set<std::pair<long long int, long long int> > S'
   23 |   set<pii> S;
      |            ^
a.cc:32:25: error: no match for 'operator[]' (operand types are 'std::set<std::pair<long long int, long long int> >' and 'long long int')
   32 |       int A=X+R[i],B=Y+S[i];
      |                         ^
a.cc:36:29: error: no match for 'operator[]' (operand types are 'std::set<std::pair<long long int, long long int> >' and 'long long int')
   36 |           int C=A+R[j],D=B+S[j];
      |                             ^
Language: C++

#include<bits/stdc++.h>
#define rep(i, s, n) for (int i=(s); i<(n); i++)
#define ll long long
using namespace std;

int main() {
  set<pair<int, int>> S;
  set<pair<int, int>> S2;
  ll H,W,N;
  ll res[10];
  cin>>H>>W>>N;
  rep(i, 0, N) {
    int x,y; cin>>x>>y;
    S.insert({x, y});
    rep(j, -1, 2) {
      rep(k, -1, 2) {
        S2.insert({x+j, y+k});
      }
    }
  }
  res[0]=(H-2)*(W-2);
  for (auto r : S2) {
    int x=r.first;
    int y=r.second;
    if (x<=1||x>H-1) continue;
    if (y<=1||y>W-1) continue;
    int tmp=0;
    rep(j, -1, 2) rep(k, -1, 2) tmp+=S.count({x+j, y+k});
    res[tmp]++;
    res[0]--;
  }
  rep(i, 0, 10) cout<<res[i]<<endl;
}
F

Compiler output:
a.cc:34:1: error: 'F' does not name a type
   34 | F
      | ^
Language: C++

import sys
input = sys.stdin.readline
from collections import Counter
h,w,n=map(int,input().split())
c=Counter()
for _ in range(n):
    a,b=map(int,input().split())
    for i in [-1,0,1]:
        for j in [-1,0,1]:
            if 2<=a+i<w and 2<=b+j<h:
                c[a+i,b+j]+=1
#print(c.items())
c2=Counter(c.values())
print((h-2)*(w-2)-sum(c2.values()))
for i in range(1,10):
    print(c2[i])


Compiler output:
a.cc:12:2: error: invalid preprocessing directive #print
   12 | #print(c.items())
      |  ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'