Untitled

fact er moddhe precalculated kore kore mod kore rakhbo. then easily nCr nPr ber korbo. somossa holo overflow hote pare vag korar age, so even answer int er moddhe holeo overflow hote pare.

Untitled

From Pascal Triangle

Untitled

DP use na korle 2^n complexity. DP use korte hobe.

Koivabe permute kora jabe?

Untitled

niche common er songkhok factorial. like A 3 bar, D 2 bar ache. Upore total character.

Untitled

A & B fixed at 2nd and 5th position.