题意 给你n长度的数组 每个数必须填 1 - 200 满足
1 a[1] <= a[2]
2 a[i]<=max(a[i-1],a[i+1])
3 a[n-1]>=a[n]
做法 我们定义dp数组为 dp[100005][200][3]
最后一维3中的 0 代表前面的数小于当前数的个数
1 代表前面的数等于当前数的个数
2 代表前面的数大于当前数的个数
然后主要是用了滚动数组降了一维
所以时间复杂度是 n*200的
/*
if you can't see the repay
Why not just work step by step
rubbish is relaxed
to ljq
*/
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
using namespace std;
#define dbg(x) cout<<#x<<" = "<< (x)<< endl