Driver Code
public static void main ( String [ ] args ) { int m = 20 ; int [ ] x = new int [ ] { 6 , 7 , 12 , 13 , 14 } ; int [ ] revenue = new int [ ] { 5 , 6 , 5 , 3 , 1 } ; int n = x . length ; int t = 5 ; System . out . println ( maxRevenue ( m , x , revenue , n , t ) ) ; } }