Driver program to test above function
public static void main ( String [ ] args ) { int arr [ ] = { 2 , 5 , 1 , 20 , 6 } ; int n = arr . length ; dp = new int [ 1001 ] [ 15001 ] ; System . out . println ( countTripletSum ( arr , n ) ) ; } }