Sticks
CodeChefOpen on judge ↗
The room of requirement have 'n' number of students numbered 1 to n , sitting at i-th point in the plane of the room in such way that no three students were in a straight line . Also each student at i-th point initially has ci score, in such a way that the scores c1,c2,…,cn form a permutation of 1,2,…,n. You can modify the scores through the following operation: 1.Choose two distinct student
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