Winning CB scholarship


Not able to pass 3 test cases showing TLE

@chiragbaid7
Its due to range overflow error
Q : 823378841 143542613 5719 199889
A : 800477202
Run this once you’ll see
You need to improve your bound for e in binary search

I am not able to figure can u plz say the answer or a hint

@chiragbaid7
One issue was range overflow
You should have taken E as students
Second is your function for calculating if current configuration is possible
It is iterating over students which is in range 10^9 so you are getting TLE


See this solution once

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.