UVA 10165 - Stone Game
题目链接
题意:给定n堆石子,每次能在一堆取1到多个,取到最后一个赢,问谁赢
思路:就裸的的Nim游戏,利用定理求解
代码:
#include
#include
int n, num;
int main() {
while (~scanf("%d", &n) && n) {
int sum = 0;
...
分类:
其他好文 时间:
2014-07-18 22:17:20
阅读次数:
342
There are proven psychological principles to user interfaces that work.Whether you have a team of design experts or are just building with programmer art, you can use these principles to make your gam...
分类:
其他好文 时间:
2014-07-16 16:33:00
阅读次数:
243
Frogger
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 24879
Accepted: 8076
Description
Freddy Frog is sitting on a stone in the middle of a lake. Sudde...
分类:
其他好文 时间:
2014-07-16 13:48:50
阅读次数:
486
Frogger
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 24618
Accepted: 7992
Description
Freddy Frog is sitting on a stone in the middle of a lake. Sudde...
分类:
其他好文 时间:
2014-07-10 20:13:26
阅读次数:
271
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
实变函数论(Pei-Yuan Wu)期中考试题目。影音文件序号为ra992_110510。第一题关于Metric space;二三题关于算子是否有界(微分算子是无界的,积分算子是有界的,因此我们常用积分算子而不用微分算子);第四题关于Stone-Weierstrass定理以及连续函数在L2里面是de...
分类:
其他好文 时间:
2014-06-27 16:32:07
阅读次数:
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
Given a linked list, remove the nth node from the end of list and return its head.
For example,
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the...
分类:
其他好文 时间:
2014-06-22 20:02:46
阅读次数:
182
Description
The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) i...
分类:
其他好文 时间:
2014-06-22 17:15:11
阅读次数:
275