int m = 0,n=0; void solve(vector> &board) { // Start typing your C/C++ solution below // DO NOT write int main() function if(board.empty()||board[0].empty()) return; m = board.size(); n = board[0].size(); int i,j; for(j=0;j >& board) { if(i>=m||i<0||j<0||j>=n||board[i][j]!='O') return; board[i][j] = '+'; dfs(i-1,j,board); dfs(i+1,j,board); dfs(i,j-1,board); dfs(i,j+1,board); }