摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 using namespace std; 7 #define maxn 100005 阅读全文
posted @ 2016-06-11 16:56 oyzx~ 阅读(167) 评论(0) 推荐(0)
摘要: 莫队算法:莫队算法使用范围: 1.支持离线操作。 2.在已有的序列左右加入或删除一个节点的复杂度很低。 3.外层复杂度为nsqrt(n)。 我们将序列分为sqrt(n)块,每一块的大小也是sqrt(n),我们将询问按照左端点所在块为第一关键字,当左端点所在块一样是,如果编号是奇数块就按照右端点从升序 阅读全文
posted @ 2016-06-10 16:23 oyzx~ 阅读(147) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cmath> 4 #include <cstring> 5 #include <algorithm> 6 #define maxn 1005 7 #define maxm 1000005 8 阅读全文
posted @ 2016-06-09 16:06 oyzx~ 阅读(248) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 #define maxn 1005 7 using namespace std; 8 阅读全文
posted @ 2016-06-06 00:28 oyzx~ 阅读(237) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 using namespace std; 7 8 int main(){ 9 int 阅读全文
posted @ 2016-06-06 00:26 oyzx~ 阅读(119) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 #define maxn 250005 7 using namespace std; 阅读全文
posted @ 2016-06-05 13:17 oyzx~ 阅读(145) 评论(0) 推荐(0)
摘要: 题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1103 题目大意:在经济全球化浪潮的影响下,习惯于漫步在清晨的乡间小路的邮递员Blue Mary也开始骑着摩托车传递邮件了。不过,她经常回忆起以前在乡间漫步的情景。昔日,乡下有依次编号为1.. 阅读全文
posted @ 2016-06-05 12:32 oyzx~ 阅读(357) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 #define maxn 100005 7 #define inf 100000000 阅读全文
posted @ 2016-06-04 20:33 oyzx~ 阅读(335) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 #define maxn 800005 7 #define maxm 1600005 阅读全文
posted @ 2016-06-03 19:28 oyzx~ 阅读(689) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 #define maxn 100005 7 #define maxl 200005 8 阅读全文
posted @ 2016-06-02 22:07 oyzx~ 阅读(164) 评论(0) 推荐(0)