public static void main ( String [ ] args ) {
  Scanner s = GCJ . createScanner ( 'B' , true ) ;
  int T = s . nextInt ( ) ;
  for ( int i = 1 ;
  i <= T ;
  i ++ ) {
    int n = s . nextInt ( ) ;
    int x = s . nextInt ( ) ;
    int y = s . nextInt ( ) ;
    double p = 0 ;
    int nn = 1 ;
    int total = 1 ;
    while ( total + nn + 1 + nn + 2 <= n ) {
      total += nn + 1 + nn + 2 ;
      nn += 2 ;
    }
    int xy = Math . abs ( x ) + y ;
    if ( xy < nn ) {
      p = 1 ;
    }
    else if ( xy >= nn + 2 ) {
      p = 0 ;
    }
    else {
      int left = n - total ;
      if ( left < y + 1 ) {
        p = 0 ;
      }
      else {
        nn ++ ;
        double [ ] [ ] cand = new double [ nn + 1 ] [ nn + 1 ] ;
        cand [ 0 ] [ 0 ] = 1 ;
        for ( int w = 1 ;
        w <= left ;
        w ++ ) {
          for ( int u = 0 ;
          u < w && u <= nn ;
          u ++ ) {
            int v = w - u - 1 ;
            if ( v > nn ) {
              continue ;
            }
            if ( u == nn ) {
              cand [ u ] [ v + 1 ] += cand [ u ] [ v ] ;
            }
            else if ( v == nn ) {
              cand [ u + 1 ] [ v ] += cand [ u ] [ v ] ;
            }
            else {
              cand [ u + 1 ] [ v ] += cand [ u ] [ v ] / 2 ;
              cand [ u ] [ v + 1 ] += cand [ u ] [ v ] / 2 ;
            }
          }
        }
        p = 0 ;
        for ( int u = y + 1 ;
        u <= left && u <= nn ;
        u ++ ) {
          int v = left - u ;
          if ( v > nn ) {
            continue ;
          }
          p += cand [ u ] [ v ] ;
        }
      }
    }
    GCJ . out ( i , Double . toString ( p ) ) ;
  }
}

public static void main ( String [ ] args ) { Scanner s = GCJ . createScanner ( ' B ' , true ) ; int T = s . nextInt ( ) ; for ( int i = 1 ; i <= T ; i ++ ) { int n = s . nextInt ( ) ; int x = s . nextInt ( ) ; int y = s . nextInt ( ) ; double p = 0 ; int nn = 1 ; int total = 1 ; while ( total + nn + 1 + nn + 2 <= n ) { total += nn + 1 + nn + 2 ; nn += 2 ; } int xy = Math . abs ( x ) + y ; if ( xy < nn ) { p = 1 ; } else if ( xy >= nn + 2 ) { p = 0 ; } else { int left = n - total ; if ( left < y + 1 ) { p = 0 ; } else { nn ++ ; double [ ] [ ] cand = new double [ nn + 1 ] [ nn + 1 ] ; cand [ 0 ] [ 0 ] = 1 ; for ( int w = 1 ; w <= left ; w ++ ) { for ( int u = 0 ; u < w && u <= nn ; u ++ ) { int v = w - u - 1 ; if ( v > nn ) { continue ; } if ( u == nn ) { cand [ u ] [ v + 1 ] += cand [ u ] [ v ] ; } else if ( v == nn ) { cand [ u + 1 ] [ v ] += cand [ u ] [ v ] ; } else { cand [ u + 1 ] [ v ] += cand [ u ] [ v ] / 2 ; cand [ u ] [ v + 1 ] += cand [ u ] [ v ] / 2 ; } } } p = 0 ; for ( int u = y + 1 ; u <= left && u <= nn ; u ++ ) { int v = left - u ; if ( v > nn ) { continue ; } p += cand [ u ] [ v ] ; } } } GCJ . out ( i , Double . toString ( p ) ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (character_literal) (true))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) right: (identifier)) right: (decimal_integer_literal)) right: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier)) right: (decimal_integer_literal)))) (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))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (block (expression_statement (update_expression (identifier))) (local_variable_declaration type: (array_type element: (floating_point_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (floating_point_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal))) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (decimal_integer_literal)) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (continue_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (identifier)) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier))))) alternative: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (identifier)) right: (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal))))))))))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (continue_statement))) (expression_statement (assignment_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier))))))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))))))