|Online MIPT programming contest||РУССКИЙ|
Time limit = 3Input is BMP-file.
Your program should count number of segments in the picture. Segment is connected domain of unique colored pixels. Two pixels are connected if they have common side. Each pixel in the interior of image has 4 connected pixels.
Picture in input has simple format BMP picture with 24bit color, no compression used.
Samples of programs, working with such BMP pictures
Input Read from standard input BMP file. It's size less than 2 Mbytes. Height and width of the picture less than 1025.
Output Output to standard output number of segments.
Redirecting binary file to standard input works properly in Linux. If you use Windows then read from file while debugging your program. But before submiting change input stream(file) to standard input.
Pasha Agapov & Fedya Chelnokov
© acm.mipt DevGroup
The page was generated in 220ms