Save Theon
CodeChefOpen on judge ↗
Ramsay: "(...) you win the game if you figure out who I am and why I'm torturing you." Theon must think quickly and guess who his torturer is! However, Ramsey already decided what he will do after Theon gives his answer. There are N people. Theon may say who the torturer is. Let us consider that the people are numbered from 1 to N. If Theon chooses i-th person, Ramsay will hit him Ti times. You
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