Блог пользователя aakarshmadhavan

Автор aakarshmadhavan, история, 6 лет назад, По-английски

478B

Hello! I am completing 100 DivB problem in Ahmed's Ladder and I got stuck on this one. I feel this one has some underlying mathematics concept I am unaware of. Sadly there is no editorial either and understanding from other people's code was very difficult.

Can someone give me a hand in understanding the solution to this problem?

Thank you very much

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

How do you minimise number of friends ?

Make the teams as even as possible.

How do you maximise the number of friends ?

Put one person in each team and put all the remaining people in one team.

Here is some explanation.

I won't include code because I was a beginner when I solved this problem and I did it in C.