摘要: 题目 分析 水题。$ O(nlogn) $的LCS 代码 #include <bits/stdc++.h> using namespace std; const int maxn=255*260, INF=1e9; int S[maxn], g[maxn], d[maxn]; int num[max 阅读全文
posted @ 2018-06-25 23:56 noble_(noblex) 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 题目 分析 太喵了~~~~~ 还有中途相遇法这种东西的。 嗯 以后可以优化一些暴力 详情左转蓝书P58 (但可能我OI生涯中都遇不到正解是这个的题把。。。。。。 代码 #include <bits/stdc++.h> using namespace std; const int maxn=25; m 阅读全文
posted @ 2018-06-25 20:16 noble_(noblex) 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 题目 分析 好喵啊~~~~ 不会做 正解看蓝书P53吧 代码 #include <cstdio> #include <algorithm> using namespace std; inline int read() { int x = 0, f = 1; char ch = getchar(); 阅读全文
posted @ 2018-06-25 17:33 noble_(noblex) 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目 分析 扫描线搞一搞。 按左端点排序,左端点相同时按右端点排序。 如果是左端点就$ cnt++ $,否则$ cnt-- $ 统计一下$ Max $就行了 代码 #include <bits/stdc++.h> using namespace std; void update(int x,int 阅读全文
posted @ 2018-06-25 16:28 noble_(noblex) 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 题目 分析 一开始没看到都是正整数根本不会做。。。。。。 看到了就是水题了。(但还是sb WA了一发) 尺取法搞一搞 代码 #include <bits/stdc++.h> using namespace std; const int maxn = 100000 + 10; int A[maxn], 阅读全文
posted @ 2018-06-25 16:21 noble_(noblex) 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 题目 分析 以前见到过差不多的这题。 xhk说是单调栈水题,但我又不会单调栈,于是当时就放下了。 这么久过去了我还是不会用单调栈做这题,用的是悬线法。 非常好写 代码 #include <cstdio> #include <cstring> #include <algorithm> using na 阅读全文
posted @ 2018-06-25 11:24 noble_(noblex) 阅读(174) 评论(0) 推荐(0) 编辑
/* */