Nim or not Nim? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1056 Accepted Submission(s): 523 Problem Description Nim is a two-player mathematic game of strategy in which players take turn…
Calendar Game Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2766 Accepted Submission(s): 1594 Problem Description Adam and Eve enter this year’s ACM International Collegiate Programming Con…
S-Nim Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4770 Accepted Submission(s): 2058 Problem Description Arthur and his sister Caroll have been playing a game called Nim for some time now.…
A Multiplication Game Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3832 Accepted Submission(s): 2183 Problem Description Stan and Ollie play the game of multiplication by multiplying an in…
A Simple Nim Problem Description Two players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn they can pick any number of candies which come from the same heap(picking no candy is not allowed)…
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10069 Accepted Submission(s): 4289 Problem Description 任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的:F(1)=1;F(2)=2;F(n)=F(n-1)+F(n-2)(n>=3);…
提议分析: 1 <= N <= 4747 很明显应该不会有规律的,打表发现真没有 按题意应该分成两种情况考虑,然后求其异或(SG函数性质) (1)找出单独的一个(一列中只有一个) (2)找出连续的两个都没有涂色的求SG值(打表) #include<stdio.h> #include<string.h> #define Max 4750 int dp[Max]; int mex[Max]; int flag[Max]; void Gsdp() { int i,j; int…