Your for loops start from 0, and run to N - that's ok, mostly because you make your array one element larger in all dimensions so it contains all of those indexes.
But ... it doesn't contain any negative indexes, so the first time through any of those loops, this code will try to access a negative addressed element and will fail with an out of bounds error:
dp[i][j][k] = (int) (((long) i * dp[i - 1][j][k - 1] + (long) j * dp[i][j - 1][k - 1]
Thirty seconds with the debugger would have shown you that!
Be aware: factorial values get very large, very quickly: 12! is the largest value you can fit in a 32 bit integer, so this code could give you some strange results very easily!
dp[i][j][k] = factorial(i + j);