{ int @n,@m; ll @t; Matrix c(n,n); rep(m){ int @a,@b; c[b][a]=1; } c**=t; wt(sum[int][i,0,n](c[i][0]!=0)); }