Color Combination
CodeChefOpen on judge ↗
He can place any crayon with any label into the sequence at any position. He can eliminate any crayon from any position. You can replace any two crayons. You can swap two adjacent crayons. He is under time constraints on each operation, meaning that an operation can only be performed in a certain time. So, the first operation takes time *T1*, the second one takes *T2*, the third one takes *T3* and
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