0_0_20613690_29906.cpp:12:5: error: expected unqualified-id before '=' token
=mod) C[i][j]-=mod; } }}ll f(int n,int d){ if(n==1&&d>=1) return 1; if(n==1||d==0) return 0; if(dp[n][d]!=-1) return dp[n][d]; ll &ans=dp[n][d]; ans=0; ans=(ans+f(n-1,d-1)*n*2)%mod; for(int k=1;k<=n-2;++k) ans=(ans+(f(k,d-1)*f(n-k-1,d-1)%mod*C[n-2][k]%mod)*n)%mod; return ans;}int main(){ Init(); memset(dp,0xff,sizeof(dp)); int t,tcase=0,n,d; scanf("%d",&t); while(t--) { scanf("%d%d",&n,&d); ll ans=f(n,d)-f(n,d-1); ans=(ans+mod)%mod; printf("Case #%d: %I64d\n",++tcase,ans); } return 0;}
^
0_0_20613690_29906.cpp:12:32: error: expected declaration before '}' token
=mod) C[i][j]-=mod; } }}ll f(int n,int d){ if(n==1&&d>=1) return 1; if(n==1||d==0) return 0; if(dp[n][d]!=-1) return dp[n][d]; ll &ans=dp[n][d]; ans=0; ans=(ans+f(n-1,d-1)*n*2)%mod; for(int k=1;k<=n-2;++k) ans=(ans+(f(k,d-1)*f(n-k-1,d-1)%mod*C[n-2][k]%mod)*n)%mod; return ans;}int main(){ Init(); memset(dp,0xff,sizeof(dp)); int t,tcase=0,n,d; scanf("%d",&t); while(t--) { scanf("%d%d",&n,&d); ll ans=f(n,d)-f(n,d-1); ans=(ans+mod)%mod; printf("Case #%d: %I64d\n",++tcase,ans); } return 0;}
^
|