Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<complex>
#include<set>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 100000000
#define debug(x) cout<<#x<<": "<<x<<endl
#define all(x) x.begin(),x.end()
typedef pair<int,int> P;
typedef pair<int,P> PP;
int h,w;
int n;
int b[100006];
int a[100006];
set<P> st;
int Count;
set<P> used;
int da[3]={-1,0,1};
int db[3]={-1,0,1};
int ans[11];
int main()
{
	cin>>h>>w;
	cin>>n;
	rep(i,n)
	{
		cin>>a[i];
		cin>>b[i];
		st.insert(P(a[i],b[i]));
	}
	rep(i,n)
	{
		rep(j,3)rep(k,3)
		{
			int aa=a[i]+da[j];
			int bb=b[i]+db[k];
			if(!(2<=aa&&aa<=h-1&&2<=bb&&bb<=w-1))continue;
			if(used.find(P(aa,bb))!=used.end())continue;
			used.insert(P(aa,bb));
			Count=0;
			rep(r,3)rep(l,3)
			{
				if(st.find(P(aa+da[r],bb+db[l]))!=st.end())
				{
					Count++;
				}
			}
			ans[Count]++;
		}
	}
	ans[0]=(h-2)*(w-2);
	rep2(i,1,10)
	{
		ans[0]-=ans[i];
	}
	rep(i,10)
	{
		cout<<ans[i]<<endl;
	}
	return 0;
}#include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<complex>
#include<set>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 100000000
#define debug(x) cout<<#x<<": "<<x<<endl
#define all(x) x.begin(),x.end()
typedef pair<int,int> P;
typedef pair<int,P> PP;
int h,w;
int n;
int b[100006];
int a[100006];
set<P> st;
int Count;
set<P> used;
int da[3]={-1,0,1};
int db[3]={-1,0,1};
int ans[11];
int main()
{
	cin>>h>>w;
	cin>>n;
	rep(i,n)
	{
		cin>>a[i];
		cin>>b[i];
		st.insert(P(a[i],b[i]));
	}
	rep(i,n)
	{
		rep(j,3)rep(k,3)
		{
			int aa=a[i]+da[j];
			int bb=b[i]+db[k];
			if(!(2<=aa&&aa<=h-1&&2<=bb&&bb<=w-1))continue;
			if(used.find(P(aa,bb))!=used.end())continue;
			used.insert(P(aa,bb));
			Count=0;
			rep(r,3)rep(l,3)
			{
				if(st.find(P(aa+da[r],bb+db[l]))!=st.end())
				{
					Count++;
				}
			}
			ans[Count]++;
		}
	}
	ans[0]=(h-2)*(w-2);
	rep2(i,1,10)
	{
		ans[0]-=ans[i];
	}
	rep(i,10)
	{
		cout<<ans[i]<<endl;
	}
	return 0;
}

Compiler output:
a.cc:70:2: error: stray '#' in program
   70 | }#include<iostream>
      |  ^
a.cc:70:3: error: 'include' does not name a type
   70 | }#include<iostream>
      |   ^~~~~~~
a.cc:89:5: error: redefinition of 'int h'
   89 | int h,w;
      |     ^
a.cc:20:5: note: 'int h' previously declared here
   20 | int h,w;
      |     ^
a.cc:89:7: error: redefinition of 'int w'
   89 | int h,w;
      |       ^
a.cc:20:7: note: 'int w' previously declared here
   20 | int h,w;
      |       ^
a.cc:90:5: error: redefinition of 'int n'
   90 | int n;
      |     ^
a.cc:21:5: note: 'int n' previously declared here
   21 | int n;
      |     ^
a.cc:91:5: error: redefinition of 'int b [100006]'
   91 | int b[100006];
      |     ^
a.cc:22:5: note: 'int b [100006]' previously declared here
   22 | int b[100006];
      |     ^
a.cc:92:5: error: redefinition of 'int a [100006]'
   92 | int a[100006];
      |     ^
a.cc:23:5: note: 'int a [100006]' previously declared here
   23 | int a[100006];
      |     ^
a.cc:93:8: error: redefinition of 'std::set<std::pair<int, int> > st'
   93 | set<P> st;
      |        ^~
a.cc:24:8: note: 'std::set<std::pair<int, int> > st' previously declared here
   24 | set<P> st;
      |        ^~
a.cc:94:5: error: redefinition of 'int Count'
   94 | int Count;
      |     ^~~~~
a.cc:25:5: note: 'int Count' previously declared here
   25 | int Count;
      |     ^~~~~
a.cc:95:8: error: redefinition of 'std::set<std::pair<int, int> > used'
   95 | set<P> used;
      |        ^~~~
a.cc:26:8: note: 'std::set<std::pair<int, int> > used' previously declared here
   26 | set<P> used;
      |        ^~~~
a.cc:96:5: error: redefinition of 'int da [3]'
   96 | int da[3]={-1,0,1};
      |     ^~
a.cc:27:5: note: 'int da [3]' previously defined here
   27 | int da[3]={-1,0,1};
      |     ^~
a.cc:97:5: error: redefinition of 'int db [3]'
   97 | int db[3]={-1,0,1};
      |     ^~
a.cc:28:5: note: 'int db [3]' previously defined here
   28 | int db[3]={-1,0,1};
      |     ^~
a.cc:98:5: error: redefinition of 'int ans [11]'
   98 | int ans[11];
      |     ^~~
a.cc:29:5: note: 'int ans [11]' previously declared here
   29 | int ans[11];
      |     ^~~
a.cc:99:5: error: redefinition of 'int main()'
   99 | int main()
      |     ^~~~
a.cc:30:5: note: 'int main()' previously defined here
   30 | int main()
      |     ^~~~