static long compute ( String A , String B , int N ) {
  int c0A = 0 , c1A = 0 , c0B = 0 , c1B = 0 ;
  for ( char c : A . toCharArray ( ) ) {
    if ( c == '1' ) c1A += 1 ;
    else if ( c == '0' ) c0A += 1 ;
  }
  for ( char c : B . toCharArray ( ) ) {
    if ( c == '1' ) c1B += 1 ;
    else if ( c == '0' ) c0B += 1 ;
  }
  int max1xor = Math . min ( c0A , c1B ) + Math . min ( c1A , c0B ) ;
  int min1xor = N - Math . min ( c0B , c0A ) - Math . min ( c1A , c1B ) ;
  long ans = nCr_RangeSum ( N , min1xor , max1xor , 1000000000 + 7 ) ;
  return ans ;
}

static long compute ( String A , String B , int N ) { int c0A = 0 , c1A = 0 , c0B = 0 , c1B = 0 ; for ( char c : A . toCharArray ( ) ) { if ( c == '1' ) c1A += 1 ; else if ( c == '0' ) c0A += 1 ; } for ( char c : B . toCharArray ( ) ) { if ( c == '1' ) c1B += 1 ; else if ( c == '0' ) c0B += 1 ; } int max1xor = Math . min ( c0A , c1B ) + Math . min ( c1A , c0B ) ; int min1xor = N - Math . min ( c0B , c0A ) - Math . min ( c1A , c1B ) ; long ans = nCr_RangeSum ( N , min1xor , max1xor , 1000000000 + 7 ) ; return ans ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (character_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (binary_expression left: (decimal_integer_literal) right: (decimal_integer_literal)))))) (return_statement (identifier))))