Request for help on DP / Math Problem

Правка en1, от BinaryCrazy, 2020-03-30 01:20:50

Hi all,

Hope you are all safe with the unfortunate events occurring throughout the world.

I was solving some problems, when I came across this problem. I have attached the screenshot of the statement to this post.

I first attempted to use combinatorics and math to solve it, but later changed to applying DP. However, I couldn't figure out a recurrence between the states (# of objects, # of groups).

I would really appreciate it if someone could lend a helping hand with the recurrence. Also, IF there is an easy mathematical solution to the problem, please share it.

Thanks for your help and time! BC

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский BinaryCrazy 2020-03-30 01:32:07 129
en2 Английский BinaryCrazy 2020-03-30 01:23:29 244 Tiny change: '51d27.png)' -> '51d27.png)\n\nSample TC:\nInput: \n4 2\n\nOutput\n3'
en1 Английский BinaryCrazy 2020-03-30 01:20:50 663 Initial revision (published)