ac不瓦
ac不瓦
全部文章
分类
题解(2)
归档
标签
去牛客网
登录
/
注册
ac不瓦的博客
全部文章
(共4篇)
题解 | #小q的数列#
其实此题的难点不在于计算f(n)所代表的值 难点在于计算最早第几项出现的 而我们打表发现一下规律 第几项与其二进制中1的数量有关系 具体数值为2^x-1而x也与f(n)的值相等 所以代码如下 #include <bits/stdc++.h> using namespace std; ...
2026-02-21
0
8
题解 | 01序列
#include <bits/stdc++.h> #include <cstring> #include <vector> using namespace std; int main() { int m; cin>>m; ...
2026-02-21
0
9
题解 | 圣
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin>>n; int fir; cin>>fir; int ans=fir; ...
2025-12-23
0
22
牛客周赛122.D
那么这一题中出现了一个mex的概念 当然不是第一次出现了 但是还是做一下解释 MEX:对于任意非负整数集合 S(非负整数即 0,1,2,3,...),MEX(S)表示:不在集合 S中的最小非负整数。 那么作为补充知识点 下面带来在集合S中求解mex的普通做法 那么回到此题当中 我们来分析一下 给我...
C++
2025-12-17
2
50