Problem Description:
Let's design a new chess game. There are N positions to hold M chesses in this game. Multiple chesses can be located in the same position. The positions are constituted as a topo...
分类:
其他好文 时间:
2015-04-09 19:53:07
阅读次数:
116
题意:
跟经典的nim除了胜利条件不一样(nim当游戏者面对空的决策集判负,anti-SG当游戏者面对空的决策集判负),其他都一样。
分析:
设全局状态为s,单个游戏为t。先手必胜条件:(g(s)!=0&&Existg(t)>1)||(g(s)==0&&Anyg(t)
代码:
//poj 3480
//sep9
#include
using namespace std;
int ma...
分类:
其他好文 时间:
2015-04-09 19:51:38
阅读次数:
213
Problem Description:
Aekdycoin and abcdxyzk are playing a game. They get a circle chain with some beads. Initially none of the beads is painted. They take turns to paint the chain. In Each turn one p...
分类:
其他好文 时间:
2015-04-08 18:14:42
阅读次数:
175
Description 小春现在很清闲,面对书桌上的N张牌,他决定给每张染色,目前小春只有3种颜色:红色,蓝色,绿色.他询问Sun有多少种染色方案,Sun很快就给出了答案.进一步,小春要求染出Sr张红色,Sb张蓝色,Sg张绝色.他又询问有多少种方案,Sun想了一下,又给出了正确答案. 最后小春发明....
分类:
其他好文 时间:
2015-04-08 14:37:52
阅读次数:
127
题目链接:点击打开链接
题意:
n个操作
1 val 在集合中插入val
2 查询当前集合 通过任意数求和不能得到的最小正整数
思路:
空集合时ans=1
且插入数字后ans只能增加,所以维护这个ans
ans是 a1+a2+a3···+ai
所以ans是最小的前缀和+1且
用multiset记录ai+1 ··an
插入的数
...
分类:
其他好文 时间:
2015-04-05 20:33:17
阅读次数:
306
SG Value
Time Limit: 5 Sec Memory Limit:
256 MB
Submit: 163 Solved: 45
[Submit][Status][Web
Board]
Description
The SG value of a set (multiset) is the minimum positive integer that could no...
分类:
其他好文 时间:
2015-04-05 09:09:01
阅读次数:
119
开启logging (例子F:\wamp\www\git_repos\GitHub\GeneralUtility\superglue-master\examples\src\logging.cpp)#include "sg/option/instr_trace.hpp"定义optionstruct ...
分类:
其他好文 时间:
2015-04-03 15:00:31
阅读次数:
148
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1729题意:2个玩家,有N个箱子,每个箱子的大小是Si,游戏开始前,就有一些石子在这些箱子里了。游戏者轮流选择箱子,然后把石子放入箱子里。并且放入的石子数量不能大于原来箱子里就有的石子的数量的平方。比如说...
分类:
其他好文 时间:
2015-04-02 22:10:39
阅读次数:
150
Urej loves to play various types of dull games. He usually asks other people to play with him. He says that playing those games can show his extraordinary wit. Recently Urej takes a great interest in a new game, and Erif Nezorf becomes the victim. To get a...
分类:
其他好文 时间:
2015-04-02 09:08:58
阅读次数:
269
1554: SG ValueTime Limit:5 SecMemory Limit:256 MBSubmit:140Solved:35DescriptionThe SG value of a set (multiset) is the minimum positive integer that c...
分类:
其他好文 时间:
2015-04-01 23:14:14
阅读次数:
107