摘要:
\(cnt\)的取值种类数不超过\(\sqrt n\)。因此我们可以枚举\(cnt\) 然后贪心选最大的值。 #include <bits/stdc++.h> using namespace std; using i32 = int32_t; using i64 = long long; #defi 阅读全文
posted @ 2024-10-02 18:02
PHarr
阅读(14)
评论(0)
推荐(0)
摘要:
A. (-1,1)-Sumplete 首先只取\(-1\),这样的话选1和不选-1产生的贡献就是都是 +1。 枚举每一行,然后贪心选择需求最大的若干列。 #include <bits/stdc++.h> using namespace std; using i32 = int32_t; using 阅读全文
posted @ 2024-10-02 17:04
PHarr
阅读(1623)
评论(0)
推荐(0)

浙公网安备 33010602011771号