摘要:
A. 我是组题人 #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (auto &i: a) cin >> i; vector<int> p(n); io 阅读全文
摘要:
A - ACM中的A题 #include<bits/stdc++.h> using namespace std; using i32 = int32_t; using i64 = long long; #define int i64 using vi = vector<int>; const int 阅读全文
摘要:
A. 二度树上的染色游戏 因为题目保证了是二叉树,所以每次至多只需要选择一个子节点染成红色。所以可以贪心的选择红色权值小的子树即可。 #include <bits/stdc++.h> using namespace std; using i32 = int32_t; using i64 = long 阅读全文
摘要:
A. Closest Point 有解的情况,当且仅当只有两个点且不相邻是,把新加入的点放在中间。 #include<bits/stdc++.h> using namespace std; using i32 = int32_t; using i64 = long long; using i128 阅读全文