Please help me in following.... mathematical concept — educational round 83 D

Revision en1, by forget_it, 2020-03-10 12:25:17

Recently ,in educational round 83. In question D , i deduced a formula

for(i=n-1;i<=m;i++) { ans=ans+((nCr(i-1,n-2,mod))%mod; } And after that ans=(ans*pow(2,n-3,mod)*(n-2))%mod;

After looking for correct solution i found correct ans was nCr(m,n-1)*(n-2)*pow(2,n-3).

But later observe that for smaller test case my formula was working ,but giving Tle ,at larger tc.

So it that means expression nCr(m,n-1,mod) is equal to summation of nCr(i-1,n-2,mod) ; i range[n-1,m] .

If it is so ,can anyone help me to prove it..

Tags educational round 83, maths, #competitive, #proof

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English forget_it 2020-03-10 12:33:03 50 Tiny change: 'e it..\n\n' -> 'e it..\n\nhere is my solution link [submission:72867206]\n'
en1 English forget_it 2020-03-10 12:25:17 631 Initial revision (published)