摘要: 板子 int a[maxn], b[maxn];//a[i]为原数组,b[i]为离散化后的数组 int main() { int n; scanf("%d", &n); for(int i = 1; i <= n; ++i) { scanf("%d", &a[i]); b[i] = a[i]; } 阅读全文
posted @ 2020-10-09 09:09 .Ivorelectra 阅读(104) 评论(0) 推荐(0) 编辑
摘要: D - Mayor's posters || 覆盖型线段树 & 离散化 https://vjudge.net/contest/399540#problem/D 对于每个结点,若tree == 0,表示这段区间内颜色不唯一;若tree != 0,这个数字就表示这段区间对应的颜色; 贴n张海报,即n次区 阅读全文
posted @ 2020-10-09 02:56 .Ivorelectra 阅读(100) 评论(0) 推荐(0) 编辑