"A. Jellyfish and Undertale " A better solution[submission:226139688] [Solution link](https://mirror.codeforces.com/contest/1875/submission/226139688) ==================
Suppose there is no such bug as "a" then the total time for the bomb to explode will be the sum of the tools + b. In the question, we have given "a" so if we get any tool that is greater than "a" then we should add "a" to the vector rather than adding the tool that is greater than "a".
Hope it helps.