Evaluate XOR operation
else if ( str [ k ] == ' ^ ' ) { if ( isTrue == 1 ) { temp_ans = temp_ans + leftTrue * rightFalse + leftFalse * rightTrue ; } else { = temp_ans + leftTrue * rightTrue + leftFalse * rightFalse ; } } [ i , j , isTrue ] = temp_ans ; } return ; } static int ( int N , string S ) { int [ , , ] dp = new int [ N + 1 , N + 1 , 2 ] ; for ( int i = 0 ; i < ( N + 1 ) ; i ++ ) { for ( int j = 0 ; < ( N + 1 ) ; ++ ) { for ( int k = 0 ; < 2 ; ++ ) { dp [ i , j , k ] = - 1 ; } } } return parenthesis_count ( S , 0 , N - 1 , 1 , dp ) ; }