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

相关评论

本站评论功能暂时取消,后续此功能例行通知。

一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播不法有害信息!

二、互相尊重,对自己的言论和行为负责。

好贷网好贷款