Pablo in a Fix
CodeChefOpen on judge ↗
Every time when Pablo receives a consignment of drugs he checks its authenticity by taking the absolute difference of the unique number (written on top of every box) of two consecutive boxes and if the difference is through 1 to n-1 (n is number of boxes in the consignment), he will accept it. For example, if 4 boxes are there in the consignment having number 1, 4, 3, 2 written on top. Then he wil
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