#include<bits/stdc++.h> using namespace std; int a[10] = {2, 3, 3, 3, 5, 6, 6, 7, 7, 8}; int ans; int main(){ //int a[10] = {2, 3 ,3, 5 ,8 ,6, 3 ,7 ,7, 6}; do{ bool flag1 = false, flag2 = false;//flag1表示之前是否出现递增,flag2表示之前是否出现递减 int cnt = 0; for(int i = 0; i + ...