test ( ) { int [ ] IDENT_0 = new int [ ] { 4 , 5 , 1 , 1 , 1 , 1 , 4 , 3 , 1 } ; "<AssertPlaceHolder>" ; } solution ( int [ ] ) { if ( ( IDENT_0 == null ) || ( ( IDENT_0 . length ) == 0 ) ) { return 0 ; } int [ ] IDENT_1 = new int [ IDENT_0 . length ] ; IDENT_1 [ 0 ] = IDENT_0 [ 0 ] ; for ( int i = 1 ; i < ( IDENT_0 . length ) ; i ++ ) { IDENT_1 [ i ] = ( IDENT_1 [ ( i - 1 ) ] ) + ( IDENT_0 [ i ] ) ; } int IDENT_2 = 1 ; int IDENT_3 = ( IDENT_0 . length ) - 2 ; while ( ( IDENT_2 + 1 ) < IDENT_3 ) { int IDENT_4 = IDENT_1 [ ( IDENT_2 - 1 ) ] ; int IDENT_5 = ( IDENT_1 [ ( ( IDENT_0 . length ) - 1 ) ] ) - ( IDENT_1 [ IDENT_3 ] ) ; if ( ( IDENT_4 == IDENT_5 ) && ( ( ( IDENT_1 [ ( IDENT_3 - 1 ) ] ) - ( IDENT_1 [ IDENT_2 ] ) ) == IDENT_4 ) ) { return 1 ; } else { if ( IDENT_4 > IDENT_5 ) { IDENT_3 OP_0 ; } else if ( IDENT_4 < IDENT_5 ) { IDENT_2 ++ ; } else { IDENT_2 ++ ; IDENT_3 OP_0 ; } } } return 0 ; }
org . junit . Assert . assertThat ( solution ( IDENT_0 ) , org . hamcrest . Matchers . is ( 1 ) )