Language: C++

#ifndef _TEMPLATE_ROOT
#define _TEMPLATE_ROOT
#include "bits/stdc++.h"
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define repl(i, a, b) for(ll i = a; i < (b); ++i)
#define repd(i, a, b) for(int i = b; i >= (a); --i)
#define repdl(i, a, b) for(ll i = b; i >= (a); --i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
template<typename H> bool chmin(H& v1, const H v2) { if (v1 > v2) { v1 = v2; return true; } return false; }
template<typename H> bool chmax(H& v1, const H v2) { if (v1 < v2) { v1 = v2; return true; } return false; }
#endif
#ifndef _TEMPLATE_IO
#define _TEMPLATE_IO

template<typename H> void read(H& head) { cin >> head; }
template<typename H, typename ...T> void read(H& head, T& ...tail) { cin >> head; read(tail...); }
template<typename H> void write(H head) { cout << head << '\n'; }
template<typename H, typename ...T> void write(H head, T ...tail) { cout << head << " "; write(tail...); }
template<typename ...T> void die(T ...tok) { write(tok...); exit(0); }
#endif
#ifndef _TEMPLATE_OPT
#define _TEMPLATE_OPT
#pragma GCC optimize("O3")
#pragma GCC target("avx2")
#endif
using namespace std;

namespace std {
  template<typename T, typename K> struct hash<pair<T, K>> {
    size_t operator()(pair<T, K> const& p) const noexcept {
      size_t h1 = std::hash<T>{}(p.first);
      size_t h2 = std::hash<K>{}(p.second);
      return h1 ^ (h2 << 1);
    }
  };
}

int main() {
	cin.tie(0)->sync_with_stdio(0);
	cin.exceptions(cin.failbit);

  int h, w, n; read(h, w, n);
  map<pair<int, int>, int> mp;
  map<pair<int, int>> cons;

  rep(i, 0, n) {
    int x, y; read(x, y);
    mp[{x, y}] = 1;
    rep(a, -2, 1) rep(b, -2, 1)
      if (1 <= x + a && x + a <= h - 2 && 1 <= y + b && y + b <= w - 2)
        cons.insert({x + a, y + b});
  }

  vector<ll> ans(10);
  for (auto p : cons) {
    int x, y; tie(x, y) = p;
    int cnt = 0;
    rep(i, 0, 3) rep(j, 0, 3)
      cnt += mp[{x + i, y + j}];
    ans[cnt]++;
  }

  ans[0] = 1ll * (h - 2) * (w - 2);
  rep(i, 1, 10) ans[0] -= ans[i];

  rep(i, 0, 10) write(ans[i]);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:49:20: error: wrong number of template arguments (1, should be at least 2)
   49 |   map<pair<int, int>> cons;
      |                    ^~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:56:14: error: request for member 'insert' in 'cons', which is of non-class type 'int'
   56 |         cons.insert({x + a, y + b});
      |              ^~~~~~
a.cc:60:17: error: 'begin' was not declared in this scope
   60 |   for (auto p : cons) {
      |                 ^~~~
a.cc:60:17: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:60:17: error: 'end' was not declared in this scope
   60 |   for (auto p : cons) {
      |                 ^~~~
a.cc:60:17: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~