随笔分类 -  数据结构-单调栈

摘要:stack<int> st; //此处一般需要给数组最后添加结束标志符,具体下面例题会有详细讲解 for (遍历这个数组) { if (栈空 || 栈顶元素大于等于当前比较元素) { 入栈; } else { while (栈不为空 && 栈顶元素小于当前元素) { 栈顶元素出栈; 更新结果; } 阅读全文
posted @ 2019-12-08 12:22 执||念 阅读(113) 评论(0) 推荐(0)
摘要:题目链接http://codeforces.com/problemset/problem/602/D A function is called Lipschitz continuous if there is a real constant K such that the inequality |f 阅读全文
posted @ 2019-12-08 12:20 执||念 阅读(220) 评论(0) 推荐(0)