Christopher and image processing
CodeChefOpen on judge ↗
Christopher decided to do some image processing. He has a scrambled square image with $N * N$ pixels. All the pixels are either black or white. His task is to convert it to the correct form. In **one** operation he can - - **Either** swap any 2 pixels on the image. - **OR** rotate the image clockwise **or** anticlockwise by 90 degrees. Help him to convert the image to the required
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