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

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>

using namespace std;
typedef long long  ll;

const int N = 100010;
int a[N], b[N];
map<pair<int, int> , int> hash;
long long ans[10];

int cal(int x, int y) {
	int res = 0;
	for (int i = x; i <= x + 2; i++)
		for (int j = y; j <= y + 2; j++)
			if (hash.find(make_pair(i, j)) != hash.end()) {
				res++;
			}
	return res;
}

int main() {
	int m, n, k;
	scanf("%d %d %d", &m, &n, &k);
	for (int i = 1; i <= k; i++) {
		scanf("%d %d", &a[i], &b[i]);
		hash[make_pair(a[i], b[i])] = 1;
	}
	for (int i = 1; i <= k; i++) {
		for (int x = max(1, a[i] - 2); x <= a[i]; x++)
			for (int y = max(1, b[i] - 2); y <= b[i]; y++) {
				if (x + 2 > m || y + 2 > n) continue;
				int d = cal(x, y);
				ans[d] ++;
			}
	}
	ans[0] = (long long)(m - 2) * (n - 2);
	for (int i = 1; i <= 9; i++) {
		ans[i] /= i;
		ans[0] -= ans[i];
	}
	for (int i = 0; i <= 9; i++)
		printf("%lld\n", ans[i]);
	return 0;
}


