shubham2468's blog

By shubham2468, history, 14 months ago, In English

"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.

  • Vote: I like it
  • -11
  • Vote: I do not like it

| Write comment?
»
14 months ago, # |
  Vote: I like it 0 Vote: I do not like it

It's the same solution.

»
14 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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