SRM472 Div2 Easy(250) ColorfulTilesEasy
#include <string> using namespace std; class ColorfulTilesEasy { public: int theMin( string room ); }; int ColorfulTilesEasy::theMin( string room ) { int c = 0; for ( int i=1; i<(int)room.length(); i++ ) if ( room[i] == room[i-1] ) room[i] = 'X', c++; return c; }