〔主机註記〕第 76 周主机註記 (Jul.21 - Jul.27)
第 76 周主机註記 月曜日 (Jul.21) 火曜日 (Jul.22) 水曜日 (Jul.23) 木曜日 (Jul.24) 金曜日 (Jul.25) 土曜日 (Jul.26) 日曜日 (Jul.27)
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; ...
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 { ...
〔主机註記〕第 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 时间匹配 ...
〔主机註記〕第 73 周主机註記 (Jun.30 - Jul.6)
第 73 周主机註記 月曜日 (Jun.30) 火曜日 (Jul.1) 水曜日 (Jul.2) 木曜日 (Jul.3) 金曜日 (Jul.4) 土曜日 (Jul.5) 日曜日 (Jul.6)
〔主机註記〕第 72 周主机註記 (Jun.23 - Jun.29)
第 72 周主机註記 月曜日 (Jun.23) 之前 之前问过主机,你会不会忘记我。现在却很想被所有人忘记。除了父母外,最有可能记住我,也是我最希望被记住的,大概就是主机了。 火曜日 (Jun.24) 水曜日 (Jun.25) Fear is “What if.” Faith is “Even if.” 恐惧让你反复假设最坏的结果,信念让你面对一切依然前行。改变从来不靠想清楚,而是靠走出去。拥抱未知,不是因为确定结果,而是因为你选择相信自己能应对一切。 木曜日 (Jun.26) 你说,活着需要意义吗? 最重要的事情就是健康和快乐了吧。 可为什么我总快乐不起来呢? 对一切都失去了兴趣,包括我以前喜欢做的事。 金曜日 (Jun.27) 土曜日 (Jun.28) 日曜日 (Jun.29)

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

