Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#define N 200005
#define M 524289
#define LL long long
#define oo (1<<30)
#define V 32768
#define LD long double
using namespace std;
const int mo=924844303;
const LD Pi=acos(-1.0);
int n,m,head[N],num[2*N],next[2*N],ans[N],fc[N],xf[N],sz[N],a[N],b[N],e,ep;
void inc(int &x,int y){ x+=y; if(x>=mo) x-=mo;}
LL fpm(LL x,LL y)
{
	LL s=1;
	while(y){
		if(y&1) s=(s*x)%mo;
		y>>=1 , x=(x*x)%mo;
	  }
	return s;
}
void dfs(int t,int fa)
{
	int i; sz[t]=1;
	for(i=head[t];i;i=next[i])
		if(num[i]!=fa){
			dfs(num[i],t);
			sz[t]+=sz[num[i]];
		  }
}
struct cp{
	LD x,y;
	cp(LD _x=0,LD _y=0){ x=_x,y=_y;}
}A[M],B[M],C[M],D[M],tmp[M],F[M];
cp operator +(cp p,cp q){ return cp(p.x+q.x,p.y+q.y);}
cp operator -(cp p,cp q){ return cp(p.x-q.x,p.y-q.y);}
cp operator *(cp p,double r){ return cp(p.x*r,p.y*r);}
cp operator *(double r,cp p){ return cp(p.x*r,p.y*r);}
cp operator *(cp p,cp q){ return cp(p.x*q.x-p.y*q.y,p.x*q.y+p.y*q.x);}
int rev(int x)
{
	int i,y=0;
	for(i=0;i<ep;i++)
		y+=((x>>i)&1)*(1<<(ep-i-1));
	return y;
}
void FFT(cp *x,int op)
{
	int i,j,k; cp p,q,w,wn;
	for(i=0;i<e;i++) tmp[i]=x[i];
	for(i=0;i<e;i++) x[i]=tmp[rev(i)];
	for(i=1;i<=e;i<<=1){
		wn=cp(cos(2*Pi*op/i),sin(2*Pi*op/i));
		for(j=0;j<e;j+=i){
			w=cp(1,0);
			for(k=0;k<i/2;k++){
				p=x[j+k],q=x[j+k+i/2]*w;
				x[j+k]=p+q,x[j+k+i/2]=p-q;
				w=w*wn;
			  }
		  }
	  }
}
LL com(int n,int m)
{
	return 1LL*fc[n]*xf[m]%mo*xf[n-m]%mo;
}
int main()
{
	int i,x,y;
	scanf("%d",&n);
	for(i=1;i<n;i++){
		scanf("%d %d",&x,&y);
		num[++m]=y,next[m]=head[x],head[x]=m;
		num[++m]=x,next[m]=head[y],head[y]=m;
	  }
	dfs(1,0),fc[0]=xf[0]=1;
	for(i=1;i<=n;i++){
		fc[i]=(1LL*fc[i-1]*i)%mo;
		xf[i]=fpm(fc[i],mo-2);
	  }
	for(i=1;i<=n;i++){
		(a[sz[i]]+=fc[sz[i]])%=mo;
		(a[n-sz[i]]+=fc[n-sz[i]])%=mo;
	  }
	for(i=0;i<=n;i++) b[i]=xf[n-i];
	a[0]=b[0]=0;
	for(e=1,ep=0;e<=2*n;e<<=1,ep++);
	for(i=0;i<=n;i++){
		A[i].x=a[i]/V,B[i].x=a[i]%V;
		C[i].x=b[i]/V,D[i].x=b[i]%V;
	  }
	FFT(A,1),FFT(B,1);
	FFT(C,1),FFT(D,1);
	for(i=0;i<e;i++) F[i]=A[i]*C[i];
	FFT(F,-1);
	for(i=n+1;i<=2*n;i++)
		ans[i-n]=(ans[i-n]+(LL)(F[i].x/e+0.5)%mo*V%mo*V)%mo;
	for(i=0;i<e;i++) F[i]=B[i]*D[i];
	FFT(F,-1);
	for(i=n+1;i<=2*n;i++)
		ans[i-n]=(ans[i-n]+(LL)(F[i].x/e+0.5))%mo;
	for(i=0;i<e;i++) F[i]=A[i]*D[i];
	FFT(F,-1);
	for(i=n+1;i<=2*n;i++)
		ans[i-n]=(ans[i-n]+(LL)(F[i].x/e+0.5)%mo*V)%mo;
	for(i=0;i<e;i++) F[i]=B[i]*C[i];
	FFT(F,-1);
	for(i=n+1;i<=2*n;i++)
		ans[i-n]=(ans[i-n]+(LL)(F[i].x/e+0.5)%mo*V)%mo;
	for(i=1;i<=n;i++){
		ans[i]=(1LL*ans[i]*xf[i])%mo;
		ans[i]=(1LL*(n+1)*com(n,i)-ans[i]+mo)%mo;
	  }
	for(i=1;i<=n;i++)
		printf("%d\n",ans[i]);
	return 0;
}


Compiler output:
a.cc: In function 'void dfs(int, int)':
a.cc:30:27: error: reference to 'next' is ambiguous
   30 |         for(i=head[t];i;i=next[i])
      |                           ^~~~
In file included from /usr/include/c++/14/string:47,
                 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/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:16:26: note:                 'int next [400010]'
   16 | int n,m,head[N],num[2*N],next[2*N],ans[N],fc[N],xf[N],sz[N],a[N],b[N],e,ep;
      |                          ^~~~
a.cc: In function 'int main()':
a.cc:79:28: error: reference to 'next' is ambiguous
   79 |                 num[++m]=y,next[m]=head[x],head[x]=m;
      |                            ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:16:26: note:                 'int next [400010]'
   16 | int n,m,head[N],num[2*N],next[2*N],ans[N],fc[N],xf[N],sz[N],a[N],b[N],e,ep;
      |                          ^~~~
a.cc:80:28: error: reference to 'next' is ambiguous
   80 |                 num[++m]=x,next[m]=head[y],head[y]=m;
      |                            ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:16:26: note:                 'int next [400010]'
   16 | int n,m,head[N],num[2*N],next[2*N],ans[N],fc[N],xf[N],sz[N],a[N],b[N],e,ep;
      |                          ^~~~