Driver Code
public static void main ( String args [ ] ) { int N = 5 , M = 3 ; int CP [ ] = { 5 , 10 , 35 , 7 , 23 } ; int SP [ ] = { 11 , 10 , 0 , 9 , 19 } ; System . out . println ( solve ( N , M , CP , SP ) ) ; } }