摘要:
Tree Journey 猜结论 #include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e5 + 5; int n, k, ans, dep[N]; vector<int> g[N]; v 阅读全文
摘要:
Red Pandaships 我们会发现如果有奇数个熊猫被夹在两个熊猫之间,那么一定会相交 #include <bits/stdc++.h> using namespace std; #define int long long const int N = 3e5 + 5; int t, n, m; 阅读全文
摘要:
Fun is Counting 我们可以发现数组 \(a\) 必须是 \(x\) 或 \(x - 1\),然后分类讨论即可 #include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e6 + 阅读全文
摘要:
New Dimensions 我们假设枚举 \(a, b\) 那么我们显然可以发现 \(a^2 + b^2 + c^2 - ab - ab - bc\) 中 \(c\) 越大越好 #include <bits/stdc++.h> using namespace std; #define int lo 阅读全文
摘要:
Music Festival 我们设状态为当前的炫酷值为 \(i\),则 \(dp_i\) 表示炫酷值,然后将每个专辑按照最大值排序即可 #include <bits/stdc++.h> using namespace std; const int N = 2e5 + 5; struct node 阅读全文