private static void solve(int []width, String []entexits) {
		
		// iterate of the ent exits
		for (String str: entexits){
			int ent = Integer.parseInt((str.split(" ")[0]));
			int exit = Integer.parseInt((str.split(" ")[1]));
			int min_width = Integer.MAX_VALUE;
			for (int i = ent;i<=exit;i++){
				if(width[i]<min_width)
					min_width = width[i];
			}
			
			System.out.println(min_width);
		}
		
	}