Compiler output:
a.cc: In function 'int cal(int, int)':
a.cc:19:29: error: reference to 'hash' is ambiguous
   19 |                         if (hash.find(make_pair(i, j)) != hash.end()) {
      |                             ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 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/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:12:27: note:                 'std::map<std::pair<int, int>, int> hash'
   12 | map<pair<int, int> , int> hash;
      |                           ^~~~
a.cc:19:59: error: reference to 'hash' is ambiguous
   19 |                         if (hash.find(make_pair(i, j)) != hash.end()) {
      |                                                           ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:12:27: note:                 'std::map<std::pair<int, int>, int> hash'
   12 | map<pair<int, int> , int> hash;
      |                           ^~~~
a.cc: In function 'int main()':
a.cc:30:17: error: reference to 'hash' is ambiguous
   30 |                 hash[make_pair(a[i], b[i])] = 1;
      |                 ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:12:27: note:                 'std::map<std::pair<int, int>, int> hash'
   12 | map<pair<int, int> , int> hash;
      |                           ^~~~
Language: C++

dp=["","+"]
s=input()
su=0
for i in range(2**(len(s)-1)):
    val=""
    for j in range(len(s)-1):
        val+=s[j]
        val+=dp[int(bin(i)[j+2])]
    val+=s[len(s)-1]
    su+=eval(val)
print(su)


Compiler output:
a.cc:1:1: error: 'dp' does not name a type
    1 | dp=["","+"]
      | ^~
Language: Java

import java.util.Scanner;

public class main{
	static int[] fact = new int[10];
	static int[] sum = new int[10];

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String	str = sc.next();
		long[] num = new long[str.length()];

		for(int i=0; i<str.length(); i++){
			num[i] = str.charAt(i) - '0';
		}

		Factrial();

		int bfr = 0, aft = str.length()-1;
		long ans = 0;
		while(aft>-1){
			for(int i=aft; i>=0; i--){
				ans += num[bfr]*fact[(i>0)?i-1:0]*fact[bfr];
				num[bfr] *= 10;
			}
			bfr++;
			aft--;
		}

		System.out.println(ans);
	}

	public static void Factrial(){
		fact[0] = 1;
		sum[0] = fact[0];
		for(int i=1; i<10; i++){
			fact[i] = fact[i-1]*2;
			sum[i] = sum[i-1]+fact[i];
		}
	}
}

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

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

using namespace std;

#define	GETBIT(X, Data)			((Data >> (X)) & 0x01)
#define	SETBIT_ON(X, Data)		((0x01 << (X)) | Data)
#define SETBIT_OFF(X, Data)		((~(0x01 << (X))) & Data)

unsigned long long SubInt(const int& s, const int& e, const string& input)
{
	char str[20] = { 0 };
	memcpy(str, &input[s], e - s + 1);	
	return atoll(str);
}

unsigned long long SolveOptStr(const int& opts, const string& input)
{
	int s, e;
	unsigned long long r;
	s = 0;
	e = 0;
	r = 0;
	for (size_t i = 0; i < input.length(); ++i)
	{
		int k = GETBIT(input.length() - 1 - i, opts);
		if (GETBIT(input.length() - 1 - i, opts) == 0)
		{
			++e;
			continue;
		}

		r += SubInt(s, e, input);
		s = i + 1;
		e = i + 1;
	}

	return r;
}

void InitOpts(int& opts)
{
	opts = 0x01;
}

void OptsPlus(int& opts)
{
	opts = (((opts >> 1) + 1) << 1) | 0x01;
}

int main(int argc, char* argv[])
{
	string	S;
	cin >> S;

	int opts;
	InitOpts(opts);
	
	unsigned long long res = 0;
	size_t loop = (size_t)pow(2, S.length() - 1);
	for (size_t i = 0; i < loop; ++i)
	{
		res += SolveOptStr(opts, S);
		OptsPlus(opts);
	}

	cout << res << endl;

	return 0;
}

Compiler output:
a.cc: In function 'long long unsigned int SubInt(const int&, const int&, const std::string&)':
a.cc:15:9: error: 'memcpy' was not declared in this scope
   15 |         memcpy(str, &input[s], e - s + 1);
      |         ^~~~~~
a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <vector>
  +++ |+#include <cstring>
    4 | #include <string>
a.cc: In function 'int main(int, char**)':
a.cc:62:31: error: 'pow' was not declared in this scope
   62 |         size_t loop = (size_t)pow(2, S.length() - 1);
      |                               ^~~
Language: C++

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

using namespace std;

#define	GETBIT(X, Data)			((Data >> (X)) & 0x01)
#define	SETBIT_ON(X, Data)		((0x01 << (X)) | Data)
#define SETBIT_OFF(X, Data)		((~(0x01 << (X))) & Data)

unsigned long long SubInt(const int& s, const int& e, const string& input)
{
	char str[20] = { 0 };
	memcpy(str, &input[s], e - s + 1);	
	return _atoi64(str);
}

unsigned long long SolveOptStr(const int& opts, const string& input)
{
	int s, e;
	unsigned long long r;
	s = 0;
	e = 0;
	r = 0;
	for (size_t i = 0; i < input.length(); ++i)
	{
		int k = GETBIT(input.length() - 1 - i, opts);
		if (GETBIT(input.length() - 1 - i, opts) == 0)
		{
			++e;
			continue;
		}

		r += SubInt(s, e, input);
		s = i + 1;
		e = i + 1;
	}

	return r;
}

void InitOpts(int& opts)
{
	opts = 0x01;
}

void OptsPlus(int& opts)
{
	opts = (((opts >> 1) + 1) << 1) | 0x01;
}

int main(int argc, char* argv[])
{
	string	S;
	cin >> S;

	int opts;
	InitOpts(opts);
	
	unsigned long long res = 0;
	size_t loop = (size_t)pow(2, S.length() - 1);
	for (size_t i = 0; i < loop; ++i)
	{
		res += SolveOptStr(opts, S);
		OptsPlus(opts);
	}

	cout << res << endl;

	return 0;
}

Compiler output:
a.cc: In function 'long long unsigned int SubInt(const int&, const int&, const std::string&)':
a.cc:14:9: error: 'memcpy' was not declared in this scope
   14 |         memcpy(str, &input[s], e - s + 1);
      |         ^~~~~~
a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <vector>
  +++ |+#include <cstring>
    3 | #include <string>
a.cc:15:16: error: '_atoi64' was not declared in this scope; did you mean 'atoi'?
   15 |         return _atoi64(str);
      |                ^~~~~~~
      |                atoi
a.cc: In function 'int main(int, char**)':
a.cc:61:31: error: 'pow' was not declared in this scope
   61 |         size_t loop = (size_t)pow(2, S.length() - 1);
      |                               ^~~
Language: C++

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

using namespace std;

#define	GETBIT(X, Data)			((Data >> (X)) & 0x01)
#define	SETBIT_ON(X, Data)		((0x01 << (X)) | Data)
#define SETBIT_OFF(X, Data)		((~(0x01 << (X))) & Data)

unsigned __int64 SubInt(const int& s, const int& e, const string& input)
{
	char str[20] = { 0 };
	memcpy(str, &input[s], e - s + 1);	
	return _atoi64(str);
}

unsigned __int64 SolveOptStr(const int& opts, const string& input)
{
	int s, e;
	unsigned __int64 r;
	s = 0;
	e = 0;
	r = 0;
	for (size_t i = 0; i < input.length(); ++i)
	{
		int k = GETBIT(input.length() - 1 - i, opts);
		if (GETBIT(input.length() - 1 - i, opts) == 0)
		{
			++e;
			continue;
		}

		r += SubInt(s, e, input);
		s = i + 1;
		e = i + 1;
	}

	return r;
}

void InitOpts(int& opts)
{
	opts = 0x01;
}

void OptsPlus(int& opts)
{
	opts = (((opts >> 1) + 1) << 1) | 0x01;
}

int main(int argc, char* argv[])
{
	string	S;
	cin >> S;

	int opts;
	InitOpts(opts);
	
	unsigned __int64 res = 0;
	size_t loop = (size_t)pow(2, S.length() - 1);
	for (size_t i = 0; i < loop; ++i)
	{
		res += SolveOptStr(opts, S);
		OptsPlus(opts);
	}

	cout << res << endl;

	return 0;
}

Compiler output:
a.cc:11:18: error: expected initializer before 'SubInt'
   11 | unsigned __int64 SubInt(const int& s, const int& e, const string& input)
      |                  ^~~~~~
a.cc:18:18: error: expected initializer before 'SolveOptStr'
   18 | unsigned __int64 SolveOptStr(const int& opts, const string& input)
      |                  ^~~~~~~~~~~
a.cc: In function 'int main(int, char**)':
a.cc:60:26: error: expected initializer before 'res'
   60 |         unsigned __int64 res = 0;
      |                          ^~~
a.cc:61:31: error: 'pow' was not declared in this scope
   61 |         size_t loop = (size_t)pow(2, S.length() - 1);
      |                               ^~~
a.cc:64:17: error: 'res' was not declared in this scope
   64 |                 res += SolveOptStr(opts, S);
      |                 ^~~
a.cc:64:24: error: 'SolveOptStr' was not declared in this scope
   64 |                 res += SolveOptStr(opts, S);
      |                        ^~~~~~~~~~~
a.cc:68:17: error: 'res' was not declared in this scope
   68 |         cout << res << endl;
      |                 ^~~
Language: C++

s = input()
int_s = [int(i) for i in s]
l = len(int_s)
total_patterns = 2 << (l - 2)


def calc_sum(s):
    # '+'を区切りとして和を求める
    num = s.split('+')
    return sum(list(map(int, num)))

ans = 0
for i in range(total_patterns):
    between = format(i,'b').zfill(l - 1) # 10進数を2進数に変換
    tmp = ''
    for j in range(len(between)):
        if between[j] == '1':
            tmp += (s[j] + '+')
        else:
            tmp += s[j]
    tmp += s[-1]
    ans += calc_sum(tmp)

print(ans)


Compiler output:
a.cc:8:7: error: invalid preprocessing directive #'+'を区切りとして和を求める
    8 |     # '+'を区切りとして和を求める
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:42: error: stray '#' in program
   14 |     between = format(i,'b').zfill(l - 1) # 10進数を2進数に変換
      |                                          ^
a.cc:15:11: error: empty character constant
   15 |     tmp = ''
      |           ^~
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
    #ifdef DEBUG
        #define debug(...) printf(__VA_ARGS__)
    #else
        #define debug(...) (void)0
    #endif
    #define mp make_pair
    #define pb push_back
    #define LL long long
    #define pii pair<int,int>
    #define PII pair<long long, long long>
    #define fi first
    #define se second
    #define all(x) (x).begin(),(x).end()
    #define SZ(x) ((int)(x).size())
    const int inf = 0x7fffffff; //beware overflow
    const LL INF = 0x7fffffffffffffff; //beware overflow
    #define mem(x, y) memset(x, (y), sizeof(x) );
    #define IOS ios_base::sync_with_stdio(0); cin.tie(0)
    template<typename A, typename B>
    ostream& operator <<(ostream &s, const pair<A,B> &p) {
         return s<<"("<<p.first<<","<<p.second<<")";
    }
    template<typename T>
    ostream& operator <<(ostream &s, const vector<T> &c) {
        s << "[ ";
        for (auto it : c) s << it << " ";
        s << "]";
        return s;
    }
    template<typename T>
    ostream& operator << (ostream &o, const set<T> &st) {
        o << "{";
        for (auto it=st.begin(); it!=st.end(); it++) o << (it==st.begin() ? "" : ", ") << *it;
        return o << "}";
    }
    template<typename T1, typename T2>
    ostream& operator << (ostream &o, const map<T1, T2> &mp) {
        o << "{";
        for (auto it=mp.begin(); it!=mp.end(); it++) {
            o << (it==mp.begin()?"":", ") << it->fi << ":" << it->se;
        }
        o << "}";
        return o;
    }
    #define maxn 100005
    int n, m;
    struct edge{ int u, v, c; };
    vector<edge> e;
    vector<int> G[maxn];
    int d[maxn];
    set<int> Prev[maxn];
    struct state{
        int d;
        int u;
        bool operator < (const state& rhs) const {
            return d < rhs.d;
        }
    };
    int main() {
        cin>>n>>m;
        for(int i = 0; i < m; i++) {
            int p, q, c;
            scanf("%d %d %d", &p, &q, &c);
            G[p].pb( SZ(e) );
            G[q].pb( SZ(e) );
            e.pb( edge{p, q, c} );
        }
        fill(d, d+1+n, 1e9);
        d[1] = 0;
        priority_queue<state> que;
        que.push( state{ 0,1} );
        while(!que.empty() ) {
            state tp = que.top(); que.pop();
            int u = tp.u;
     
            if( -tp.d > d[u] ) continue;
            for( int e_ind : G[u] ) {
               int D = -dis[u];
                int v = (e[e_ind].u==u)? e[e_ind].v:e[e_ind].u;
                int now = D + !Prev[u].count( e[e_ind].c);
     
                if( now < d[v] )
                    d[v] = now,
                    Prev[v].clear(),
                    Prev[v].insert(e[e_ind].c),
                    que.push( state{ -d[v], v } );
                else if (now == d[v])
                    Prev[v].insert( e[e_ind].c ) ;
            }
        }
        if( d[n] == 1e9 ) puts("-1");
        else cout<<d[n]<<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:80:25: error: 'dis' was not declared in this scope; did you mean 'div'?
   80 |                int D = -dis[u];
      |                         ^~~
      |                         div
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <set>
#include <map>
#include <unordered_map>
#include <vector>
#include <queue>
#include <string>
#include <iomanip>
#include <stdio.h>
#include <cstring>
#include <random>
#include <chrono>
#include <bitset>
#include <fstream>
#include <sstream>
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
 
ll big = 1000000007ll;
float likeabutterfly;
string likeabee;
ll n,m,q,h,k,w;
ll T;
 
ll mod(ll i){
if(i < 0)return mod(i+big*big);
if(i < big)return i;
return i%big;
}
 
ll upp(ll i, ll j){
if(j == 0)return 1;
if(j%2 == 0){
    ll h = upp(i,j/2);
    return mod(h*h);
}
return mod(i*upp(i,j-1));
}
 
vector<vector<ll> > CI(200001 , vector<ll>());
vector<ll> I;
ll A[200001][2];
ll deg[100001] = {0};
 
ll SP[200001][2] = {0};
ll ans = -1;
void dijk(){
 
priority_queue<ll> PQ;
bool mark[200001][2] = {0};
for(ll c1 = 0; c1 < deg[0]; c1++){
    PQ.push(-(1 * 1000000000 + 2*CI[0][c1] + (0 == A[CI[0][c1]][1])));
}
 
 
while(!PQ.empty()){
 
    ll a = -PQ.top();
    PQ.pop();
    ll w = a/1000000000;
    ll b = a%1000000000;
    bool t = b%2;
    ll i = b/2;
 
    if(mark[i][t] == 0){SP[i][t] = w;}
    mark[i][t] = 1;
 
    a = A[i][t^1];
    if(a == n-1){
        
        if(ans == -1){ans = w;}
        ans = min(ans , w);
        return;
    }
    ll c = I[i];
 
    for(ll c1 = 0; c1 < deg[a]; c1++){
        b = CI[a][c1];
        bool t2 = (a == A[CI[a][c1]][1]);
        ll nw = w + (c != I[b]);
        if(mark[b][t2] == 0 && (SP[b][t2] == -1 || SP[b][t2] < nw)){
            if(nw == w){
                mark[b][t2] = 1;
            }
            PQ.push(-(nw * 1000000000 + 2*CI[a][c1] + t2));
        }
    }
 
}
}
 
int main()
{
    ll c1,c2,c3,c4,c5,c6;
    ll a,b,d,e,g;
    ll x,y,z;
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
 
 
 
 scanf("%d %d" , &n &m);
    for(c1 = 0; c1 < m; c1++){
 
        SP[c1][0] = -1;
        SP[c1][1] = -1;
 
         scanf("%d %d % d" , &a &b , &d);
        a--;
        b--;
 
        deg[a]++;
        deg[b]++;
        CI[a].push_back(c1);
        CI[b].push_back(c1);
        A[c1][0] = a;
        A[c1][1] = b;
        I.push_back(d);
    }
    dijk();
    cout << ans << "\n";
 
 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:108:21: error: invalid operands of types 'll*' {aka 'long long int*'} and 'll' {aka 'long long int'} to binary 'operator&'
  108 |  scanf("%d %d" , &n &m);
      |                  ~~ ^~
      |                  |   |
      |                  |   ll {aka long long int}
      |                  ll* {aka long long int*}
a.cc:114:33: error: invalid operands of types 'll*' {aka 'long long int*'} and 'll' {aka 'long long int'} to binary 'operator&'
  114 |          scanf("%d %d % d" , &a &b , &d);
      |                              ~~ ^~
      |                              |   |
      |                              |   ll {aka long long int}
      |                              ll* {aka long long int*}
Language: C++

#include <climits>
#include <cmath>
#include <vector>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <iostream>

using namespace std;

#define MODULE 1000000007
#define MP make_pair

template<class T, class U>
inline void chmin(T &t, U f) { if (t > f)t = f; }

template<class T, class U>
inline void chmax(T &t, U f) { if (t < f)t = f; }

typedef pair<int, int> P;
typedef long long LL;
const int INF = INT_MAX / 2;    //int_max->2*e+9
const int MAXN = 1001;

//------繰り返し二乗法
LL fastPow(LL x,LL n){ // O(logN)
    LL res=1;
    while(n>0){
        if(n&1)res=res*x;
        x=x*x;
        n>>=1;
    }
    return res;
}

LL res=0;

void sumVector(vector<iLL> &nums){
    for (int i = 0; i < nums.size(); ++i) {
        res+=nums.at(i);
    }
}

string s;

void rec(int index,LL num, vector<LL> emittedNums){
    if(index!=s.length()) {
        rec(index + 1, num * 10 + s.at(index) - 48, emittedNums);
        emittedNums.push_back(num);
        rec(index + 1, s.at(index) - 48, emittedNums);
    }else{
        sumVector(emittedNums);
        res+=num;
        return;
    }
}

int main() {
    cin>>s;
    vector<LL> v;
    rec(0,0,v);
    cout<<res/2<<endl;
    return 0;
}

Compiler output:
a.cc:39:23: error: 'iLL' was not declared in this scope; did you mean 'LL'?
   39 | void sumVector(vector<iLL> &nums){
      |                       ^~~
      |                       LL
a.cc:39:26: error: template argument 1 is invalid
   39 | void sumVector(vector<iLL> &nums){
      |                          ^
a.cc:39:26: error: template argument 2 is invalid
a.cc: In function 'void sumVector(int&)':
a.cc:40:30: error: request for member 'size' in 'nums', which is of non-class type 'int'
   40 |     for (int i = 0; i < nums.size(); ++i) {
      |                              ^~~~
a.cc:41:19: error: request for member 'at' in 'nums', which is of non-class type 'int'
   41 |         res+=nums.at(i);
      |                   ^~
a.cc: In function 'void rec(int, LL, std::vector<long long int>)':
a.cc:53:19: error: invalid initialization of reference of type 'int&' from expression of type 'std::vector<long long int>'
   53 |         sumVector(emittedNums);
      |                   ^~~~~~~~~~~
a.cc:39:29: note: in passing argument 1 of 'void sumVector(int&)'
   39 | void sumVector(vector<iLL> &nums){
      |                ~~~~~~~~~~~~~^~~~
Language: C++

#include <climits>
#include <cmath>
#include <vector>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <iostream>

using namespace std;

#define MODULE 1000000007
#define MP make_pair

template<class T, class U>
inline void chmin(T &t, U f) { if (t > f)t = f; }

template<class T, class U>
inline void chmax(T &t, U f) { if (t < f)t = f; }

typedef pair<int, int> P;
typedef long long LL;
const int INF = INT_MAX / 2;    //int_max->2*e+9
const int MAXN = 1001;

//------繰り返し二乗法
LL fastPow(LL x,LL n){ // O(logN)
    LL res=1;
    while(n>0){
        if(n&1)res=res*x;
        x=x*x;
        n>>=1;
    }
    return res;
}

LL res=0;

void sumVector(vector<iLL> &nums){
    for (int i = 0; i < nums.size(); ++i) {
        res+=nums.at(i);
    }
}

string s;

void rec(int index,LL num, vector<LL> emittedNums){
    if(index!=s.length()) {
        rec(index + 1, num * 10 + s.at(index) - 48, emittedNums);
        emittedNums.push_back(num);
        rec(index + 1, s.at(index) - 48, emittedNums);
    }else{
        sumVector(emittedNums);
        res+=num;
        return;
    }
}

int main() {
    cin>>s;
    vector<LL> v;
    rec(0,0,v);
    cout<<res<<endl;
    return 0;
}

Compiler output:
a.cc:39:23: error: 'iLL' was not declared in this scope; did you mean 'LL'?
   39 | void sumVector(vector<iLL> &nums){
      |                       ^~~
      |                       LL
a.cc:39:26: error: template argument 1 is invalid
   39 | void sumVector(vector<iLL> &nums){
      |                          ^
a.cc:39:26: error: template argument 2 is invalid
a.cc: In function 'void sumVector(int&)':
a.cc:40:30: error: request for member 'size' in 'nums', which is of non-class type 'int'
   40 |     for (int i = 0; i < nums.size(); ++i) {
      |                              ^~~~
a.cc:41:19: error: request for member 'at' in 'nums', which is of non-class type 'int'
   41 |         res+=nums.at(i);
      |                   ^~
a.cc: In function 'void rec(int, LL, std::vector<long long int>)':
a.cc:53:19: error: invalid initialization of reference of type 'int&' from expression of type 'std::vector<long long int>'
   53 |         sumVector(emittedNums);
      |                   ^~~~~~~~~~~
a.cc:39:29: note: in passing argument 1 of 'void sumVector(int&)'
   39 | void sumVector(vector<iLL> &nums){
      |                ~~~~~~~~~~~~~^~~~
Language: C++

#include<iostream>
#include<cmath>
#include<stack>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
typedef unsigned long long ll;

ll stol(string s){
	ll res=0;
	rep(i,s.size()){
		res+=(int)(s[i]-'0')*pow(10,s.size()-i-1);
	}
	return res;
}

ll cal(stack<char> ta){
	ll res=0,size=ta.size();
	char a;
	rep(i,size){
		a=ta.top();
		ta.pop();
		res+=(int)(a-'0')*pow(10,i);
	}
	return res;
}

int main(){
	ll n;
	string s;
	cin>>s;
	n=stol(s);
	ll dp[(int)pow(2,s.size()-1)];
	rep(i,(int)pow(2,s.size()-1))dp[i]=0;
	rep(i,(int)pow(2,s.size()-1)){
		stack<char> st;
		rep(j,s.size()-1){
			if((i & (1<<j))){
				st.push(s[j]);
				dp[i]+=cal(st);
				while(!st.empty())st.pop();
			}else{
				st.push(s[j]);
			}
		}
		st.push(s[s.size()-1]);
		dp[i]+=cal(st);
	}
	ll res=0;
	rep(i,(int)pow(2,s.size()-1))res+=dp[i];
	cout<<res<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:15: error: call of overloaded 'stol(std::string&)' is ambiguous
   32 |         n=stol(s);
      |           ~~~~^~~
a.cc:9:4: note: candidate: 'll stol(std::string)'
    9 | ll stol(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:4169:3: note: candidate: 'long int std::__cxx11::stol(const std::string&, std::size_t*, int)'
 4169 |   stol(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
Language: C++

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

using namespace std;
int main(int argc, char* argv[])
{
	string S;
	cin>>S;
	long long sum=0;
	int i=0;
	int sLen = S.length();
	char *pStr = (char*)S.c_str();
	for (i=0;i<sLen;i++){
		sum+=pStr[i]-'0';
	}
	sum+=_atoi64((char*)S.c_str());
	long long x,y;
	for (i=1;i<sLen;i++){
		x=_atoi64(S.substr(0,i).c_str());
		y=_atoi64(S.substr(i,sLen-i).c_str());
		sum += x+y;
	}
	cout<<sum<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:18:14: error: '_atoi64' was not declared in this scope; did you mean 'atoi'?
   18 |         sum+=_atoi64((char*)S.c_str());
      |              ^~~~~~~
      |              atoi
Language: C++

#include<iostream>
#include<string>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<functional>
#include<algorithm>
#define ms0(a) memset(a,0,sizeof(a))
#define ms1(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
using namespace std;
typedef __int64 ll;
const double Eps = (double)0.5;
const int M = 1e9 + 7;
const int N = 1e3 + 5;
const double PI = acos(-1.0);

char aa[15];
int a[15];
ll c[15];
int l;
ll asr =0;

void dfs(int i, int j, int k)
{
    if(l - 1 - i + j < k )
        return ;
    if(j == k)
    {
        for(int o = i; o < l; o++)
        {
            c[j-1] = c[j-1] * 10 + a[o];
        }
        for(int o = 0; o< j; o++)
        {
                asr += c[o];
                //cout<<c[o] << " ";
        }
       // cout<<"\n---------\n";
        return ;
    }

    c[j - 1] = 10 * c[j - 1] + a[i];
    c[j] = 0;
    dfs(i+1, j+1, k);
    dfs(i+1, j, k);
}

/*void dfs(int i, int j)
{
    c[j] = 10 * c[j] + a[i];
}*/

int main()
{
    cin>>aa;
    l = strlen(aa);
    for(int i=0; i<l; i++)
        a[i] = aa[i] - '0';
   /* for(int i=0; i<l;i++)
    {
        asr = 10 * asr + a[i] ;
    }*/
    for(int i=0; i<l; i++)
    {
        c[0] = 0;
        dfs(0, 1, i+1);
       //dfs(0,0)
    }
   // cout <<asr <<endl;
   printf("%I64d\n",asr);
    return 0;
}


Compiler output:
a.cc:17:9: error: '__int64' does not name a type; did you mean '__int64_t'?
   17 | typedef __int64 ll;
      |         ^~~~~~~
      |         __int64_t
a.cc:25:1: error: 'll' does not name a type
   25 | ll c[15];
      | ^~
a.cc:27:1: error: 'll' does not name a type
   27 | ll asr =0;
      | ^~
a.cc: In function 'void dfs(int, int, int)':
a.cc:37:13: error: 'c' was not declared in this scope
   37 |             c[j-1] = c[j-1] * 10 + a[o];
      |             ^
a.cc:41:17: error: 'asr' was not declared in this scope
   41 |                 asr += c[o];
      |                 ^~~
a.cc:41:24: error: 'c' was not declared in this scope
   41 |                 asr += c[o];
      |                        ^
a.cc:48:5: error: 'c' was not declared in this scope
   48 |     c[j - 1] = 10 * c[j - 1] + a[i];
      |     ^
a.cc: In function 'int main()':
a.cc:71:9: error: 'c' was not declared in this scope
   71 |         c[0] = 0;
      |         ^
a.cc:76:21: error: 'asr' was not declared in this scope
   76 |    printf("%I64d\n",asr);
      |                     ^~~
Language: C++

#include<cstdio>
#include<cstring>
using namespace std;
const int MAX = 10 + 10;
char arr[MAX];
char tmp[MAX];
int main(){
  gets(arr);
  int len = strlen(arr);
  long long ans = 0;
  for(int i = 0 ; i < (1<<(len-1)) ; i++){
    memset(tmp, 0, sizeof(tmp));
    int now = 0;
    for(int j = 0 ; j < len ; j++){
      tmp[now++] = arr[j];
      if (i&(1<<j)) {
        tmp[now++] = ' ';
      }
    }
    long long t;
    int sum = 0, n = 0;
    while(~sscanf(tmp+sum, "%lld%n", &t, &n)) {
      ans += t;
      sum += n;
    }
  }
  printf("%lld\n", ans);
  return 0;
}


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

#include<iostream>
using namespace std;

char s[111];
int n;
long long tot;

void dfs(int dep, long long sum, long long cur) {
	if(dep==n) {
		tot += sum + cur;
		return;
	}
	if(cur) dfs(dep+1, sum + cur, s[dep] - '0');
	dfs(dep+1, sum, cur*10+s[dep]-'0');
}

int main() {
	cin>>s;
	n = strlen(s);
	tot = 0LL;
	dfs(0, 0LL, 0LL);
	cout<<tot<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'strlen' was not declared in this scope
   19 |         n = strlen(s);
      |             ^~~~~~
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 | using namespace std;
Language: C++

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<iostream>
using namespace std;
typedef long long ll;
ll inf = (ll)1e9 + 7;
ll a[900009];
ll sum[20];
int dx[] = { 0,-1,-2,0,-1,-2,0,-1,-2 };
int dy[] = { 0,0,0,-1,-1,-1,-2,-2,-2 };
int main()
{
	ll h, m, n;
	scanf_s("%lld%lld%lld", &h, &m, &n);
	ll x, y;
	int k = 0;
	ll zo = (h - 2) * (m - 2);
	for (ll i = 1; i <= n; i++) {
		scanf_s("%lld%lld", &x, &y);
		for (ll j = 0; j < 9; j++) {
			ll xn = x + dx[j], yn = y + dy[j];
			if (xn<1 || xn>h - 2 || yn < 1 || yn>m - 2)continue;
			a[k++] = inf * xn + yn;
		}
	}
	sort(a, a + k);
	ll t = 1;
	for (int i = 0; i < k; i++) {
		if (a[i] == a[i + 1])t++;
		else {
			sum[t]++; t = 1;
			zo--;
		}
	}
	printf("%lld\n", zo);
	for (int i = 1; i <= 9; i++)
		printf("%lld\n", sum[i]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   15 |         scanf_s("%lld%lld%lld", &h, &m, &n);
      |         ^~~~~~~
      |         scanf
Language: C++

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

long long int h,w;

int n;

map<pair<int,int>,int> ma;

long long int ans[10];

int main(){
	cin >> h >> w >> d;
	for(int i=1;i<=n;i++){
		int a,b;
      
		cin >> a >> b;
      
		for(int j=-1;j<=1;j++){
			for(int k=-1;k<=1;k++){
				int nx = a+j;
				int ny = b+k;
				if(nx < 2 || nx > h-1 || ny < 2 || ny > w-1) continue;
              
				ma[make_pair(nx,ny)]++;
			}
		}
	}
	long long int res = (h-2)*(w-2);
	for(auto x : ma ){
		res--;
		ans[x.second]++;
	}
	ans[0] = res;
  
	for(int i=0;i<=9;i++){
		cout << a[i] << endl;
      
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: 'd' was not declared in this scope
   13 |         cin >> h >> w >> d;
      |                          ^
a.cc:37:25: error: 'a' was not declared in this scope
   37 |                 cout << a[i] << endl;
      |                         ^
Language: C++


#include<bits/stdc++.h>
#include<math.h>
#include <stdio.h>
#include<vector>
#include<deque>
#include<stdlib.h>
#include <algorithm>
#include<set>
#include<map>
#include <limits>
#include<iomanip>
#include<string>
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
#define llMAX numeric_limits<long long>::max()
#define intMAX numeric_limits<int>::max()
#define ll long long
#define d_2 100000
#define d9_7 1000000007
int main(void){
  ll h,w,n;
  cin >> h>>w>>n;
  vector<ll> a(n);
  vector<ll> b(n);
  rep(i,n){
    cin>>a[i]>>b[i];
    a[i]--;b[i]--;
    a[i]--;b[i]--;
  }
  map<pair<ll,ll>,int> mat;
  ll cnt=0;
  rep(i,n){
    for(ll k1=-1;k1<=1;k1++){
      for(ll k2=-1;k2<=1;k2++){
        if(mat.find({k1+a[i],k2+b[i]})==mat.end()){
          mat.insert({{k1+a[i],k2+b[i]},1});
        }else{
          mat[{k1+a[i],k2+b[i]}]++;
        }
      }
    }
  }
  vector<ll> result(10,0);
  for(auto i = mat.begin(); i != mat.end() ; ++i){
    if(i->first.first<=h-3 && i->first.first>=0 &&i->first.second<=w--3&&i->first.second>=0){
          cnt++;
      result[i->second]++;
    }
  }
  result[0]=(h-2)*(w-2)-cnt;
  rep(i,10){
    cout<<result[i]<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:71: error: expected ')' before numeric constant
   47 |     if(i->first.first<=h-3 && i->first.first>=0 &&i->first.second<=w--3&&i->first.second>=0){
      |       ~                                                               ^
      |                                                                       )
Language: C++


#include<bits/stdc++.h>
#include<math.h>
#include <stdio.h>
#include<vector>
#include<deque>
#include<stdlib.h>
#include <algorithm>
#include<set>
#include<map>
#include <limits>
#include<iomanip>
#include<string>
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
#define llMAX numeric_limits<long long>::max()
#define intMAX numeric_limits<int>::max()
#define ll long long
#define d_2 100000
#define d9_7 1000000007
int main(void){
  ll h,w,n;
  cin >> h>>w>>n;
  vector<ll> a(n);
  vector<ll> b(n);
  vector<vector<bool>> mat(h,vector<bool>(w,false));
  rep(i,n){
    cin>>a[i]>>b[i];
    mar[a[i]-1][b[i]-1]=true;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'mar' was not declared in this scope; did you mean 'mat'?
   30 |     mar[a[i]-1][b[i]-1]=true;
      |     ^~~
      |     mat
Language: C++

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

#ifdef LOCAL_DEBUG
  #include "LOCAL_DEBUG.hpp"
#endif

signed main(){

  int h,w,n; cin >> h >> w >> n;
  set<pair<int,int>> st,table;
  for(int i = 0; i < n; i++){
    int a,b; cin >> a >> b;
    a--,b--;
    st.insert({a,b});
    for(int dy : {-1,0,1}){
      for(int dx : {-1,0,1}){
        int ny = a + dy;
        int nx = b + dx;
        if(ny-1 < 0 || h <= ny+1 || nx-1 < 0 || w <= nx+1) continue;
        table.insert({ny,nx});
      }
    }
  }

  vector<int> ans(10,0);
  int ok = 0;
  for(auto p : table){
    int cnt = 0;
    for(int dy : {-1,0,1}){
      for(int dx : {-1,0,1}){
        int ny = p.first + dy;
        int nx = p.second + dx;
        auto res = lower_bound(st.begin(),st.end(),make_pair(ny,nx));
        if(res != st.end() && *res.first == ny && *res.second == nx) cnt++;
      }
    }
    //cout << p << " " << cnt << endl;
    ans[cnt]++;
    ok++;
  }

  int ok_max = (h-2) * (w-2);
  ans[0] += ok_max - ok;

  for(int p : ans){
    cout << p << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:36: error: 'struct std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >' has no member named 'first'
   36 |         if(res != st.end() && *res.first == ny && *res.second == nx) cnt++;
      |                                    ^~~~~
a.cc:36:56: error: 'struct std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >' has no member named 'second'
   36 |         if(res != st.end() && *res.first == ny && *res.second == nx) cnt++;
      |                                                        ^~~~~~
Language: Java

import java.util.Scanner;
import java.util.Map;
import java.util.HashMap;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long h = sc.nextLong();
        long w = sc.nextLong();
        int n = sc.nextInt();
        
        Map<Long, Map<Long, Integer>> row = new HashMap<Long, Map<Long, Integer>>();
        for (int i = 0; i < n; i++) {
            long a = sc.nextLong() - 1;
            long b = sc.nextLong() - 1;
            for (int j = 0; j < 3; j++) {
                if (a - j < 0) break;
                else if (a - j > h - 3) continue;
                for (int k = 0; k < 3; k++) {
                    if (b - k < 0) break;
                    else if (b - k > w - 3) continue;
                    else {
                        if (row.containsKey(a - j)) {
                            if (row.get(a - j).containsKey(b - k)) {
                                row.get(a - j).put(b - k, row.get(a - j).get(b - k) + 1);
                            } else {
                                row.get(a - j).put(b - k, 1);
                            }
                        } else {
                            Map<Long, Integer> column = new HashMap<Long, Integer>();
                            column.put(b - k, 1);
                            row.put(a - j, column);
                        }
                    }
                }
            }
        }
        sc.close();

        long count[] = new long[10];
        for (int i = 0; i < 10; i++) {
            count[i] = 0;
        }

        count[0] = (h - 2) * (w - 2);
        for (Map<Long, Integer> map: row.values()) {
            for (int val: map.values()) {
                count[val]++;
                count[0]--;
            }


        for (int i = 0; i < 10; i++) {
            System.out.println(count[i]);
        }
    }
}


Compiler output:
Main.java:57: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
const ll inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;

ll H, W, N;
int dx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int dy[8] = {1, 1, 0, -1, -1, -1, 0, 1};
ll ans[11];

int main()
{
    cin >> H >> W >> N;
    set<pair<ll, ll>> st, br;
    ans[0] = (H - 2) * (W - 2);
    for (int i = 0; i < N; i++)
    {
        ll y, x;
        cin >> y >> x;
        y--, x--;
        pair<ll, ll> p = make_pair(y, x);
        br.insert(p);
        st.insert(p);
        for (ll i = 0; i < 8; i++)
        {
            ll ny = y + dy[i], nx = x + dx[i];
            if (ny < 0 || ny >= H)
                continue;
            if (nx < 0 || nx >= W)
                continue;
            pair<ll, ll> q = make_pair(ny, nx);
            st.insert(q);
        }
    }
    for (auto &p : st)
    {
        ll y = p.first, x = p.second, cnt = 0;
        if (br.find(p) != br.end())
            cnt++;
        for (ll i = 0; i < 8; i++)
        {
            ll ny = y + dy[i], nx = x + dx[i];
            if (ny < 0 || ny >= H || nx < 0 || nx >= W)
            {
                cnt = -1;
                break;
            }
            pair<ll, ll> q = make_pair(ny, nx);
            if (br.find(q) != br.end())
                cnt++;
        }
        if (cnt != -1)
            ans[cnt]++, ans[0]--;
    }
    for (int i = 0; i < 1-; i++)
        cout << ans[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:27: error: expected primary-expression before ';' token
   57 |     for (int i = 0; i < 1-; i++)
      |                           ^
Language: C++

#include<bits/stdc++.h>

#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define Yes(hoge) cout<<((hoge)?"Yes":"No")<<endl;
#define YES(hoge) cout<<((hoge)?"YES":"NO")<<endl;
using namespace std;
struct Grid{int x,y,t;};
struct Edge{int to,cost;};
struct Graph{vector<vector<Edge>>E;int V;
  const ll Inf = llINF;const int MAX_V=1010;vector<ll>d;
  Graph(int n):E(n){d.resize(MAX_V);E.resize(n);V=n;}
  void init(){for(int i=0;i<MAX_V;i++)d[i]=Inf;}
  void add_edge(int from,int to,int cost){E[from-1].pb({to-1,cost});}
};
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int h,w,n;cin>>h>>w>>n;
  int cnt[100]={};
  vector<pair<int,int> >bl(n);
  map<pair<int,int>,int>MP2;
  for(int i=0;i<n;i++){
    cin>>bl[i].F>>bl[i].S;
    MP2[mp(bl[i].F,bl[i].S)]=1;
  }
  sort(ALL(bl));
  map<pair<int,int>,int >MP;
  for(int i=0;i<n;i++){
    int jl=max(1,bl[i].F-2),jr=min(bl[i].F,h-2);
    int kl=max(1,bl[i].S-2),kr=min(bl[i].S,w-2);
    for(int j=jl;j<=jr;j++){
      for(int k=kl;k<=kr;k++){
	if(MP[mp(j,k)]==0){
	  MP[mp(j,k)]=1;
	  int cntt=0;
	  for(int l=j;l<=j+2;l++)
	    for(int ll=k;ll<=k+2;ll++)
	      cntt+=MP2[mp(l,ll)];
	  cnt[cntt]++;
	}
      }
    }
  }
  int sum=0;
  for(int i=1;i<=9;i++)sum+=cnt[i];
  cout<<(ll)(h-2)*(w-2)-sum<<endl;
  for(int i=1;i<=9;i++)cout<<cnt[i]<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:23: error: expected unqualified-id before '=' token
   45 |             for(int ll=k;ll<=k+2;ll++)
      |                       ^
a.cc:45:23: error: expected ';' before '=' token
a.cc:45:23: error: expected primary-expression before '=' token
a.cc:10:12: error: expected primary-expression before 'long'
   10 | #define ll long long
      |            ^~~~
a.cc:45:26: note: in expansion of macro 'll'
   45 |             for(int ll=k;ll<=k+2;ll++)
      |                          ^~
a.cc:45:26: error: expected ')' before 'long'
   45 |             for(int ll=k;ll<=k+2;ll++)
      |                ~         ^
      |                          )
a.cc:45:28: error: expected unqualified-id before '<=' token
   45 |             for(int ll=k;ll<=k+2;ll++)
      |                            ^~
a.cc:45:36: error: expected unqualified-id before '++' token
   45 |             for(int ll=k;ll<=k+2;ll++)
      |                                    ^~
Language: C++

#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define REPr(i,n) for(int i=(n)-1;i>=0; --i)
#define FORq(i, m, n) for(int i = (m);i <= (n);++i)
#define FORqr(i, m , n) for(int i = (n);i >=(m);--i)
#define SCD(n) scanf("%d",&n)
#define SCD2(m,n) scanf("%d%d",&m,&n)
#define SCD3(m,n,k) scanf("%d%d%d",&m,&n,&k)
#define SCLLD(n) scanf("%lld",&n)
#define SCLLD2(m,n) scanf("%lld%lld",&m,&n)
#define SCLLD3(m,n,k) scanf("%lld%lld%lld",&m,&n,&k)
#define PB push_back
#define MP make_pair
#define ARSCD(A,N) REP(i,N){SCD(A[i]);}
#define ARSCD1(A,N) FORq(i,1,N){SCD(A[i]);}
#define VSCD(v,N) REP(i,N){int x; SCD(x); v.PB(x);}
#define VSCLLD(v,N) REP(i,N){long long x; SCLLD(x); v.PB(x);}
#define PRINTD(n) printf("%d\n",n)
#define PRINTLLD(n) printf("%lld\n",n)
#define DEBUG printf("%s\n","debug")
#define fst first
#define snd second
#define SIN(x,S) (S.count(x) != 0)
using namespace std;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector < VI > VVI;
typedef vector<long long> VL;
typedef long long ll;
typedef long long integer;
////////////////////////////////////////////////////////////////////
ios::sync_with_stdio(false);
int dx[9] = {0,0,1,1,1,0,-1,-1,-1};
int dy[9] = {0,1,1,0,-1,-1,-1,0,1};

int main(){
    map<PII,ll> f;
    ll H,W,N;
    cin >> H >> W >> N;
    REP(i,N){
        int a,b;
        cin >> a >> b;
        REP(j,9){
            PII p = MP(a+dx[j],b+dy[j]);
            f[p] = f[p] + 1;
        }
    }

    ll ans[10] = {};

    for(pair<PII, ll> p:f){
        int a = (p.first).first;
        int b = (p.first).second;

        if ((a <= 1) or (b <= 1) or (a >= H) or (b >= W)) continue;
        ans[p.second]++;

		//cout << p.first << " " << p.second << endl;
	}
    
    ll em = 0;
    FORq(i,1,9){
        em += ans[i];
    }

    cout << ((H-2)*(W-2)-em) << "\n";

    FORq(i,1,9){
        cout << ans[i] << "\n";
    }

}


Compiler output:
a.cc:33:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax
   33 | ios::sync_with_stdio(false);
      | ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std ;

#define ll long long

map<pair<int,int>,int>mp;

int h , w , n , cnt[ 10 ] ;

int main(){
	scanf( "%d%d%d" , &h , &w , &n ) ;
	while( n -- ) {
		int x , y ;
		scanf( "%d%d" , &x , &y ) ;
		for( int i = max( 1 , x - 2 ) ; i <= min( h - 2 , x ) ; i ++ ) {
			for( int j = max( 1 , y - 2 ) ; j <= min( w - 2 , y ) ; j ++ ) {
				mp[ make_pair<int,int>(i,j) ] ++ ;
			}
		}
	}
	map< pair<int,int> , int > :: iterator iter ;
	iter = mp.begin() ;
	while( iter != mp.end() ) {
		cnt[ iter -> second ] ++ ;
		iter ++ ; 
		n ++ ;
	}
	ll ans = 1ll * ( h - 2 ) * ( w - 2 ) ;
	printf( "%lld\n" , ans - n - 1 ) ;
	for( int i = 1 ; i <= 9 ; i ++ ) {
		printf( "%d\n" , cnt[ i ] ) ;
	}
	return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:56: error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'int'
   18 |                                 mp[ make_pair<int,int>(i,j) ] ++ ;
      |                                                        ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:1132:21: note:   initializing argument 1 of 'constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = int; _T2 = int; typename __strip_reference_wrapper<typename decay<_Tp>::type>::__type = int; typename decay<_Tp>::type = int; typename __strip_reference_wrapper<typename decay<_Tp2>::type>::__type = int; typename decay<_Tp2>::type = int]'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |               ~~~~~~^~~
Language: C++

#include<cstdio>
#include<vector>
#include<utility>
#include<algorithm>
#include<fstream>
using namespace std;

int main(){
  long h,w,num[10]={},a,b;
  int n,cnt=0;
  vector<pair<long,long>> p;
  scanf("%ld %ld %d",&h,&w,&n);
  for(int i=0;i<n;i++){
    scanf("%ld %ld",&a,&b);
    for(long j=max((long)1,a-2);j<=min(a,h-2);j++)
      for(long k=max((long)1,b-2);k<=min(b,w-2);k++)
        p.push_back(make_pair(j,k));
  }
  a=b=0;
  sort(p.begin(),p.end());
  p.push_back(make_pair(h+1,w+1));
  for(int i=0;i<p.size();i++){
    if(a==p[i].first&&b==p[i].second)
      cnt++;
    else{
      num[cnt]++;
      cnt=1;
      a=p[i].first;
      b=p[i].second;
    }
  }
  num[0]=(h-2)*(w-2);
  for(int i=1;i<=9;i++)
    num[0]-=num[i];

  //ofstream fout("out2.txt");
  for(int i=0;i<10;i++)
    cout << num[i] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:5: error: 'cout' was not declared in this scope
   38 |     cout << num[i] << endl;
      |     ^~~~
a.cc:6:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include<fstream>
  +++ |+#include <iostream>
    6 | using namespace std;