随笔分类 -  Hdu

Hdu5036 bitset优化传递闭包
摘要:题目链接 思路:参考题解。 /* 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 阅读全文

posted @ 2016-05-23 13:11 onlyAzha 阅读(273) 评论(0) 推荐(0)

Hdu5033 单调栈维护凸包
摘要:题目链接 思路:参考了网上博客。用单调栈维护一个凸包,分别求左边的角度和右边的角度。 /* ID: onlyazh1 LANG: C++ TASK: test */ #include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 阅读全文

posted @ 2016-05-23 10:37 onlyAzha 阅读(210) 评论(0) 推荐(0)

Hdu5032 极角排序+树状数组
摘要:题目链接 思路:参考了题解。对询问进行极角排序,然后用树状数组维护一下前缀和即可。 /* ID: onlyazh1 LANG: C++ TASK: test */ #include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 阅读全文

posted @ 2016-05-22 22:10 onlyAzha 阅读(208) 评论(0) 推荐(0)

Hdu5039 线段树维护DFS序
摘要:题目链接 参考了网上的题解。先处理一下dfs序。然后线段树维护区间和即可。 /* ID: onlyazh1 LANG: C++ TASK: test */ #include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 #def 阅读全文

posted @ 2016-05-21 21:44 onlyAzha 阅读(187) 评论(0) 推荐(0)

导航