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

Автор shubham2468, история, 10 месяцев назад, По-английски

"A. Jellyfish and Undertale " A better solution Solution link

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" rather than adding the tool that is greater than "a".

Hope it helps.

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

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

Auto comment: topic has been updated by shubham2468 (previous revision, new revision, compare).

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

It's the same solution.

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

Why make a vector and then use accumulate() instead of just summing the values directly?