Language: C++

#include <iostream>
#include <algorithm>
using namespace std ;
const int N = 4e5+5,M = N<<1,mod = 924844033,GG = 5,IG = 554906420 ;
inline int add(int a,int b){ return a+b >= mod ? a+b-mod : a+b ; }
inline int sub(int a,int b){ return a >= b ? a-b : a-b+mod ; }
inline int mul(int a,int b){ return 1ll*a*b%mod ; }
inline int power(int a,int b){
	int res = 1 ;
	for( ; b ; b >>= 1){
		if(b&1) res = mul(res,a) ;
		a = mul(a,a) ; 
	}
	return res ; 
} 
int rev[M] ;
inline void calrev(int limit){
	for(int i = 0 ; i < limit ; i++)
	    rev[i] = (rev[i>>1]>>1)|((i&1)?(limit>>1):0) ; 
}
inline void NTT(int *A,int limit,int flg){
	for(int i = 0 ; i < limit ; i++)
	    if(i > rev[i])
		   swap(A[i],A[rev[i]]) ;
	for(int mid = 1 ; mid < limit ; mid <<= 1){
		int Wn = power(flg == 1 ? GG : IG,(mod-1)/(mid<<1)) ; 
		for(int j = 0 ; j < limit ; j += (mid<<1)){
			int w = 1 ;
			for(int k = 0 ; k < mid ; k++,w = mul(w,Wn)){
				int x = A[j+k],y = mul(w,A[j+mid+k]) ;
				A[j+k] = add(x,y) ;
				A[j+mid+k] = sub(x,y) ; 
			}
		}
	}
	if(flg == -1){
		int Inv = power(limit,mod-2) ;
		for(int i = 0 ; i < limit ; i++)
		    A[i] = mul(A[i],Inv) ;
	}
}
int fac[N],inv[N] ;
inline int C(int n,int m){ return mul(fac[n],mul(inv[m],inv[n-m])) ; }
inline void prework(int n){
	fac[0] = inv[0] = inv[1] = 1 ;
	for(int i = 1 ; i <= n ; i++) fac[i] = mul(fac[i-1],i) ;
	for(int i = 2 ; i <= n ; i++) inv[i] = mul(sub(mod,mod/i),inv[mod%i]) ; 
	for(int i = 1 ; i <= n ; i++) inv[i] = mul(inv[i],inv[i-1]) ;
}
int n,head[N],Next[N],ver[N],cnt[N],size[N],tot ;
inline int adde(int x,int y){ ver[++tot] = y ; Next[tot] = head[x] ; head[x] = tot ;} 
inline void dfs(int x,int fa){
	size[x] = 1 ; 
	for(int i = head[x] ; i ; i = Next[i]){
		int y = ver[i] ;
		if(y == fa) continue ;
		dfs(y,x) ;
		size[x] += size[y] ;
		cnt[size[y]]++ ;
	}
	cnt[n-size[x]]++ ; 
}
int f[N],g[N] ; 
int main(){
	//freopen("in.txt","r",stdin) ; 
	cin >> n ;
	prework(n) ;
	for(int i = 1 ; i < n ; i++){ int x,y ; scanf("%d%d",&x,&y) ; adde(x,y) ; adde(y,x) ; }
	dfs(1,0) ; 
	for(int i = 1 ; i <= n ; i++) f[i] = mul(cnt[i],fac[i]),g[i] = inv[i] ; g[0] = 1 ; 
    reverse(f,f+n+1) ; 
	int limit = 1 ;	while(limit <= n*2) limit <<= 1 ; calrev(limit) ;
	NTT(f,limit,1) ; NTT(g,limit,1) ;
	for(int i = 0 ; i < limit ; i++) f[i] = mul(f[i],g[i]) ;
	NTT(f,limit,-1) ; reverse(f,f+n+1) ; 
	for(int i = 1 ; i <= n ; i++) printf("%d\n",sub(mul(n,C(n,i)),mul(inv[i],f[i]))) ;  
	return 0 ; 
}

Compiler output:
a.cc: In function 'int adde(int, int)':
a.cc:51:85: warning: no return statement in function returning non-void [-Wreturn-type]
   51 | inline int adde(int x,int y){ ver[++tot] = y ; Next[tot] = head[x] ; head[x] = tot ;}
      |                                                                                     ^
a.cc: In function 'void dfs(int, int)':
a.cc:53:9: error: reference to 'size' is ambiguous
   53 |         size[x] = 1 ;
      |         ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:50:37: note:                 'int size [400005]'
   50 | int n,head[N],Next[N],ver[N],cnt[N],size[N],tot ;
      |                                     ^~~~
a.cc:58:17: error: reference to 'size' is ambiguous
   58 |                 size[x] += size[y] ;
      |                 ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:50:37: note:                 'int size [400005]'
   50 | int n,head[N],Next[N],ver[N],cnt[N],size[N],tot ;
      |                                     ^~~~
a.cc:58:28: error: reference to 'size' is ambiguous
   58 |                 size[x] += size[y] ;
      |                            ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:50:37: note:                 'int size [400005]'
   50 | int n,head[N],Next[N],ver[N],cnt[N],size[N],tot ;
      |                                     ^~~~
a.cc:59:21: error: reference to 'size' is ambiguous
   59 |                 cnt[size[y]]++ ;
      |                     ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:50:37: note:                 'int size [400005]'
   50 | int n,head[N],Next[N],ver[N],cnt[N],size[N],tot ;
      |                                     ^~~~
a.cc:61:15: error: reference to 'size' is ambiguous
   61 |         cnt[n-size[x]]++ ;
      |               ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:50:37: note:                 'int size [400005]'
   50 | int n,head[N],Next[N],ver[N],cnt[N],size[N],tot ;
      |                                     ^~~~