随笔分类 -  图论_并查集

摘要:并查集维护线段树合并 b加在a上 #include<iostream> #include<cstdio> #define ri register int #define u int namespace opt { inline u in() { u x(0),f(1); char s(getchar 阅读全文
posted @ 2019-11-12 19:45 pai_hoo 阅读(118) 评论(0) 推荐(0)
摘要:https://www.luogu.org/problem/P2024 题目描述 动物王国中有三类动物 A,B,C,这三类动物的食物链构成了有趣的环形。A 吃 B,B 吃 C,C 吃 A。 现有 N 个动物,以 1 - N 编号。每个动物都是 A,B,C 中的一种,但是我们并不知道 它到底是哪一种。 阅读全文
posted @ 2019-10-25 13:47 pai_hoo 阅读(150) 评论(0) 推荐(0)