cm74专题

CM74 下一个较大元素

分析 题目:CM74 下一个较大元素思路:保留最大元素,右下降栈 代码 class NextElement {public:vector<int> findNext(vector<int> A, int n) {// write code herevector<int> res(n);stack<int> stk;for(int i = n-1; i >= 0; i--){while(st