static boolean check ( int start , int x , List < Integer > a ) {
  boolean [ ] dp = new boolean [ 20002 ] ;
  dp [ start ] = true ;
  for ( int i = 0 ;
  i < a . size ( ) ;
  i ++ ) {
    boolean [ ] next_dp = new boolean [ 20002 ] ;
    for ( int j = 0 ;
    j < 20002 ;
    j ++ ) {
      if ( ! dp [ j ] ) {
        continue ;
      }
      next_dp [ j + a . get ( i ) ] = true ;
      next_dp [ j - a . get ( i ) ] = true ;
    }
    dp = Arrays . copyOf ( next_dp , 20002 ) ;
  }
  return dp [ x ] ;
}

static boolean check ( int start , int x , List < Integer > a ) { boolean [ ] dp = new boolean [ 20002 ] ; dp [ start ] = true ; for ( int i = 0 ; i < a . size ( ) ; i ++ ) { boolean [ ] next_dp = new boolean [ 20002 ] ; for ( int j = 0 ; j < 20002 ; j ++ ) { if ( ! dp [ j ] ) { continue ; } next_dp [ j + a . get ( i ) ] = true ; next_dp [ j - a . get ( i ) ] = true ; } dp = Arrays . copyOf ( next_dp , 20002 ) ; } return dp [ x ] ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier))) body: (block (local_variable_declaration type: (array_type element: (boolean_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (boolean_type) dimensions: (dimensions_expr (decimal_integer_literal))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (true))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (array_type element: (boolean_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (boolean_type) dimensions: (dimensions_expr (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: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (unary_expression operand: (array_access array: (identifier) index: (identifier)))) consequence: (block (continue_statement))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (true))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (true))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))))))) (return_statement (array_access array: (identifier) index: (identifier)))))