Not able to pass all test cases

here is my code

You did not initialize rc and cc as 0 in line 24.
Here is your updated code -