
HYSBZ
JeraKrs
本人目前就职于百度商业研发部,有需要内推的朋友简历可发我邮箱 jerakrs@qq.com
展开
-
hysbz 2243 染色(树链剖分)
题目链接:hysbz 2243 染色题目大意:略。解题思路:树链剖分+线段树的区间合并,但是区间合并比较简单,节点只要记录左右端点的颜色即可。#include #include #include using namespace std;const int maxn = 1e5 + 5;int N, M, ne, val[maxn], first[maxn], j原创 2014-10-17 09:41:16 · 1224 阅读 · 0 评论 -
hysbz 1036 树的统计Count(树链剖分)
题目链接:hysbz 1036 树的统计Count题目大意:略。解题思路:树链剖分+线段树维护。#include #include #include using namespace std;const int maxn = 30005;const int INF = 0x3f3f3f3f;#define lson(x) ((x)#define rson(x)原创 2014-10-17 09:39:19 · 813 阅读 · 0 评论 -
hysbz 2038 小Z的袜子(莫队)
题目链接:hysbz 2038 小Z的袜子代码#include <cstdio>#include <cstring>#include <cmath>#include <algorithm>using namespace std;typedef long long ll;const int maxn = 50005;struct State { int l, r, id;}Q[ma原创 2015-11-12 15:18:43 · 920 阅读 · 0 评论