forum 'Volume CVI' description wrote:All about problems in Volume CVI. If there is a thread about your problem, please use it. If not, create one with its number in the subject.
Moderator: Board moderators
forum 'Volume CVI' description wrote:All about problems in Volume CVI. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

long long mem[2005][2005]; //initialized to -1
long long c(int n, int k)
{
if (n == k) return 1;
if (k == 0) return 1;
if (mem[n][k] != -1) return mem[n][k];
return mem[n][k] = c(n - 1, k) + c(n - 1, k - 1);
}
Users browsing this forum: No registered users and 1 guest