You are not logged in. Please login at www.codechef.com to post your questions!

×

marbles logic HELP PLSS

What is the logic of marbles in medium practice section....how it can be (n-1)C(k-1)??.....pls help...thanks

asked 04 Feb '14, 12:11

chaseme's gravatar image

1★chaseme
62692443
accept rate: 0%

closed 06 Feb '14, 00:24

chandan11111's gravatar image

3★chandan11111
3.6k133555


Just two days back even i was wondering the same.. when i found this

and please go through Wikipedia. It contains detailed explanation. It'll surely help..!!! :)

link

answered 06 Feb '14, 01:11

el_diablo's gravatar image

4★el_diablo
7113
accept rate: 50%

There are many duplicates questions related to question please see this post .
http://discuss.codechef.com/questions/38041/medium-level-problem-marbles-sigsegv-error.
Hope this will help.
Thanks .

link

answered 06 Feb '14, 00:23

chandan11111's gravatar image

3★chandan11111
3.6k133555
accept rate: 10%

Reali thanks..this qstion was disturbing me for two days...

link

answered 06 Feb '14, 03:30

chaseme's gravatar image

1★chaseme
62692443
accept rate: 0%

You can use the popular Beggar's method (is usually taught in High Schools).

Distribution of n-k coins to k beggars. For distribution of r identical coins among n beggars is c(n+r-1,r-1) Applying the formula you get required the formula

link

answered 18 Dec '18, 22:33

rishabhjaini's gravatar image

1★rishabhjaini
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×2,559
×545
×11

question asked: 04 Feb '14, 12:11

question was seen: 4,224 times

last updated: 18 Dec '18, 22:33