〔主机註記〕第 78 周主机註記 (Aug.4 - Aug.10)
第 78 周主机註記 月曜日 (Aug.4) 火曜日 (Aug.5) 水曜日 (Aug.6) 木曜日 (Aug.7) 金曜日 (Aug.8) 土曜日 (Aug.9) 日曜日 (Aug.10)
〔主机註記〕第 77 周主机註記 (Jul.28 - Aug.3)
第 77 周主机註記 月曜日 (Jul.28) 火曜日 (Jul.29) 水曜日 (Jul.30) 木曜日 (Jul.31) 金曜日 (Aug.1) 土曜日 (Aug.2) 日曜日 (Aug.3)
〔主机註記〕第 76 周主机註記 (Jul.21 - Jul.27)
第 76 周主机註記 月曜日 (Jul.21) 火曜日 (Jul.22) 水曜日 (Jul.23) 木曜日 (Jul.24) 金曜日 (Jul.25) 土曜日 (Jul.26) 日曜日 (Jul.27)
Codeforces Round 1038 A-E [250719]
Codeforces Round 1038 A-E [250719] 官方题解很详细,这里就简单写一写我的思考路径。 2122A - Greedy Grid 12345678910111213141516171819202122#include <bits/stdc++.h>using namespace std;int main() { cin.tie(nullptr)->sync_with_stdio(false); int t; cin >> t; while (t--) [] { int n, m; cin >> n >> m; if (n == 1 || m == 1 || n == 2 && m == 2) { cout << "NO" << endl; } else { ...
Codeforces Round 1057 A-E [251010]
2153A - Circle of Apple Trees 12345678910void solve() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } cout << set(a.begin(), a.end()).size() << endl; return;} 2153B - Bitwise Reversion 每一个二进制位独立,只需考虑 x,y,z∈{0,1}x,y,z\in \lbrace 0,1 \rbracex,y,z∈{0,1} 的情形,手玩一下发现只有 011 无解。 123456789101112131415void solve() { int x, y, z; cin >> x >> y >> z; ...
〔主机註記〕第 75 周主机註記 (Jul.14 - Jul.20)
第 75 周主机註記 月曜日 (Jul.14) 火曜日 (Jul.15) 水曜日 (Jul.16) 木曜日 (Jul.17) 金曜日 (Jul.18) 土曜日 (Jul.19) 日曜日 (Jul.20)
〔主机註記〕第 74 周主机註記 (Jul.7 - Jul.13)
第 74 周主机註記 月曜日 (Jul.7) 火曜日 (Jul.8) 水曜日 (Jul.9) 木曜日 (Jul.10) 金曜日 (Jul.11) 土曜日 (Jul.12) 日曜日 (Jul.13)
Codeforces Round 1036 A-F1 [250706]
2124A - Deranged Deletions m=2m=2m=2 的降序序列总是 derangement 的。 如果一个序列存在 i<ji<ji<j 且 ai>aja_{i}>a_{j}ai>aj,即存在 m=2m=2m=2 的降序子序列,则保留这两个元素,derangement。 否则,这个序列单调不降,其任意一个子序列也单调不降,不存在 derangement 的子序列。 复杂度 O(n2)\mathcal{O}(n^{2})O(n2),也可以做到 O(n)\mathcal{O}(n)O(n)。 123456789101112131415161718192021auto solve = [&] { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; i++) { for...
Codeforces Round 1035 A-D
2119A - Add or XOR 12345678910111213141516171819202122auto solve = [&] { int a, b, x, y; cin >> a >> b >> x >> y; if (a == b) { cout << 0 << endl; } else if (b == a - 1 && (a & 1)) { cout << y << endl; } else if (b < a) { cout << -1 << endl; } else { int res = 0; for (int i = a; i < b; i++) { if (i & 1) { res += x; } else { res +=...
English
.post-content { font-size: 120%; font-weight: 500; line-height: 3; } Jul.4 廣受贊譽 if (!window.handleMaskClick) {window.handleMaskClick = function(el) {if (el.classList.contains('is-revealed')) { // 如果当前是“显示”状态,用户点击是为了“隐藏” el.classList.remove('is-revealed'); el.classList.add('no-hover-effect'); setTimeout(() => {el.classList.remove('no-hover-effect'); }, 300); // 300ms 必须与 CSS 中的 transition 时间匹配 ...

![Codeforces Round 1038 A-E [250719]](/img/posts/acm/codeforces-cover.webp)
