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

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

Problem Link : Copying Books

I have arrived at the minimum of the maximum values.But I am not able to figure out how to partition the books.

My Solution : Ideone

Please guide me as to how to print the partitioning of the books.Do I need to know more to find out how to partition? or is this just enough to compute the partitioning.If this is enough,how do I compute it?

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

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

You can print it in reversed order, here is what I did: http://ideone.com/XDnQnT

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Its giving me wa.The link int the question has the updated solution.I checked the limits, int should do fine but still giving me wa.

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

      Is your binary search correct? The hi is exclusive, so you should initialize hi with sum+1.