Natsuzora
Natsuzora
全部文章
分类
题解(4)
归档
标签
去牛客网
登录
/
注册
Natsuzora的博客
全部文章
(共4篇)
题解 | #异或#
记录线性基每一个基是由偶数个元素异或组成还是奇数个元素异或组成即可。令 ans[0/1] 表示偶数或奇数时的答案,跑一遍 DP。若当前枚举到的基由偶数个元素组成,则 ans[0] 从 ans[0] 转移,ans[1] 同理;若当前枚举到的基由奇数个元素组成,则 ans[0] 从 ans[1] 转移,...
C++
线性基
2022-04-15
7
355
题解 | #如何计算一个很大的次幂这个方法我们已经有所了解#
题解 | #如何计算一个很大的次幂这个方法我们已经有所了解# 对于爆int的数据直接输出 2.718。字符串比大小即可。 #include <iostream> #include <cmath> #include <string> using namespace ...
2022-04-01
2
524
题解 | #小沙的hello world!#
题解 | #小沙的hello world!# 需要一点点灵性。把第二个样例直接存到代码里再操作。顺便开了颗字典树。 #include <cstdio> #include <cstring> using namespace std; const int N = 5e6 + 1;...
字符串
字典树
2022-04-01
3
367
题解 | #小红的简谱标记#
5.5就很灵性(对于没学过音乐的人来说hh) #include <cstdio> using namespace std; int main(){ puts("7"); puts("5"); puts("3"); puts("5"); puts...
音乐
2022-04-01
3
295