Language: C++

//ProblemF.cpp

#include <iostream>

static std::istream & ip = std::cin;
static std::ostream & op = std::cout;

#if OJ_MYPC
#include <ojio.h>
#endif

#ifndef OPENOJIO
#define OPENOJIO
#endif

#if 1 || DEFINE
/***************************************************************/
typedef unsigned long long u64;
typedef long long s64;

typedef unsigned uint;

#define ABS(x) ((x) > 0 ? (x) : -(x))

#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) > (y) ? (x) : (y))

#define MIN3(x, y, z) MIN(x, MIN(y, z))
#define MAX3(x, y, z) MAX(x, MAX(y, z))

#define FillZero(arr) memset(arr, 0, sizeof(arr));

/***************************************************************/
#endif //1 || DEFINE

#include <string>
#include <vector>
#include <map>
#include <set>
#include <bitset>
#include <queue>
#include <stack>
#include <utility>
#include <algorithm>
#include <iomanip>
#include <cstring>
#include <cmath>
#include <cstdio>

#include <functional> 
#include <assert.h>

//001
//op << setfill('0') << setw(3) << setiosflags(ios::right) << 1;

//op << fixed << setprecision(20);

using namespace std;

//ProblemF.cpp

#define MAXN 200010
#define MOD 924844033LL

#define N (1 << 19)
#define W 10179

template<int _MOD>
class ModInt {
public:
	static const int Mod = _MOD;

private:
	unsigned x;

public:
	ModInt() : x(0) {}
	ModInt(int sig) { int sigt = sig % Mod; if (sigt < 0) sigt += Mod; x = sigt; }
	ModInt(long long sig) { int sigt = sig % Mod; if (sigt < 0) sigt += Mod; x = sigt; }
	int get() const { return (int)x; }

	ModInt &operator+=(const ModInt& b) { if ((x += b.x) >= Mod) x -= Mod; return *this; }
	ModInt &operator-=(const ModInt& b) { if ((x += Mod - b.x) >= Mod) x -= Mod; return *this; }
	ModInt &operator*=(const ModInt& b) { x = (unsigned long long)x * b.x % Mod; return *this; }
	ModInt &operator/=(const ModInt& b) { return *this *= b.inverse(); }

	friend ModInt operator+ (const ModInt& a, const ModInt& b) { return ModInt(a) += b; }
	friend ModInt operator- (const ModInt& a, const ModInt& b) { return ModInt(a) -= b; }
	friend ModInt operator* (const ModInt& a, const ModInt& b) { return ModInt(a) *= b; }
	friend ModInt operator/ (const ModInt& a, const ModInt& b) { return ModInt(a) /= b; }
	friend bool operator== (const ModInt& a, const ModInt& b) { return a.get() == b.get(); }
	friend bool operator!= (const ModInt& a, const ModInt& b) { return a.get() != b.get(); }

	friend std::ostream& operator<<(std::ostream& ostr, const ModInt & a) { return ostr << a.get(); }
	friend std::istream& operator >> (std::istream& istr, const ModInt & a) { long long t; if (istr >> t) a = t; return istr; }

	ModInt pow(unsigned long long p) const {
		ModInt a = *this;
		ModInt rst = 1;
		while (p) {
			if (p & 1) rst *= a;

			p >>= 1;
			a *= a;
		}
		return rst;
	}

	ModInt inverse() const {
		signed a = x, b = Mod, u = 1, v = 0;
		while (b) {
			signed t = a / b;
			a -= t * b; std::swap(a, b);
			u -= t * v; std::swap(u, v);
		}
		return ModInt(u);
	}
};

template<typename Type>
class FFT {
public:
	const int n;
	const Type w;

public:
	FFT(int n, Type w) : n(n), w(w) {
		assert(n > 0);
		Type wk = (Type)1;
		for (int i = 1; i < n; ++i) {
			wk *= w;
			assert(wk != (Type)1);
		}
		assert(wk * w == (Type)1);
		for (--n; n; n >>= 1) assert(n & 1);
	}

	void calc(std::vector<Type>& rst, const std::vector<Type>& p, int ope = 1) {
		assert(p.size() <= n);
		rst = p;

		calc(rst, inv);
	}

	void calc(vector<Type>& p, int ope = 1) {
		assert((int)p.size() <= n);
		p.resize(n, 0);

		Type ww = ope > 0 ? w : 1 / w;
		for (int m = n, mi = 0; m >= 2; m >>= 1, mi++) {
			int mh = m >> 1;

			Type wc = (Type)1;
			for (int i = 0; i < mh; ++i) {
				for (int j = i; j < n; j += m) {
					int k = j + mh;
					Type tmp = p[j] - p[k];
					p[j] += p[k];
					p[k] = wc * tmp;
				}
				wc *= ww;
			}
			ww *= ww;
		}
		int i = 0;
		for (int j = 1; j < n - 1; ++j) {
			for (int k = n >> 1; k >(i ^= k); k >>= 1);
			if (j < i) std::swap(p[i], p[j]);
		}
	}
};

int main(int argc, char* argv[])
{
	OPENOJIO;

	typedef ModInt<MOD> mint;

	static mint fac[MAXN + 1];
	fac[0] = fac[1] = 1;
	for (int i = 2; i <= MAXN; ++i) fac[i] = fac[i - 1] * i;

	static mint fac_inv[MAXN + 1];
	for (int i = 0; i <= MAXN; ++i) {
		fac_inv[i] = 1 / fac[i];
		assert(fac_inv[i] * fac[i] == 1);
	}

	int n;
	vector<vector<int> > nears;

	ip >> n;

	nears.resize(n);
	for (int i = 0; i < n - 1; ++i) {
		int a, b;
		ip >> a >> b;
		--a; --b;

		nears[a].push_back(b);
		nears[b].push_back(a);
	}

	vector<int> count_sons;
	count_sons.resize(n, 0);

	function<int (int, int)> get_count_sons = [&] (int cur, int father) -> int {
		count_sons[cur] = 1;
		for (auto son : nears[cur]) {
			if (son == father) continue;
			count_sons[cur] += get_count_sons(son, cur);
		}
		return count_sons[cur];
	};

	get_count_sons(0, -1);

	vector<int> b;
	b.resize(n, 0);

	for (int i = 1; i < n; ++i) {
		b[count_sons[i]]++;
		b[n - count_sons[i]]++;
	}

	vector<mint> c(N, 0);
	vector<mint> d(N, 0);

	for (int i = 0; i < n; ++i)
		c[i] = b[i] * fac[i];

	d[0] = 1;
	for (int i = 1; i < n; ++i)
		d[N - i] = fac_inv[i];

	FFT<mint> fft(N, W);
	fft.calc(c);
	fft.calc(d);

	for (int i = 0; i < c.size(); ++i) c[i] *= d[i];
	fft.calc(c, -1);
	mint N_inv = (mint)1 / N;
	assert(N * N_inv == 1);
	for (int i = 0; i < c.size(); ++i) c[i] *= N_inv;

	vector<mint> &rst = d;
	for (int i = 1; i <= n; ++i)
	{
		rst[i] = n * fac[n] * fac_inv[i] * fac_inv[n - i] - fac_inv[i] * c[i];
	}

	for (int i = 1; i <= n; ++i)
	{
		op << rst[i] << endl;
	}

	return 0;
}
/***************************************************************/


Compiler output:
a.cc: In member function 'void FFT<Type>::calc(std::vector<_Tp>&, const std::vector<_Tp>&, int)':
a.cc:142:27: error: 'inv' was not declared in this scope; did you mean 'int'?
  142 |                 calc(rst, inv);
      |                           ^~~
      |                           int