0_0_26490670_894.cpp: In function 'int main()': 0_0_26490670_894.cpp:33:65: error: 'AP' was not declared in this scope dp[c][i]+=1ll*dp[c+j-k][i+1]*calc(a[i]-j-k,sum[i-1]-c+1)%AP*calc(k,c)%P*r[a[i]]%P; ^