摘要: •参考资料 [1]:http://dongxicheng.org/structure/lca-rmq/ •前言 RMQ(Range Minimum/Maximum Query),即区间最值查询。 假设需要查询的区间为[a,b],对于此问题,有三种方法可以得到答案: (1):暴力 (2):线段树 (3 阅读全文
posted @ 2018-10-18 15:19 HHHyacinth 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 传送门:Problem 3279 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 using namespace std; 5 #define mem(a,b) (memset(a,b,sizeof a)) 6 const 阅读全文
posted @ 2018-10-18 14:19 HHHyacinth 阅读(149) 评论(0) 推荐(0) 编辑