摘要:
本来想练习并查集,然后在看官网提示这是并查集类型题目,上来先默写了一下并查集,想了半天并查集怎么写。。我呸,并查集。。这里找规律。。区间的【最大值-最小值】=【区间长度】,直接枚举。。。讨厌这种找规律的题。。。 历届试题 连号区间数 时间限制:1.0s 内存限制:256.0MB 时间限制:1.0s 阅读全文
摘要:
#include #include #include #include #include using namespace std; const int maxn = 100000*3 + 100; int par[maxn]; int Rank[maxn]; int N, K; int T[maxn], X[maxn], Y[maxn]; //初始化n个元素 void init(... 阅读全文
摘要:
阅读全文