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

#include <iostream>
#include <cstdint>
#include <unordered_map>
#include <algorithm>
#include <array>

std::uint_fast64_t make_key(const std::int_fast64_t y, const std::int_fast64_t x) {
  return (static_cast<std::uint_fast64_t>(y) << 32u) | static_cast<std::uint_fast64_t>(x);
}

int main() {
  std::int_fast64_t h, w, n;
  std::cin >> h >> w >> n;

  std::unordered_map<std::uint_fast64_t, std::int_fast64_t> sparse_grid;
  for (std::int_fast64_t i = 0; i < n; ++i) {
    std::int_fast64_t a, b;
    std::cin >> a >> b;
    for (std::int_fast64_t y = std::max<std::int_fast64_t>(a - 1, 2); y <= std::min<std::int_fast64_t>(a + 1, h - 1); ++y) {
      for (std::int_fast64_t x = std::max<std::int_fast64_t>(b - 1, 2); x <= std::min<std::int_fast64_t>(b + 1, w - 1); ++x) {
        ++sparse_grid[make_key(y, x)];
      }
    }
  }

  std::array<std::int_fast64_t, 10> results = {0};
  for (const auto& kv : sparse_grid) {
    ++results[kv.second];
  }
  results[0] = (h - 2) * (w - 2) - std::accumulate(results.begin() + 1, results.end(), 0, [](const std::int_fast64_t sum, const std::int_fast64_t x) { return sum + x; });

  for (const std::int_fast64_t& result : results) {
    std::cout << result << std::endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:41: error: 'accumulate' is not a member of 'std'
   30 |   results[0] = (h - 2) * (w - 2) - std::accumulate(results.begin() + 1, results.end(), 0, [](const std::int_fast64_t sum, const std::int_fast64_t x) { return sum + x; });
      |                                         ^~~~~~~~~~
Language: C++

#include<cstdio>
#include<map>
using namespace std;
#define LL long long
LL H,W,N;
LL ans[10];
LL dx[]={-2,-2,-2,-1,-1,-1,0,0,0};
LL dy[]={-2,-1,0,-2,-1,0,-2,-1,0};
map<LL,LL> m;
void slove(LL x,LL y)
{
    LL a,b;
    LL id;
    for(int i=0;i<9;i++){
        a=x+dx[i];
        b=y+dy[i];
        if(a<1 || b<1 || a>H-2 || b>W-2)   continue;
        id=(H-2)*(b-1)+a;//对每个小矩形进行编号
		//左上角的位置就只能在(h-2)*(w-2)的矩形区域内
		//每一行有w-2个元素 a-1
        m[id]++;
    }
}
int main(){
    LL x,y;
    scanf("%lld %lld %lld",&H,&W,&N);
    for(int i=1;i<=N;i++)
	{
        scanf("%lld %lld",&x,&y);
        slove(x,y);
    }
    ans[0]=(H-2)*(W-2);//总数
    LL temp;
	map<LL,LL>::iterator it=m.begin();
    for(it=m.begin();it!=m.end();it++){
        temp=it->second;
        ans[temp]++;
        ans[0]--;
    }
    for(int i=0;i<=9;i++)
        cout<<ans[i]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:9: error: 'cout' was not declared in this scope
   41 |         cout<<ans[i]<<endl;
      |         ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<map>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:41:23: error: 'endl' was not declared in this scope
   41 |         cout<<ans[i]<<endl;
      |                       ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<map>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

// ConsoleApplication56.cpp : アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include<cstring>
#include<algorithm>
#include<cmath>
#include<string>
#include<iostream>
#include<vector>
#include<utility>

using namespace std;

int main()
{
	int ans[10] = {};
	long long int i, j, k, l, m, n, s,H,W,N;
	long long int sum,cc,cnt;
	cc = 0;
	cnt = 1;
	cin >> H >> W >> N;
	vector<long long int>a(N);
	vector<long long int>b(N);
	pair<long long int,long long int>P[900000];
	for (i = 0; i < N; i++) {
		cin >> a[i]>>b[i];
		for (j = -2; j <= 0; j++) {
			for (k = -2; k <= 0; k++) {
				if (a[i] + j >= 0 && b[i] + k >= 0&&a[i]+j+2<=H&&b[i]+k+2<=W) {
					P[cc].first = a[i] + j;
					P[cc].second = b[i] + k;
					cc++;
				}
			}
		}

	}
	sort(P,P+cc-1);
	pair<long long int, long long int>temp;
	temp.first = P[0].first;
	temp.second = P[0].second;
	for (i = 1; i < cc; i++) {
		if (temp.first == P[i].first&&temp.second == P[i].second) {
			cnt++;
		}
		else {
			temp.first = P[i].first;
			temp.second = P[i].second;
			ans[cnt]++;
			cnt = 1;
		}

	}
	for (i = 1; i <= 9; i++) {
		cout << ans[i] << endl;
	}
	
	return 0;
}




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

import static java.util.function.Function.*;
import static java.util.stream.Collectors.*;

import java.util.*;

public class Main {
    public void main(Scanner sc) {
        int h = sc.nextInt();
        int w = sc.nextInt();
        int n = sc.nextInt();
        Map<String, Integer> map = new HashMap<>();
        for (int i = 0; i < n; i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            for (int j = a - 2; j <= a; j++) {
                if (j <= 0 || j > h - 2) {
                    continue;
                }
                for (int k = b - 2; k <= b; k++) {
                    if (k <= 0 || k > w - 2) {
                        continue;
                    }
                    map.compute(j + "," + k, (p, v) -> (v == null) ? 1 : v + 1);
                }
            }
        }

        System.out.println(((long) h - 2) * ((long) w - 2) - map.size());
        Map<Integer, Long> countMap =
            map.values().stream().collect(groupingBy(identity(), counting()));
        for (int i = 1; i <= 9; i++) {
            System.out.println(countMap.getOrDefault(i, 0L));
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        new Main().main(sc);
        sc.close();
    }
}


Compiler output:
main.c:1:7: error: expected ';' before 'static'
    1 | import static java.util.function.Function.*;
      |       ^~~~~~~
      |       ;
main.c:1:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import static java.util.function.Function.*;
      |                   ^
main.c:2:7: error: expected ';' before 'static'
    2 | import static java.util.stream.Collectors.*;
      |       ^~~~~~~
      |       ;
main.c:2:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import static java.util.stream.Collectors.*;
      |                   ^
main.c:4:1: error: unknown type name 'import'
    4 | import java.util.*;
      | ^~~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import java.util.*;
      |            ^
main.c:6:1: error: unknown type name 'public'
    6 | public class Main {
      | ^~~~~~
main.c:6:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    6 | public class Main {
      |              ^~~~
Language: C++

#include <iostream>
 
#include <map>
 
using namespace std;
typedef long long ll;
 
 
 
int main(){
	ll i,j,k;
	ll a,b,c;
	ll h,w,n;
	cin>>h>>w>>n;
	map<pair<int,int>,int> cnt;
	for(i=0;i<n;i++){
		cin>>a>>b;
		for(j=-1;j<=1;j++){
			for(k=-1;k<=1;k++){
				if(a+j>=1 && a+j<=h && b+k>=1 && b+j<=w){
					cnt[make_pair(a+j,b+k)]++;
				}
			}
		}
	}
	ll ans[10];
	fill(a,a+10,0ll);
	ans[0]=(h-2)*(w-2);
	for(auto& elem : cnt){
		ans[0]--;
		ans[elem.second]++;
	}
	for(i=0;i<=9;i++){
		cout<<ans[i]<<endl;
	}
	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = long long int; typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type = void]':
/usr/include/c++/14/bits/stl_algobase.h:998:21:   required from 'void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = long long int; _Tp = long long int]'
  998 |     { std::__fill_a1(__first, __last, __value); }
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1029:20:   required from 'void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = long long int]'
 1029 |       std::__fill_a(__first, __last, __value);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:27:6:   required from here
   27 |         fill(a,a+10,0ll);
      |         ~~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:952:9: error: invalid type argument of unary '*' (have 'long long int')
  952 |         *__first = __tmp;
      |         ^~~~~~~~
Language: C++

#include <iostream>

#include <map>

using namespace std;
typedef long long ll;

ll i,j,k;
ll a,b,c;
ll h,w,n;

int main(){
	cin>>h>>w>>n;
	map<pair<int,int>,int> cnt;
	for(i=0;i<n;i++){
		cin>>a>>b;
		for(j=-1;j<=1;j++){
			for(k=-1;k<=1;k++){
				if(a+j>=1 && a+j<=h && b+k>=1 && b+j<=w){
					cnt[make_pair(a+j,b+k)]++;
				}
			}
		}
	}
	ll ans[10];
	fill(a,a+10,0);
	ans[0]=(h-2)*(w-2);
	for(auto& elem : cnt){
		ans[0]--;
		ans[elem.second]++;
	}
	for(i=0;i<=9;i++){
		cout<<ans[i]<<endl;
	}
	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int; typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type = void]':
/usr/include/c++/14/bits/stl_algobase.h:998:21:   required from 'void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = long long int; _Tp = int]'
  998 |     { std::__fill_a1(__first, __last, __value); }
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1029:20:   required from 'void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int]'
 1029 |       std::__fill_a(__first, __last, __value);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:26:6:   required from here
   26 |         fill(a,a+10,0);
      |         ~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:952:9: error: invalid type argument of unary '*' (have 'long long int')
  952 |         *__first = __tmp;
      |         ^~~~~~~~
Language: C++

#include <iostream>

#include <map>

using namespace std;
typedef long long ll;

ll i,j,k;
ll a,b,c;
ll ans=0;
ll h,w,n;

int main(){
	cin>>h>>w>>n;
	map<pair<int,int>,int> cnt;
	for(i=0;i<n;i++){
		cin>>a>>b;
		for(j=-1;j<=1;j++){
			for(k=-1;k<=1;k++){
				if(a+j>=1 && a+j<=h && b+k>=1 && b+j<=w){
					cnt[make_pair(a+j,b+k)]++;
				}
			}
		}
	}
	ll ans[10];
	fill(a,a+10,0);
	ans[0]=(h-2)*(w-2);
	for(auto elem : cnt){
		ans[0]--;
		ans[elem.second]++;
	}
	for(i=0;i<=9;i++){
		cout<<ans[i]<<endl;
	}
	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int; typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type = void]':
/usr/include/c++/14/bits/stl_algobase.h:998:21:   required from 'void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = long long int; _Tp = int]'
  998 |     { std::__fill_a1(__first, __last, __value); }
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1029:20:   required from 'void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int]'
 1029 |       std::__fill_a(__first, __last, __value);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:27:6:   required from here
   27 |         fill(a,a+10,0);
      |         ~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:952:9: error: invalid type argument of unary '*' (have 'long long int')
  952 |         *__first = __tmp;
      |         ^~~~~~~~
Language: C++

#include <iostream>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#include <random>
#include <utility>
#include <cmath>
#include <set>
#include <map>
#include <string.h>
#include <iomanip>
#include <stdlib.h>
#include <algorithm>
#include <vector>

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
long long int INF = 1e18;
double Pi = 3.141592653589;
const int mod = 1000000007;
// memset(a,0,sizeof(a)); →全部０にする

vector<int> G[100005];
 
int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,-1,1};
 
std::vector<P> tree[100010];
struct edge{int to,cost;};

ll i,j,k;
ll a,b,c;
ll ans=0;
ll h,w,n;

int main(){
	cin>>h>>w>>n;
	map<pair<int,int>,int> cnt;
	for(i=0;i<n;i++){
		cin>>a>>b;
		for(j=-1;j<=1;j++){
			for(k=-1;k<=1;k++){
				if(a+j>=1 && a+j<=h && b+k>=1 && b+j<=w){
					cnt[make_pair(a+j,b+k)]++;
				}
			}
		}
	}
	ll ans[10];
	fill(a,a+10,0);
	ans[0]=(h-2)*(w-2);
	for(auto elem : cnt){
		ans[0]--;
		ans[elem.second]++;
	}
	for(i=0;i<=9;i++){
		cout<<ans[i]<<endl;
	}
	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int; typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type = void]':
/usr/include/c++/14/bits/stl_algobase.h:998:21:   required from 'void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = long long int; _Tp = int]'
  998 |     { std::__fill_a1(__first, __last, __value); }
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1029:20:   required from 'void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int]'
 1029 |       std::__fill_a(__first, __last, __value);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:52:6:   required from here
   52 |         fill(a,a+10,0);
      |         ~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:952:9: error: invalid type argument of unary '*' (have 'long long int')
  952 |         *__first = __tmp;
      |         ^~~~~~~~
Language: C++

#include <iostream>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#include <random>
#include <utility>
#include <cmath>
#include <set>
#include <map>
#include <string.h>
#include <iomanip>
#include <stdlib.h>
#include <algorithm>
#include <vector>

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
long long int INF = 1e18;
double Pi = 3.141592653589;
const int mod = 1000000007;
// memset(a,0,sizeof(a)); →全部０にする
 
struct edge{int to,cost;};
vector<int> G[100005];
 
int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,-1,1};
 
std::vector<P> tree[100010];
ll i,j,k;
ll a,b,c;
ll ans=0;
ll h,w,n;

int main(){
	cin>>h>>w>>n;
	map<pair<int,int>,int> cnt;
	for(i=0;i<n;i++){
		cin>>a>>b;
		for(j=-1;j<=1;j++){
			for(k=-1;k<=1;k++){
				if(a+j>=1 && a+j<=h && b+k>=1 && b+j<=w){
					cnt[make_pair(a+j,b+k)]++;
				}
			}
		}
	}
	ll ans[10];
	fill(a,a+10,0);
	ans[0]=(h-2)*(w-2);
	for(auto& elem : cnt){
		ans[0]--;
		ans[elem.second]++;
	}
	for(i=0;i<=9;i++){
		cout<<ans[i]<<endl;
	}
	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int; typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type = void]':
/usr/include/c++/14/bits/stl_algobase.h:998:21:   required from 'void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = long long int; _Tp = int]'
  998 |     { std::__fill_a1(__first, __last, __value); }
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1029:20:   required from 'void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int; _Tp = int]'
 1029 |       std::__fill_a(__first, __last, __value);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:51:6:   required from here
   51 |         fill(a,a+10,0);
      |         ~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:952:9: error: invalid type argument of unary '*' (have 'long long int')
  952 |         *__first = __tmp;
      |         ^~~~~~~~
Language: C++

from collections import Counter

H,W,N = map(int, input().split())

ddx = [0,0,0,1,1,1,-1,-1,-1]
ddy = [-1,0,1,-1,0,1,-1,0,1]

cnt = []
for _ in range(N):
	y, x = map(int, input().split())
	for dx, dy in zip(ddx, ddy):
		yy = y + dy
		xx = x + dx
		if 1 < xx < W and 1 < yy < H:
			cnt.append(yy * W + xx)
cnt = Counter(cnt)

#print(cnt)

ans = [0] * 10
ans[0] = (H-2)*(W-2)
for k in cnt:
	c = cnt[k]
	ans[c] += 1
	ans[0] -= 1
for i in ans:
	print(i)

Compiler output:
a.cc:18:2: error: invalid preprocessing directive #print
   18 | #print(cnt)
      |  ^~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from collections import Counter
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
map<pair<int,int>,int>M;
vector<pair<int,int>>vec,vec2;
int H,W,n,a,b;
long long cnt1[10];
void valid(int x,int y){if(x<0 || x>=H-2 || y<0 || y>=W-2){return false;}return true;}
int main(){
	cin>>H>>W>>n;
	for(int i=0;i<n;i++){
		cin>>a>>b;a--;b--;M[make_pair(a,b)]=1;
		for(int j=-2;j<=2;j++){for(int k=-2;k<=2;k++)vec.push_back(make_pair(a+j,b+k);)}
	}
	sort(vec.begin(),vec.end());
	if(valid(vec[0].first,vec[0].second)==true)vec2.push_back(vec[0]);
	for(int i=1;i<vec.size();i++){
		if(vec[i-1]!=vec[i]){
			if(valid(vec[i].first,vec[i].second)==true)vec2.push_back(vec[i]);
		}
	}
	for(int i=0;i<vec2.size();i++){
		int cnts=0;
		for(int j=0;j<3;j++){for(int k=0;k<3;k++)cnts+=M[make_pair(vec2[i].first+j,vec2[i].second+k)];}
		cnt1[cnts]++;
	}
	long long sums=0;for(int i=1;i<=9;i++){sums+=cnt1[i];}
	cnt1[0]=1LL*(H-2)*(W-2)-sums;
	for(int i=0;i<=9;i++)cout<<cnt1[i]<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'void valid(int, int)':
a.cc:7:67: error: return-statement with a value, in function returning 'void' [-fpermissive]
    7 | void valid(int x,int y){if(x<0 || x>=H-2 || y<0 || y>=W-2){return false;}return true;}
      |                                                                   ^~~~~
a.cc:7:81: error: return-statement with a value, in function returning 'void' [-fpermissive]
    7 | void valid(int x,int y){if(x<0 || x>=H-2 || y<0 || y>=W-2){return false;}return true;}
      |                                                                                 ^~~~
a.cc: In function 'int main()':
a.cc:12:94: error: expected ')' before ';' token
   12 |                 for(int j=-2;j<=2;j++){for(int k=-2;k<=2;k++)vec.push_back(make_pair(a+j,b+k);)}
      |                                                                           ~                  ^
      |                                                                                              )
a.cc:12:95: error: expected primary-expression before ')' token
   12 |                 for(int j=-2;j<=2;j++){for(int k=-2;k<=2;k++)vec.push_back(make_pair(a+j,b+k);)}
      |                                                                                               ^
a.cc:15:45: error: invalid operands of types 'void' and 'bool' to binary 'operator=='
   15 |         if(valid(vec[0].first,vec[0].second)==true)vec2.push_back(vec[0]);
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:18:61: error: invalid operands of types 'void' and 'bool' to binary 'operator=='
   18 |                         if(valid(vec[i].first,vec[i].second)==true)vec2.push_back(vec[i]);
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#define MALLOC(type, n) (type *)malloc((n)*sizeof(type))
#define HASH(A, W, B) (((W%166667)*(A%166667)+B%166667)%166667)
#define TYPELIST unsigned long 

struct list{
	TYPELIST item;
	struct list *next;
};

typedef struct list List;

void KillList(List *list){
	if(list!=NULL){
		KillList(list->next);
		free(list);
	}
}

List* AddList(List *head, TYPELIST item){
	List *newlist;
	newlist=MALLOC(List, 1);
	newlist->item=item;
	newlist->next=head;
	return newlist;

}

int main(){
	unsigned long H, W, N, i, *a, *b, sl[2][2], h, w, k, ax, bx;
	unsigned long long ans[10]
	List *table[166667], *lp;
	int j, finded;
	for(i=0; i<166667; i++) table[i]=NULL;
	for(j=0; j<10; j++) ans[j]=0;
	
	scanf("%lu %lu %lu", &H, &W, &N);
	a = MALLOC(unsigned long, N);
	b = MALLOC(unsigned long, N);
	for(i=0; i<N; i++){
		scanf("%lu %lu", a+i, b+i);
		table[HASH(a[i], W, b[i])]=AddList(table[HASH(a[i], W, b[i])], i);
	}
	
	for(i=0; i<N; i++){
		sl[0][0]=(a[i]<3? 1: a[i]-2);
		sl[0][1]=(b[i]<3? 1: b[i]-2);
		sl[1][0]=(H-a[i]<2? H-2: a[i]);
		sl[1][1]=(W-b[i]<2? W-2: b[i]);
		for(h=sl[0][0]; h<=sl[1][0]; h++){
			for(w=sl[0][1]; w<=sl[1][1]; w++){
				j=0;
				for(k=0; k<9; k++){
					ax=h+k/3;
					bx=w+k%3;
					lp=table[HASH(ax, W, bx)];
					while(lp!=NULL && !(ax==a[lp->item] && bx==b[lp->item])) lp=lp->next;
					if(lp!=NULL) finded=1;
					else finded=0;
					if(finded==1 && lp->item<i){
						j=0;
						break;
					}
					else if(finded==1) j++;
					
				}
				ans[j]++;
			}
		}
	}
	ans[0]=(unsigned long long)(H-2)*(unsigned long long)(W-2);
	for(j=1; j<10; j++) ans[0] -= ans[j];
	
	for(j=0; j<10; j++) printf("%lu\n", ans[j]);
	
	free(a);
	free(b);
	for(i=0; i<166667; i++) KillList(table[i]);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:32:35: error: expected ';' before 'List'
   32 |         unsigned long long ans[10]
      |                                   ^
      |                                   ;
   33 |         List *table[166667], *lp;
      |         ~~~~                       
main.c:36:29: error: 'ans' undeclared (first use in this function); did you mean 'abs'?
   36 |         for(j=0; j<10; j++) ans[j]=0;
      |                             ^~~
      |                             abs
main.c:36:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#include <bitset>
#include <map>

#define INF_LL 9000000000000000000
#define INF 2000000000

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

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;

class Union_find{
private:
	vector<int> par;
	vector<int> rank;
	int n;

public:
	Union_find(int a){
		n = a;
		for(int i = 0;i < n;i++){
			par.push_back(i);
			rank.push_back(0);
		}
	}

	int find(int x){
		if(par[x] == x){
			return x;
		}else{
			return par[x] = find(par[x]);
		}
	}

	void unite(int x, int y){
		x = find(x);
		y = find(y);
		if(x == y) return;

		if(rank[x] < rank[y]){
			par[x] = y;
		}else{
			par[y] = x;
			if(rank[x] == rank[y]) rank[x]++;
		}
	}

	bool same(int x, int y){
		return find(x) == find(y);
	}
};
int main(){
  int h,w,n;
  cin>>h>>w>>n;
 
  map<pair<int,int>,int> cnt;
  while(n--){
    int a,b;
    cin>>a>>b;
    a--;
    b--;
    for(int i==0;i<3;i++){
      for(int j=0;j<3;j++){
        if(a+i>=0&&b+j>=0){
          cnt[make_pair(a+i,b+j)]++;
        }
      }
    }
  }
  long long ans[10] = {(long long)(h-2)*(w-2)};
  for(auto& elem : cnt){
    ans[0]--;
    ans[elem.second]++;
  }
 
  for(int i=0;i<10;i++){
    cout<<ans[i]<<endl;
  }
  return 0;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:73:14: error: expected ';' before '==' token
   73 |     for(int i==0;i<3;i++){
      |              ^~
      |              ;
a.cc:73:14: error: expected primary-expression before '==' token
   73 |     for(int i==0;i<3;i++){
      |              ^~
a.cc:73:21: error: expected ')' before ';' token
   73 |     for(int i==0;i<3;i++){
      |        ~            ^
      |                     )
a.cc:73:22: error: 'i' was not declared in this scope
   73 |     for(int i==0;i<3;i++){
      |                      ^
a.cc: At global scope:
a.cc:92:1: error: expected declaration before '}' token
   92 | }
      | ^
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;

int H, W, N;
int a, b;
set<pair<int, int> > kuro;
ll dp[10];

signed main()
{
	cin >> H >> W >> N;
	rep(i,10) dp[i] = 0;
	dp[0] = (H - 2) * (W - 2);

	rep(i,N) {
		cin >> a >> b;
		for (int x=max(1, b-2); x<=b; x++) {
			if (!(b+2 <= W)) continue;
			for (int y=max(1, a-2); y<=a; y++) {
				if (!(a+2 <= H)) continue;
				int kuro_num = 0;
				rep(xx,3) rep(yy,3) {
					if (kuro.find(make_pair(a + xx, b + yy)) != kuro.end()) {
						kuro_num++;
					}
				}
				dp[kuro_num-1]--;
				dp[kuro_num]++;
			}
		}
		set.insert(make_pair(a, b));
	}

	rep(i,10) cout << dp[i] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:20: error: expected unqualified-id before '.' token
   34 |                 set.insert(make_pair(a, b));
      |                    ^
Language: C++

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

main(){
    long long X; 
    cin >> X;
    int N=log10(X)+1;
    int M=pow(2,N-1);
    int S=0;
    for (int i=0;i<M;i++){
        int A=X;
        int SUM=0;
        int L=0;
        int j=i;
        for (int i2=0;i2<N;i2++){
            int L=L+1;
            if (j%2==1){
                SUM=SUM+A%pow(10,L);
                A=A/10;
                L=0;
            }
            j=i/2
        }
        SUM=SUM+A;
        S=S+SUM;
    }
    cout << S << endl;
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:26: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   18 |                 SUM=SUM+A%pow(10,L);
      |                         ~^~~~~~~~~~
      |                         |    |
      |                         int  __gnu_cxx::__promote<double>::__type {aka double}
a.cc:22:18: error: expected ';' before '}' token
   22 |             j=i/2
      |                  ^
      |                  ;
   23 |         }
      |         ~
Language: C++

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

main(){
    long long X; 
    cin >> X;
    int N=log10(X)+1;
    int M=pow(2,N-1);
    int S=0;
    for (int i=0;i<M;i++){
        int A=X;
        int SUM=0;
        int L=0;
        j=i;
        for (int i2=0;i2<N;i2++){
            L=L+1;
            if (j%2==1){
                SUM=SUM+A%pow(10,L);
                A=A/10;
                L=0;
            }
            j=i/2
        }
        SUM=SUM+A;
        S=S+SUM;
    }
    cout << S << endl;
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:14:9: error: 'j' was not declared in this scope
   14 |         j=i;
      |         ^
a.cc:18:26: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   18 |                 SUM=SUM+A%pow(10,L);
      |                         ~^~~~~~~~~~
      |                         |    |
      |                         int  __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

int main()
{
   int length,sum = 0,num = 0;
   string S,T = "";
   cin >> S;

   length = S.size()-1;
   for(int mask = 0;mask < (1<<length)); mask++){
      for(int i=0;i<length;i++){
         if(mask & (1<<i)){
            for(int j = num;j <= i; j++)T += S.at(j);
            num += stoi(T);
            T = "";
         } 
      }
   }
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:39: error: expected ';' before ')' token
   11 |    for(int mask = 0;mask < (1<<length)); mask++){
      |                                       ^
      |                                       ;
a.cc:11:42: error: 'mask' was not declared in this scope; did you mean 'std::filesystem::perms::mask'?
   11 |    for(int mask = 0;mask < (1<<length)); mask++){
      |                                          ^~~~
      |                                          std::filesystem::perms::mask
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:162:7: note: 'std::filesystem::perms::mask' declared here
  162 |       mask              = 07777,
      |       ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main () {
  string S;
  cin >> S;
  const int num = S.size() - 1;
 
  int64_t ans = 0;
 
  for (int tmp = 0; tmp < (1 << num); tmp++) {
    bitset<num> b(tmp);  

    int sum = 0;
    string T = "";
    for (int i = 0; i < num; i++) {
      if(b.test(0)){
        sum += stoi(T);
        T = "";
      }else{
      	T += S.at(i);
      }
      b >>;
      ans += sum;
    } 
  }
  
  cout << ans << endl;
 

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: the value of 'num' is not usable in a constant expression
   12 |     bitset<num> b(tmp);
      |               ^
a.cc:7:13: note: 'num' was not initialized with a constant expression
    7 |   const int num = S.size() - 1;
      |             ^~~
a.cc:12:15: note: in template argument for type 'long unsigned int'
   12 |     bitset<num> b(tmp);
      |               ^
a.cc:17:12: error: request for member 'test' in 'b', which is of non-class type 'int'
   17 |       if(b.test(0)){
      |            ^~~~
a.cc:23:11: error: expected primary-expression before ';' token
   23 |       b >>;
      |           ^
Language: C

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

typedef long long ll;
#define rep(i, n) for(int i = 0; i < (int)(n); i ++)

int main(){
    string s; cin >> s;

    int sz = s.size();

    ll all_pat = pow(2, sz - 1);

    ll ans = 0;
    reverse(s.begin(), s.end());
    rep(pat, all_pat){
        ll d = 1;
        
        for(int i = 0; i < sz - 1; i ++){
            ans += (s.at(i) - '0') * d;
            if((pat >> i) & 1) d = 1;
            else d *= 10;
        }

        ans += (s.at(sz - 1) - '0') * d;
    }

    cout << ans << endl;
}

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

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

int main() {
    int n;
    string str;
    string copy;
    cin >> str;
    copy = str;
    n = str.length() - 1;//+を入れることができる場所の数
    long long  total = 0LL;
    for (int bit = 0; bit < (1 << n); ++bit)
    {
       
        vector<int> S;
        for (int i = 0; i < n; ++i) {
            if (bit & (1 << i)) { 
                S.push_back(i+1);
            }
        }

       
        for (int i = (int)S.size()-1; i>=0; --i) {
            if (i == (int)S.size() - 1)
                total += stoll(str.substr(S[i]));
            else total += stoll(str.substr(S[i], S[i+1]-S[i]));
            if (i == 0) {
                total += stoll(str.erase(S[i]));
                str = copy;
             }
            
               
            
        }
        if ((int)S.size() == 0) total += stoll(str);
    }
    cout << total ;
    
    

}

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

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

int main() {
	string str;
	cin >> str;
	long long ans = 0, tmp;
	for (int i = 0;i < pow(2,str.size()-1);i++) {
		bitset<9> s(i);

		tmp = str[0] - '0';
		for (int j = 0;j < str.size()-1;j++) {
			if (s.test(j)) {
				ans += tmp;
				tmp = str[j + 1] - '0';
			}
			else {
				tmp *= 10;
				tmp += str[j + 1] - '0';
			}
		}
		ans += tmp;
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: 'pow' was not declared in this scope
    9 |         for (int i = 0;i < pow(2,str.size()-1);i++) {
      |                            ^~~
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
#include <cmath>
#define intt long long

int main() {
	std::string S; std::cin >> S;
	int N = S.size() - 1;
	int ans = 0;
	for (int bit = 0; bit < (1 << N); ++bit) {
		int total = 0;
		for (int i = 0; i < N; ++i) {
			total *= 10;
			total += S[i] - '0';
			if (bit & (1 << i)) {
				ans += total;
				total = 0;
			}
		}
		total *= 10;
		total += S[N - 1] - '0';
		ans += total;
	}
	std:::cout << ans << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: expected unqualified-id before ':' token
   27 |         std:::cout << ans << std::endl;
      |              ^
Language: C++

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

int main() {
  string S;
  cin >> S;
  int size = S.size();
  
  long sum = 0;
  for (int i = 0; i < size; i++){
    for (int j = i + 1; j <= size; j++){
      long target = atoi(S.substr(i, j - i).c_str());
      int insert_space = 0;
      if (i > 1) insert_space += i - 1;
      if (size - j > 1) insert_space += size - j - 1;
      sum += target * pow(2, insert_space);
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:18:4: error: expected '}' at end of input
   18 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <string>
 
using namespace std;
 
long add(const string& numbers, const int& bitsOfPlusPosition);
 
int main() {
    string numbers;
    cin >> numbers;
    
    long answer = 0;
    for (int bits = 0; bits < (1 << (numbers.size() - 1)); ++bits) {
        answer += add(numbers, bits);
    }
    cout << answer << endl;       
}
 
long add(const string& numbers, const int bitsOfPlusPosition) {
    const int DECIMAL_BASE = 10;
    long sum = 0;
    long term = 0;
    for (size_t i = 0U; i < numbers.size(); ++i) {
        term *= DECIMAL_BASE;
        term += numbers.at(i) - '0';
        if (bitsOfPlusPosition & (1 << i) || i == numbers.size() - 1) {
            sum += term;
            term = 0;
        }
    }
    return sum;
}

Compiler output:
/usr/bin/ld: /tmp/cct5qwac.o: in function `main':
a.cc:(.text+0x4b): undefined reference to `add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&)'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <string>
 
using namespace std;
 
long add(const string& numbers, const int& bitsOfPlusPosition);
 
int main() {
    string numbers;
    cin >> numbers;
    
    long answer = 0;
    for (int bits = 0; bits < (1 << (numbers.size() - 1)); ++bits) {
        answer += add(numbers, bits);
    }
    cout << answer << endl;       
}
 
long add(const string& numbers, const int& bitsOfPlusPosition) {
    const int DICIMAL_BASE = 10;
    long sum = 0;
    long term = 0;
    for (size_t i = 0U; i < numbers.size(); ++i) {
        term *= DECIMAL_BASE;
        term += numbers.at(i) - '0';
        if (bitsOfPlusPosition & (1 << i) || i == numbers.size() - 1) {
            sum += term;
            term = 0;
        }
    }
    return sum;
}

Compiler output:
a.cc: In function 'long int add(const std::string&, const int&)':
a.cc:24:17: error: 'DECIMAL_BASE' was not declared in this scope; did you mean 'DICIMAL_BASE'?
   24 |         term *= DECIMAL_BASE;
      |                 ^~~~~~~~~~~~
      |                 DICIMAL_BASE
Language: C++

#include <bits/stdc++.h>
/* 本当は個別にヘッダファイルを読みだすべき
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
*/

using namespace std;

#define rep(i,a,n) for(int i=a,i<n,i++)
#define vvi vector<vector<int>>
#define vi vector<int>
#define pi pair<int,int>

#define ti tuple<int,int,int>
#define gi get<i> //get<i>(data)

int ctoi(char c){
    if(c >= '0' && c <= '9'){
        return c-'0';
    }
    return 0;
}

long long answer = 0;

int dfs(string s, int i, long long presum, long long sum){
    if(i == s.size() -1){//最後の文字まで到達
        sum += presum + ctoi(s.at(i));
        answer += sum;//答えに足して終了させる
        return 0;
    }else{
        presum += ctoi(s.at(i));
        dfs(s,i+1,presum*10,sum);
        sum += presum;
        dfs(s,i+1,0,sum);
        return 0;
    }
}

int main(){
    string S;
    cin >> S;
    
    dfs(s,0,0,0);
    cout << answer << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:9: error: 's' was not declared in this scope
   59 |     dfs(s,0,0,0);
      |         ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string a;
  int sum=0;
  cin >> a;
  for(int i=1;i<=a.size()-1;i++){
    a.insert(a[i],"+");
    sum+=a;
  }
  cout<<sum<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: no match for 'operator+=' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   10 |     sum+=a;
      |     ~~~^~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  str a;
  int sum=0;
  cin >> a;
  for(int i=1;i<=a.size()-1;i++){
    a.insert(a[i],"+");
    sum+=a;
  }
  cout<<sum<<endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |   str a;
      |   ^~~
      |   std
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin >> a;
      |          ^
Language: C

#include<bits/stdc++.h>
using namespace std;
int a[15];
int num=1,len;
long long ans=0;
string s;
int main()
{
	cin>>s;
	len=s.size();
	for(int i=0;i<len;i++)
		a[i+1]=(s[i]-'0');
	for(int i=1;i<len;i++)
		num*=2;
	for(int i=0;i<num;i++)
	{
		bool b[15]={0};
		int tmp=i;
		int k=1;
		while(tmp)
			b[k++]=tmp%2,tmp/=2;
		long long cn=0;
		for(int j=1;j<=len;j++)
		{
			cn=cn*10+a[j];
			if(b[j])
			{
				ans+=cn;
				cn=0;
			}
		}
		ans+=cn;
	}
	cout<<ans; 

	return 0;
}


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

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

int main(){
  int N,M=0,sum=0,X=1;
  cin>>N;
  int n=N;
  while(!(n/10==0)){
    sum++;
    n /=10
  }
  int c=pow(2, sum);
  for(int tmp=0;tmp<c;tmp++){
    bitset<9> A(tmp);
    int s=N;
    int t=1;
    for(int i=0;i<sum;i++){
      if(A.test(i)){
        int a=pow(10, t);
        M +=s%a;
        s /=a;
        t =1;
      }
      else t++;
    }
    M +=s;
  }
  cout<<M<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before '}' token
   10 |     n /=10
      |           ^
      |           ;
   11 |   }
      |   ~
Language: C++

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

int main(){
  int N,M=0,sum=0,X=1;
  cin>>N;
  int n=N
  while(!(n/10==0)){
    sum++;
    n /=10
  }
  int c=pow(2, sum);
  for(int tmp=0;tmp<c;tmp++){
    bitset<9> A(tmp);
    int s=N;
    int t=1;
    for(int i=0;i<sum;i++){
      if(A.test(i)){
        int a=pow(10, t);
        M +=s%a;
        s /=a;
        t =1;
      }
      else t++;
    }
    M +=s;
  }
  cout<<M<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'while'
    8 |   while(!(n/10==0)){
      |   ^~~~~
Language: C++

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

int main(){
  int N,M=0,sum=0,X=1;
  cin>>N;
  while(!(N/10==0)){
    sum++;
  }
  for(int tmp=0;tmp<pow(2, sum);tmp++){
    bitset<9> A(tmp);
    int s=N;
    int t=1;
    for(int i=0;i<sum;i++){
      if(A.test(i)){
        M +=s%pow(10, t);
        s /=pow(10, t);
        t =1;
      }
      else t++;
    }
    M +=s;
  }
  cout<<M<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   16 |         M +=s%pow(10, t);
      |             ~^~~~~~~~~~~
      |             |    |
      |             int  __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

int main(){
  int N,M=0,sum=0,X=1;
  cin>>N;
  while(!(N/10==0)){
    sum++;
  }
  for(int tmp=0;tmp<pow(2, sum);tmp++){
    bitset<9> A(tmp)
    int s=N;
    int t=1;
    for(int i=0;i<sum;i++){
      if(A.test(i)){
        M +=s%pow(10, t);
        s /=pow(10, t);
        t =1;
      }
      else t++;
    }
    M +=s;
  }
  cout<<M<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'int'
   12 |     int s=N;
      |     ^~~
a.cc:16:13: error: 's' was not declared in this scope
   16 |         M +=s%pow(10, t);
      |             ^
a.cc:22:9: error: 's' was not declared in this scope
   22 |     M +=s;
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define inf 1001001001001001001
#define mod 1000000007
#define mod2 998244353
#define pi acos(-1)
#define all(v) v.begin(),v.end()

int main(){
    string s;
    cin>>s;
    int sum=0;
    for(int i=0;i<s.size();i++){
        int a,b;
        string str="";
        char c;
        for(ll l=0;l<i;l++){
            c=s.at(l);
            str+=c;
        }
        a=stoi(str);
        string str="";
        for(ll l=i;l<s.size();l++){
            c=s.at(l);
            str+=c;
        }
        b=stoi(str);
        sum+=(a+b);
    }
    cout<<sum<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: redeclaration of 'std::string str'
   24 |         string str="";
      |                ^~~
a.cc:17:16: note: 'std::string str' previously declared here
   17 |         string str="";
      |                ^~~
Language: C++

#include "bits/stdc++.h"

#define REP(i,n) for(int i=0;i< (n);i++)
#define REPR(i, n) for(int i = (n);i >= 0;i--)
#define FOR(i, m, n) for(int i = (m);i < (n);i++)
#define FORR(i, m, n) for(int i = (m);i >= (n);i--)
#define SORT(v, n) std::sort(v, v+n);
#define VSORT(v) std::sort(v.begin(), v.end());
#define VRSORT(v) std::sort(v.rbegin(), v.rend());
#define ll long long
#define pb(a) push_back(a)
#define ALL(obj) (obj).begin(),(obj).end()

using namespace std;

const int INF = 99999999;
const ll LINF = 9999999999999;

typedef pair<ll, ll> LP;
int dx[4] = { 1,0,-1,0 };
int dy[4] = { 0,1,0,-1 };


string S;

ll dfs(ll index,ll times,ll num) {
	ll add = ll(S[index] - '0') * times;
	if (index + 1 == ll(S.size())) {return num + add; }
	return dfs(index + 1, times * 10,num+ add) + dfs(index + 1, 1, num + add);
}

int main() {
	cin >> S;
	reverse(ALL(S));

	cout << dfs(0, 1,0)<<endl;

	return 0;
}

Compiler output:
a.cc: In function 'long long int dfs(long long int, long long int, long long int)':
a.cc:10:12: error: expected primary-expression before 'long'
   10 | #define ll long long
      |            ^~~~
a.cc:27:18: note: in expansion of macro 'll'
   27 |         ll add = ll(S[index] - '0') * times;
      |                  ^~
a.cc:10:12: error: expected primary-expression before 'long'
   10 | #define ll long long
      |            ^~~~
a.cc:28:26: note: in expansion of macro 'll'
   28 |         if (index + 1 == ll(S.size())) {return num + add; }
      |                          ^~
a.cc:28:25: error: expected ')' before 'long'
   28 |         if (index + 1 == ll(S.size())) {return num + add; }
      |            ~            ^
      |                         )
Language: C++

#include "bits/stdc++.h"

#define REP(i,n) for(int i=0;i< (n);i++)
#define REPR(i, n) for(int i = (n);i >= 0;i--)
#define FOR(i, m, n) for(int i = (m);i < (n);i++)
#define FORR(i, m, n) for(int i = (m);i >= (n);i--)
#define SORT(v, n) std::sort(v, v+n);
#define VSORT(v) std::sort(v.begin(), v.end());
#define VRSORT(v) std::sort(v.rbegin(), v.rend());
#define ll long long
#define pb(a) push_back(a)
#define ALL(obj) (obj).begin(),(obj).end()

using namespace std;

const int INF = 99999999;
const ll LINF = 9999999999999;

typedef pair<ll, ll> LP;
int dx[4] = { 1,0,-1,0 };
int dy[4] = { 0,1,0,-1 };


string S;

ll dfs(ll index,ll times,ll num) {
	ll add = long long(S[index]- long long('0')) * times;
	if (index + 1 == ll(S.size())) {return num + add; }
	return dfs(index + 1, times * 10,num+ add) + dfs(index + 1, 1, num + add);
}

int main() {
	cin >> S;
	reverse(ALL(S));

	cout << dfs(0, 1,0)<<endl;

	return 0;
}

Compiler output:
a.cc: In function 'long long int dfs(long long int, long long int, long long int)':
a.cc:27:18: error: expected primary-expression before 'long'
   27 |         ll add = long long(S[index]- long long('0')) * times;
      |                  ^~~~
a.cc:10:12: error: expected primary-expression before 'long'
   10 | #define ll long long
      |            ^~~~
a.cc:28:26: note: in expansion of macro 'll'
   28 |         if (index + 1 == ll(S.size())) {return num + add; }
      |                          ^~
a.cc:28:25: error: expected ')' before 'long'
   28 |         if (index + 1 == ll(S.size())) {return num + add; }
      |            ~            ^
      |                         )