Language: C++

# define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
# define string(x) string x; cin >> x;

using namespace std;

namespace utils{
  template <typename T> void print(vector<vector<T>> mat) {
    REP (i, mat.size()) {
      REP (j, mat[0].size()) cout << mat[i][j] << ' ';
      cout << endl;
    }
  }

  template <typename T> void print(vector<T> v) {
    REP (i, v.size())
      if (i >= v.size()-1)
	cout << v[i];
      else
	cout << v[i] << ' ';
    
    cout << endl;
  }

  template <typename T> pair<T, T> shape(vector<vector<T>> mat) {
    int d1, d2;

    d1 = mat.size();
    if (d1 > 0) d2 = mat[0].size();
    else int d2 = 0;
    cout << "(" << d1 << ", " << d2 << ")" << endl;
    return make_pair(0, 0);
  }

  template <typename T> vector<vector<T>> empty(int n, int m) {
    vector<vector<T>> mat(n, vector<T>(m));
    return mat;
  }
}
#define MOD 1000000007
long long fact(long long k){
  long long sum = 1;
  for (long long i = 1; i <=k;i++){
    sum *= i;
    sum %= MOD;
  }
  return (sum);
}

int main() {
  vint(A,2);

  if(abs(A[0]-A[1])<=1){
    long long ans = 1;
    ans = (fact(A[0]) * fact(A[1])) % MOD;
    if(A[0] == A[1])
      ans = (ans*2)%MOD;
    cout << ans << endl;
  }else{
    cout << 0 << endl;
  }

}

Compiler output:
a.cc:7:30: error: variable or field 'print' declared void
    7 |   template <typename T> void print(vector<vector<T>> mat) {
      |                              ^~~~~
a.cc:7:36: error: 'vector' was not declared in this scope
    7 |   template <typename T> void print(vector<vector<T>> mat) {
      |                                    ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
a.cc:7:43: error: 'vector' was not declared in this scope
    7 |   template <typename T> void print(vector<vector<T>> mat) {
      |                                           ^~~~~~
a.cc:7:43: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:7:51: error: expected primary-expression before '>>' token
    7 |   template <typename T> void print(vector<vector<T>> mat) {
      |                                                   ^~
a.cc:7:54: error: 'mat' was not declared in this scope
    7 |   template <typename T> void print(vector<vector<T>> mat) {
      |                                                      ^~~
a.cc:14:30: error: variable or field 'print' declared void
   14 |   template <typename T> void print(vector<T> v) {
      |                              ^~~~~
a.cc:14:36: error: 'vector' was not declared in this scope
   14 |   template <typename T> void print(vector<T> v) {
      |                                    ^~~~~~
a.cc:14:36: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:14:44: error: expected primary-expression before '>' token
   14 |   template <typename T> void print(vector<T> v) {
      |                                            ^
a.cc:14:46: error: 'v' was not declared in this scope
   14 |   template <typename T> void print(vector<T> v) {
      |                                              ^
a.cc:24:25: error: 'pair' does not name a type
   24 |   template <typename T> pair<T, T> shape(vector<vector<T>> mat) {
      |                         ^~~~
a.cc:34:25: error: 'vector' does not name a type
   34 |   template <typename T> vector<vector<T>> empty(int n, int m) {
      |                         ^~~~~~
a.cc: In function 'int main()':
a.cc:1:20: error: 'vector' was not declared in this scope
    1 | # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
      |                    ^~~~~~
a.cc:50:3: note: in expansion of macro 'vint'
   50 |   vint(A,2);
      |   ^~~~
a.cc:1:20: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
      |                    ^~~~~~
a.cc:50:3: note: in expansion of macro 'vint'
   50 |   vint(A,2);
      |   ^~~~
a.cc:1:27: error: expected primary-expression before 'int'
    1 | # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
      |                           ^~~
a.cc:50:3: note: in expansion of macro 'vint'
   50 |   vint(A,2);
      |   ^~~~
a.cc:1:42: error: 'i' was not declared in this scope
    1 | # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
      |                                          ^
a.cc:50:3: note: in expansion of macro 'vint'
   50 |   vint(A,2);
      |   ^~~~
a.cc:1:38: error: 'REP' was not declared in this scope
    1 | # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
      |                                      ^~~
a.cc:50:3: note: in expansion of macro 'vint'
   50 |   vint(A,2);
      |   ^~~~
a.cc:52:10: error: 'A' was not declared in this scope
   52 |   if(abs(A[0]-A[1])<=1){
      |          ^
a.cc:52:6: error: 'abs' was not declared in this scope
   52 |   if(abs(A[0]-A[1])<=1){
      |      ^~~
a.cc:57:5: error: 'cout' was not declared in this scope
   57 |     cout << ans << endl;
      |     ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
a.cc:57:20: error: 'endl' was not declared in this scope
   57 |     cout << ans << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | # define vint(v,n) vector<int> v(n); REP(i,n) scanf("%d", &v[i]);
a.cc:59:5: error: 'cout' was not declared in this scope
   59 |     cout << 0 << endl;
      |     ^~~~
a.cc:59:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:59:18: error: 'endl' was not declared in this scope
   59 |     cout << 0 << endl;
      |                  ^~~~
a.cc:59:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'