周康禧
周康禧
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
周康禧的博客
全部文章
(共8篇)
题解 | #小美走公路#
#include <bits/stdc++.h> using ll =long long int; using namespace std; int main() { int n; cin >> n; vector<ll> a(2 * n...
2024-11-23
2
33
题解 | #【模板】线段树1#
#include <bits/stdc++.h> const int N = 5e5 + 10; const int inf = 0x3f3f3f3f; using namespace std; using ull = unsigned long long int; using ll =...
2024-11-23
2
50
题解 | #压缩二维码#
#include <bits/stdc++.h> #include <vector> const int N = 2e5 + 10; const int inf = 0x3f3f3f3f; using namespace std; using ull = unsigned l...
2024-11-22
4
45
题解 | #小欧安排座位#
#include <bits/stdc++.h> #include <functional> const int N = 2e5 + 10; const int inf = 0x3f3f3f3f; using namespace std; using ull = unsign...
2024-11-22
4
49
题解 | #游游的字母翻倍#
#include <bits/stdc++.h> const int N = 2e5 + 10; const int inf = 0x3f3f3f3f; using namespace std; using ull = unsigned long long int; using ll =...
2024-11-22
1
42
题解 | #游游的除2操作#
考虑所有数的二进制的最长公共前缀的长度,对于每一个数的贡献就是这个数的二进制位的长度减去最长公共前缀的长度 #include <iostream> #include <vector> using namespace std; int main() { int n; ...
2024-11-19
10
48
题解 | #小美的因子查询#
#include <iostream> using namespace std; int main() { int _; cin>>_; while(_--){ int x; cin>>x; ...
2024-11-19
2
28
题解 | #小红的葫芦#
内测的时候感觉E比D稍微简单一点 这个D出的挺好的 D 萌萌的好数 这题因为n的范围是1e12,直接暴力会超时,所以需要优化复杂度 二分一下 再容斥一下 有一点数学 判断这个数是第几个好数就把不是好数的数去掉,就是减去 [能被3整除的数的个数]——>x/3 再加上 [个位是3的个数]——>...
2024-06-16
6
357