import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static int getCost(int [] array, int i,int j ){ int max = array[i]; int min = array[i]; int or = array[i]; int and = array[i]; for(int k=i+1;k=k){ int size = j-i; for(int l=i;l