Shop Game (Easy)
**This problem has the same setup as the hard version. The difference is here you only need the value of the whole string, while in the hard version you need the sum over all substrings.** You are the owner of a shop with $N$ different unique items to sell, numbered $1, 2, \ldots, N$. The items have been numbered such that item $i$ is always larger (in size) than item $i - 1$. The cost of the $i$
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start