加载中...

摘要: 给出一个数组 每个数组的值代表一个集合 相邻的两个集合不能重合 问集合中的最大数是多少 线段树维护这个区间的相邻数的最大值 因为相邻的条件所以边界需要特判 #include<bits/stdc++.h> using namespace std; #define int long long #defi 阅读全文
posted @ 2022-09-07 23:30 liang302 阅读(26) 评论(0) 推荐(0)
摘要: 给一棵树 看能不能往上跳k步 #include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <queue> #include <map> #include <vector> #includ 阅读全文
posted @ 2022-09-07 17:14 liang302 阅读(28) 评论(0) 推荐(0)