Calculate the score of the combined string i . e . the count of occurrences of " ab " as subsequences
int final_score = 0 , count_a = 0 ; for ( int i = 0 ; i < combined_string . size ( ) ; i ++ ) { if ( combined_string [ i ] == ' a ' ) {