← All problemsSign in

Green Objects

Chef was looking at an old picture in his computer. It contained different objects with different colours, and since Chef's favourite colour was green, he wanted to know the number of green objects in that image. An image consists of $N^2$ pixels arranged in the form of a matrix of size N, with each pixel containing 3 integers (0 to 255) denoting the RGB (Red, Blue and Green) values of that pixe

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start