摘要: New Dimensions 我们假设枚举 \(a, b\) 那么我们显然可以发现 \(a^2 + b^2 + c^2 - ab - ab - bc\) 中 \(c\) 越大越好 #include <bits/stdc++.h> using namespace std; #define int lo 阅读全文
posted @ 2024-09-25 21:12 libohan0518 阅读(7) 评论(0) 推荐(0) 编辑
摘要: Alternating String 我们可以设状态 \(dp[i][0/1][0/1]\) 表示当前考虑到第几个,长度为奇数还是偶数,有没有用 \(1\) 操作 #include <bits/stdc++.h> using namespace std; const int N = 4e5 + 5, 阅读全文
posted @ 2024-09-25 20:57 libohan0518 阅读(3) 评论(0) 推荐(0) 编辑
摘要: Room Temperature 我们首先可以发现他的初始适宜温度是无关紧要的(因为我们可以让他穿非常多的衣服,然后后续的操作就等于脱衣服),然后我们将数组统一模 \(T\),再排序,假设现在我们考虑第 \(i\) 个人,那么一定可以通过脱衣服,让温度在 \(a[i]\) 至 \(a[i - 1] 阅读全文
posted @ 2024-09-25 12:04 libohan0518 阅读(3) 评论(0) 推荐(0) 编辑