离散化
invoKer-
这个作者很懒,什么都没留下…
展开
-
CodeForces - 29C Mail Stamps【离散化】【DFS】
题目链接:https://codeforces.com/contest/29/problem/C#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-02-09 20:49:28 · 149 阅读 · 0 评论 -
CodeForces - 19D Deletion of Repeats【线段树】【离散化】
题目链接:https://codeforces.com/contest/19/problem/D线段树套set,2800有点高了#include <iostream>#include <vector>#include <set>#include <algorithm>using namespace std;static const int MAXN=2e5+10;struct Cmd{ int type,x,y;}cmd[MAXN];原创 2020-10-20 16:45:18 · 121 阅读 · 0 评论 -
CodeForces - 19C Deletion of Repeats【离散化】【字符串哈希】
题目链接:https://codeforces.com/contest/19/problem/C#include <iostream>#include <vector>#include <map>#include <algorithm>using namespace std;typedef unsigned long long ull;typedef pair<int,int> PII;static const int MAXN=1原创 2020-10-16 17:41:47 · 110 阅读 · 0 评论 -
CodeForces - 12D Ball【离散化】【线段树】
题目链接:https://codeforces.com/contest/12/problem/D先按b降序排列,对i离散化,查询(i,+∞)中最大的r是否比当前r大#include <iostream>#include <vector>#include <cstring>#include <queue>#include <algorithm>using namespace std;static const int MAXN=5e5+原创 2020-09-23 10:01:37 · 96 阅读 · 0 评论 -
BZOJ - 4195 程序自动分析【离散化】【并查集】
【题目描述】在实现程序自动分析的过程中,常常需要判定一些约束条件是否能被同时满足。考虑一个约束满足问题的简化版本:假设x1,x2,x3,…代表程序中出现的变量,给定n个形如xi=xj或xi≠xj的变量相等/不等的约束条件,请判定是否可以分别为每一个变量赋予恰当的值,使得上述所有约束条件同时被满足。例如,一个问题中的约束条件为:x1=x2,x2=x3,x3=x4,x1≠x4,这些约束条件显然是不...原创 2020-02-03 17:07:30 · 126 阅读 · 0 评论 -
CodeForces - 670C Cinema【离散化】
【题目描述】Moscow is hosting a major international conference, which is attended by n scientists from different countries. Each of the scientists knows exactly one language. For convenience, we enumerate ...原创 2019-09-12 15:47:56 · 201 阅读 · 0 评论 -
POJ - 3179 Corral the Cows【离散化】【前缀和】
【题目描述】Farmer John wishes to build a corral for his cows. Being finicky beasts, they demand that the corral be square and that the corral contain at least C (1 <= C <= 500) clover fields for aft...原创 2019-09-19 16:14:19 · 286 阅读 · 0 评论