Tetrahedron Cycles
CodeChefOpen on judge ↗
Vamsi is standing at one vertex of a tetrahedron. He is quite active and he wouldn't stay idle. At each moment of time he makes a step from one vertex to another one along some edge of the tetrahedron.You can view more about Tetrahedron here Your task is to count the number of ways in which Vamsi can go from initial vertex and comeback to same vertex in exactly n steps. In other words, you are as
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