#include<iostream> #include<vector> using namespace std; bool isok(int i, int j, vector<int>&h) { int ci = i+1; while (h[ci] <= h[i] && h[ci] <= h[j]&&ci<j) { ci++; } if (ci == j) return true; int cj = ...