Mad World
CodeChefOpen on judge ↗
The problem is referred from HackerEarth It’s a mad, mad, mad world where you have coins of both positive and negative denominations. There are N such coins of different denominations. They are arranged in a straight line in front of you. You get to pick the coins as you like. To make things more complex, any two coins you pick must have at least K coins in between them. For example, assume the
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