摘要: 思路很巧妙啊 code: #include <cstdio> #include <cstring> #include <algorithm> #define ll long long #define N 1000009 #define setIO(s) freopen(s".in","r",stdi 阅读全文
posted @ 2020-02-06 16:42 EM-LGH 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 这个题的思路还是十分巧妙的. 我们发现我们要查询的区域恰好构成了一个梯形. 然后用那个单调栈去维护折线,并用主席树做二维数点. code: #include <cstdio> #include <algorithm> #include <stack> #include <cstring> #incl 阅读全文
posted @ 2020-02-06 15:44 EM-LGH 阅读(156) 评论(0) 推荐(0) 编辑