随笔分类 - C相关
摘要:随机树种一个程序只需要定义一个, 不能够将随机树种定义到while里,否则每次都是随机的相同的数。
阅读全文
摘要:如这一段:a[i%4]=(a[(i-1)%4]*7ll+a[(i-2)%4]*10ll+a[(i-3)%4]*6ll)%998244353; 7ll,10ll,6ll是在计算时,将等式右边的类型转换为long long型的,最后赋值在int型上边。
阅读全文
摘要:写到一题查找数据范围为10^9的,此时用map也显得太慢了,于是上网找到一个比#include<map>更快的#include<tr1/unordered_map>
阅读全文
摘要:首先是要加头文件 #include<algorithm> sort(begin,end,排序方法(可选)); 有三个参数,但是第三个参数默认为升序。 1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 int mai
阅读全文

浙公网安备 33010602011771号