题意 给定一个数列。 对于每一个,找两边的第一个比它大的值,然后在区间里找最大值,再在里找最大值。 思路 单调栈,再加一个判断。 Solution #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 7; #define sc(x) scanf("%d", &(x)) #define me(L) memset(L, 0, sizeof(L)) int L[N], R[N], st[N], a[N]; int main() { int n, t, T; ...