Hackrank Equal DP

发布时间:2017-7-1 11:49:36编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"Hackrank Equal DP ",主要涉及到Hackrank Equal DP 方面的内容,对于Hackrank Equal DP 感兴趣的同学可以参考一下。

Christy is interning at HackerRank. One day she has to distribute some chocolates to her colleagues. She is biased towards her friends and may have distributed the chocolates unequally. One of the program managers gets to know this and orders Christy to make sure everyone gets equal number of chocolates.

But to make things difficult for the intern, she is ordered to equalize the number of chocolates for every colleague in the following manner,

For every operation, she can choose one of her colleagues and can do one of the three things.

  1. She can give one chocolate to every colleague other than chosen one.
  2. She can give two chocolates to every colleague other than chosen one.
  3. She can give five chocolates to every colleague other than chosen one.

Calculate minimum number of such operations needed to ensure that every colleague has the same number of chocolates. 

上一篇:debug---null Pointer Exception--一步步查找(1)
下一篇:openvpn 初步使用


关键词: Hackrank Equal DP