← All problemsSign in

Cuboidaloid

We have a rectangular parallelepiped of dimensions $A×B×C$, divided into $1×1×1$ small cubes. The small cubes have coordinates from $(0,0,0)$ through $(A−1,B−1,C−1)$. Let $p$, $q$ and $r$ be integers. Consider the following set of $abc$ small cubes: { ( (p+i) mod A, (q+j) mod B, (r+k) mod C ) | i, j and k are integers satisfying 0 ≤ i < a, 0 ≤ j < b , 0 ≤ k < c} A set of small cubes that can b

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start