Help needed in Assembly Line Spoj problem

Правка en3, от code_warrior, 2020-08-16 15:25:39

Can anyone help me figure how to get AC in this problem. I tried to solve it with binary search, made several submissions,but couldn't get AC. My idea is to search from 0 upto 1e18 and check if this number of products is possible or not and thus correspondingly increase or decrease my bounds and keep a track of maximum number of products possible and finally output it. It would be very helpful if someone could share his/her approach.

Problem SPOJ

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский code_warrior 2020-08-16 15:25:39 1 Tiny change: ' products possible ' -> ' products possible '
en2 Английский code_warrior 2020-08-13 10:46:20 2 Tiny change: 'igure how yo get AC i' -> 'igure how to get AC i'
en1 Английский code_warrior 2020-08-13 10:45:55 542 Initial revision (published)