上一页 1 2 3 4 5 6 7 ··· 24 下一页

2025年12月28日

摘要: C. 1D puyopuyo 栈 代码实现 #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { int n; cin >> n; vect 阅读全文
posted @ 2025-12-28 14:33 V_Melville 阅读(22) 评论(0) 推荐(0)

2025年12月21日

摘要: C. Reindeer and Sleigh 2 记 \(S\) 为乘坐雪橇的驯鹿集合 由题意可知,\(\displaystyle \sum_{i \in S} W_i \leqslant \sum_{i \notin S} P_i\) 不不等式做一下变形: \[\left(\sum_{i \in 阅读全文
posted @ 2025-12-21 15:35 V_Melville 阅读(30) 评论(0) 推荐(0)

2025年12月20日

摘要: T1. 最小公倍数 我们称一个正整数是合法的,当且仅当不存在一个非空子序列的 \(\text{lcm}\) 是这个数。题目要求的就是最小的合法的数。 对于两个集合 \(S,T\),我们有 \(\text{lcm}(S \cup T) = \text{lcm}(\text{lcm}(S), \text 阅读全文
posted @ 2025-12-20 14:38 V_Melville 阅读(16) 评论(0) 推荐(0)

2025年12月17日

摘要: T1. 改写 如果两个数不同,那么一定存在一个 \(b\),使得其中一个数的第 \(b\) 位为 \(1\),另一个数为 \(0\) 。 这意味着,如果 \(\{a_i \vee x\}\) 中有至少两个不同的数,那么一定存在一个 \(b\),使得: \(x\) 的第 \(b\) 位为 \(0\) 阅读全文
posted @ 2025-12-17 16:08 V_Melville 阅读(18) 评论(0) 推荐(0)

2025年12月15日

摘要: C. 2x2 Placing set<pair<int, int>> 代码实现 #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using P = pair<i 阅读全文
posted @ 2025-12-15 11:46 V_Melville 阅读(20) 评论(0) 推荐(0)

2025年12月11日

摘要: C. Domino 维护当前能推倒的右边界 代码实现 #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { int n; cin >> n; 阅读全文
posted @ 2025-12-11 17:29 V_Melville 阅读(13) 评论(0) 推荐(0)

2025年12月3日

摘要: C. Flapping Takahashi 维护当前时刻 \(t\) 可达的高度区间 \([\text{lh}, \text{rh}]\) 。从时刻 \(t_{i-1}\) 到 \(t_i\) 区间扩散为 \([\text{lh}-\Delta t, \text{rh} + \Delta t]\) 阅读全文
posted @ 2025-12-03 23:17 V_Melville 阅读(19) 评论(0) 推荐(0)

2025年11月23日

摘要: 想要抓住幸运,既没有方法,也没有法则,更没有技巧。如果有的话,只有一个。那就是相信自己运气好。 阅读全文
posted @ 2025-11-23 15:59 V_Melville 阅读(38) 评论(0) 推荐(0)

2025年11月16日

摘要: C. Candy Tribulation 不妨先只分配给每个孩子 \(A_i\) 个大糖果,然后通过不断减去 \(Y-X\) 来分配对应的小糖果个数从而得到目标值,那么分配到的大糖果数就是 \(A_i\) 减去小糖果个数即可 不难发现,\(\min(A) \times y\) 就是我们需要的最佳目标 阅读全文
posted @ 2025-11-16 15:12 V_Melville 阅读(158) 评论(1) 推荐(3)

2025年11月9日

摘要: C. Robot Factory 用前 \(k\) 小的头和前 \(k\) 大的身体按递增顺序做匹配 代码实现 #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; 阅读全文
posted @ 2025-11-09 13:19 V_Melville 阅读(92) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 24 下一页