Language: C++

[p#include <bits/stdc++.h>
#define rep(i, n) for (rint i = 1; i <= (n); i ++)
#define re0(i, n) for (rint i = 0; i < (int) n; i ++)
#define travel(i, u) for (rint i = head[u]; i; i = e[i].nxt)
#define rint register int
using namespace std;

typedef long long lo;

template<typename tp> inline void read(tp &x) {
    x = 0; char c = getchar(); int f = 0;
    for (; c < '0' || c > '9'; f |= c == '-', c = getchar());
    for (; c >= '0' && c <= '9'; x = (x << 3) + (x << 1) + c - '0', c = getchar());
    if (f) x = -x;
}

namespace {
	const int mo = 998244353;
	inline int add(int x, int y) { x += y; return x >= mo ? x - mo : x; }
	inline int sub(int x, int y) { x -= y; return x < 0 ? x + mo : x; } 
	inline int mul(int x, int y) { return (lo) x * y % mo; }
	inline int power(int a, int k = mo - 2) {
		int ans = 1;
		for (; k; k >>= 1, a = mul(a, a))
			if (k & 1) ans = mul(ans, a);
		return ans;
	}
}
const int N = 3e6 + 233;
int n, m;
int fac[N], ifac[N];

inline int C(int n, int m) {
	if (n < m) return 0;
	else if (m == 0 || m == n) return 1;
	else return mul(fac[n], mul(ifac[m], ifac[n - m]));
}

inline void prepare(int n) {
	fac[0] = 1;
	for (int i = 1; i <= n; i++) fac[i] = mul(fac[i - 1], i);
	ifac[n] = power(fac[n]);
	for (int i = n - 1; i >= 0; i--) ifac[i] = mul(ifac[i + 1], i + 1);
}

int main(void) {
	read(n); read(m);
	prepare(max(n, m) * 2);
	int ans = 0;
	for (int d = 0; d <= min(m, n); d++) {
		if ((3 * m - d) % 2 == 0) {
			auto F = [] (int k, int n) {
				return C(k / 2 + n - 1, n - 1);
			};
			ans = add(ans, mul(C(n, d), F(3 * m - d, n)));
			ans = sub(ans, mul(C(n, d), mul(n, F(m - d, n))));
			ans = add(ans, mul(C(n, d), mul(n - d, F(m - d, n - 1))));
		}
	}
	cout << ans << "\n";
}



Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | [p#include <bits/stdc++.h>
      |   ^
a.cc:1:1: error: expected unqualified-id before '[' token
    1 | [p#include <bits/stdc++.h>
      | ^
a.cc: In function 'void read(tp&)':
a.cc:11:21: error: there are no arguments to 'getchar' that depend on a template parameter, so a declaration of 'getchar' must be available [-fpermissive]
   11 |     x = 0; char c = getchar(); int f = 0;
      |                     ^~~~~~~
a.cc:11:21: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
a.cc:12:51: error: there are no arguments to 'getchar' that depend on a template parameter, so a declaration of 'getchar' must be available [-fpermissive]
   12 |     for (; c < '0' || c > '9'; f |= c == '-', c = getchar());
      |                                                   ^~~~~~~
a.cc:13:73: error: there are no arguments to 'getchar' that depend on a template parameter, so a declaration of 'getchar' must be available [-fpermissive]
   13 |     for (; c >= '0' && c <= '9'; x = (x << 3) + (x << 1) + c - '0', c = getchar());
      |                                                                         ^~~~~~~
a.cc: In function 'int main()':
a.cc:48:17: error: 'max' was not declared in this scope
   48 |         prepare(max(n, m) * 2);
      |                 ^~~
a.cc:50:30: error: 'min' was not declared in this scope; did you mean 'main'?
   50 |         for (int d = 0; d <= min(m, n); d++) {
      |                              ^~~
      |                              main
a.cc:60:9: error: 'cout' was not declared in this scope
   60 |         cout << ans << "\n";
      |         ^~~~
a.cc: In instantiation of 'void read(tp&) [with tp = int]':
a.cc:47:6:   required from here
   47 |         read(n); read(m);
      |         ~~~~^~~
a.cc:11:28: error: 'getchar' was not declared in this scope
   11 |     x = 0; char c = getchar(); int f = 0;
      |                     ~~~~~~~^~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | [p#include <bits/stdc++.h>