
我的模版
primo_001
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c++大数模版
从一位大神代码里摘的好东西。 可直接cin,cout,还有强制类型转换 #include #include using namespace std; const int MAXD = 500, DIG = 9, BASE = 1000000000; const unsigned long long BOUND = numeric_limits :: max () -原创 2013-09-29 23:34:22 · 748 阅读 · 0 评论 -
SG函数模板
首先定义mex(minimal excludant)运算,这是施加于一个集合的运算,表示最小的不属于这个集合的非负整数。例如mex{0,1,2,4}=3、mex{2,3,5}=0、mex{}=0。 对于一个给定的有向无环图,定义关于图的每个顶点的Sprague-Grundy函数g如下:g(x)=mex{ g(y) | y是x的后继 },这里的g(x)即sg[x] 例如:取石子问题,有1堆n转载 2013-10-28 22:19:44 · 1978 阅读 · 0 评论