点击打开题目链接
# include
# include
# include
# include
using namespace std;
int sg[2100];
inline int dfs(int x)
{
if(x = 0) return sg[x];
int mex[2100]...
分类:
其他好文 时间:
2015-08-11 10:10:56
阅读次数:
97
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1524 1 #include 2 #include 3 using namespace std; 4 const int M = 10000000;// 5 const int N = 1005; 6 i...
分类:
其他好文 时间:
2015-08-10 21:45:40
阅读次数:
87
ZOJ - 2083 - Win the Game题目传送:Win the Game最近正在慢慢体会博弈里面的SG函数的意义此题是最简单的SG博弈问题,只需打个表就OK了AC代码:#include
#include
#include
#include
#include
#include
#include <stac...
分类:
其他好文 时间:
2015-08-10 14:53:58
阅读次数:
103
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1404 1 #include 2 #include 3 using namespace std; 4 const int MAXN = 1000000; 5 int sg[MAXN]; 6 int get...
分类:
其他好文 时间:
2015-08-10 01:44:43
阅读次数:
184
DescriptionSimon and Garfunkel Corporation (SG Corp.) is a large steel-making company with thousand of customers. Keeping the customer satisfied is on...
分类:
其他好文 时间:
2015-08-09 20:37:06
阅读次数:
118
叶节点SG值至0 非叶节点SG值至于它的所有子节点SG值添加1 XOR和后#include #include #include using namespace std;vector G[100010];int sg[100010];int dfs(int x, int f){ if(sg[x] !....
分类:
其他好文 时间:
2015-08-08 14:55:39
阅读次数:
122
Nim or not Nim?
Description
Nim is a two-player mathematic game of strategy in which players take turns removing objects from distinct heaps. On each turn, a player must remove at least one object, and may remove any number of objects provided they all com...
分类:
其他好文 时间:
2015-08-08 13:39:38
阅读次数:
137
G -贪心Time Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusDescriptionSimon and Garfunkel Corporation (SG Corp.) is a large steel-ma...
分类:
其他好文 时间:
2015-08-07 22:13:17
阅读次数:
108
UVA - 1153Keep the Customer SatisfiedTime Limit:3000MSMemory Limit:Unknown64bit IO Format:%lld & %lluDescriptionSimon and Garfunkel Corporation (SG Co...
分类:
其他好文 时间:
2015-08-06 20:08:06
阅读次数:
578
G -贪心Time Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusDescriptionSimon and Garfunkel Corporation (SG Corp.) is a large steel-ma...
分类:
编程语言 时间:
2015-08-05 17:56:49
阅读次数:
275