随笔分类 -  离散化

摘要:链接 #include <bits/stdc++.h> using namespace std; const int maxn = 1e4 + 10; int n,m,cnt,a[2 * maxn],fa[2 * maxn]; string str; struct node{ int l,r,ans 阅读全文
posted @ 2020-08-17 11:03 Hazelxcf 阅读(112) 评论(0) 推荐(0)
摘要:链接 感觉正常写即可 #include <bits/stdc++.h> using namespace std; const int maxn = 2e6 + 10; int t,n,a,b,e,fa[maxn],aa[maxn],cnt,ssize; vector<pair<int,int> >v 阅读全文
posted @ 2020-08-14 22:39 Hazelxcf 阅读(128) 评论(0) 推荐(0)
摘要:百度百科 STL 离散化 步骤 1 排序 2 删除重复元素 3 索引元素对应的值 why?? 阅读全文
posted @ 2020-08-13 20:48 Hazelxcf 阅读(98) 评论(0) 推荐(0)
摘要:离散化 #include<bits/stdc++.h> using namespace std; const int MAX = 2e6 + 5; int n, f[MAX], a[MAX], b[MAX], c[MAX]; vector<int> d; int find(int v) { retu 阅读全文
posted @ 2020-04-19 20:50 Hazelxcf 阅读(193) 评论(0) 推荐(0)