Help on a combinatorics problem (UVA 10883)

Revision en1, by Tobby_And_Friends, 2017-01-09 19:01:12

Link: https://uva.onlinejudge.org/external/108/10883.pdf

I could figure out that let's say for 5 numbers the answer is (Arr[1] + 4 * Arr[2] + 6 * Arr[3] + 4 * Arr[4] + Arr[5])/2^16. So the problem basically reduces to finding the values in the nth row of pascal's triangle and power of 2. But I am not very sure as to how to implement the solution. Any help is really appreciated.

Tags combinatorics, uva

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Tobby_And_Friends 2017-01-09 19:01:12 426 Initial revision (published)