摘要:题目链接 思路:参考题解。 /* ID: onlyazh1 LANG: C++ TASK: test */ #include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 t
阅读全文
摘要:题目链接 思路:参考了网上博客。用单调栈维护一个凸包,分别求左边的角度和右边的角度。 /* ID: onlyazh1 LANG: C++ TASK: test */ #include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1
阅读全文
摘要:题目链接 思路:参考了题解。对询问进行极角排序,然后用树状数组维护一下前缀和即可。 /* ID: onlyazh1 LANG: C++ TASK: test */ #include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1
阅读全文
摘要:题目链接 参考了网上的题解。先处理一下dfs序。然后线段树维护区间和即可。 /* ID: onlyazh1 LANG: C++ TASK: test */ #include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 #def
阅读全文