Devils Fruit
CodeChefOpen on judge ↗
The pirates are having a contest. Whoever wins will get Devil Fruit as the prize. Blackbeard wanted the fruit for himself so he tried to steal the prize. But he was spotted while stealing. So he moved to plan B. He sliced the fruit and mixed it with other normal sliced fruits. Every fruit in that mixture has a unique id. Being forgetful, Blackbeard forgets the Devil Fruit’s id. But luck being in
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