When I tried to upsolve this problem 706B - Interesting drink https://mirror.codeforces.com/contest/706/problem/B I faced an undefined time limit!!
In my first approach, I solved it using a multiset and upperbound 294508423 https://mirror.codeforces.com/contest/706/submission/294508423 I got time limit on test 11
then, tried to solve with vector and sorting, which got accepted 294508512 https://mirror.codeforces.com/contest/706/submission/294508512
Can anyone help me understand what the issue was?