UVA 1482 - Playing With Stones
题目链接
题意:给定n堆石头,每次选一堆取至少一个,不超过一半的石子,最后不能取的输,问是否先手必胜
思路:数值很大,无法直接递推sg函数,打出前30项的sg函数找规律
代码:
#include
#include
int t, n;
long long num;
long long SG(long ...
分类:
其他好文 时间:
2014-07-16 14:47:36
阅读次数:
206
3882 - And Then There Was One
Time limit: 3.000 seconds
Let's play a stone removing game.
Initially, n stones are arranged on a circle and numbered
1,..., n clockwise (Figure 1). You are also...
分类:
其他好文 时间:
2014-07-09 10:00:13
阅读次数:
172
题目描述There are a bunch of stones on the beach; Stone color is white or black. Little Sheep has a magic brush, she can change the color of a continuous ...
分类:
其他好文 时间:
2014-06-22 23:46:15
阅读次数:
199
Soma is a fashionable girl. She absolutely loves
shiny stones that she can put on as jewellery accessories. She has been
collecting stones since her c...
分类:
其他好文 时间:
2014-06-05 19:23:48
阅读次数:
310
Kuriyama Mirai has killed many monsters and got many (namely n) stones. She numbers the stones from 1 to n.
The cost of the i-th stone is vi.
Kuriyama Mirai wants to know something about these sto...
分类:
其他好文 时间:
2014-05-25 07:24:48
阅读次数:
315
Soma is a fashionable girl. She absolutely loves shiny stones that she can put on as jewellery accessories. She has been collecting stones since her childhood - now she has become really good with ide...
分类:
其他好文 时间:
2014-05-07 07:38:20
阅读次数:
415