Ask Objects
CodeChefOpen on judge ↗
Write a program to count the number of objects in a black and white image. Assume that image is represented as two dimensional array of integers: value 1 represents a black pixel and a value 0 represents a white pixel. Any adjacent black pixels are treated as part of the same object. Assume that the image size is upto maximum of 10 X 10 and is always a square (number of rows = number of columns
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