HDU3032 Nim or not Nim 解题报告:思路与证明 胡明晓 Description Alice and Bob is tired of playing Nim under the standard rule, so they make a difference by also all ...
                            
                            
                                分类:
其他好文   时间:
2017-07-22 22:20:26   
                                阅读次数:
169
                             
                    
                        
                            
                            
                                Nim or not Nim?
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1710    Accepted Submission(s): 845
Problem Description
Nim is a two-...
                            
                            
                                分类:
其他好文   时间:
2016-08-05 06:39:59   
                                阅读次数:
141
                             
                    
                        
                            
                            
                                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
                             
                    
                        
                            
                            
                                Problem 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 come from t...
                            
                            
                                分类:
其他好文   时间:
2015-02-28 21:42:57   
                                阅读次数:
266
                             
                    
                        
                            
                            
                                题目大意:可以从某一堆中取任意个数,也可把一堆分成两个不为0的堆,直到某一方无法操作为输因为是nim博弈,所以只要考虑一堆时候的sg值,把所有堆的sg值异或即可很显然这里 0 是一个终止态 sg[0]=0;sg[1]=1 ;2 的时候可分为 0 , 1 , (1,1) 3种情况,sg值分别为 0,1...
                            
                            
                                分类:
其他好文   时间:
2015-01-28 17:30:56   
                                阅读次数:
156
                             
                    
                        
                            
                            
                                题意:n堆石子,每次可以从某堆中拿走若干,也可以把此堆分成两个非空堆,谁无法操作了谁输。
题解:首先我们可以打个SG函数来暴力出解,但是显然这会T。
但是不要害怕,我们打完以后发现了一个貌似对的规律:
对于所有的k >= 0,有 sg( 4k+1 ) = 4k+1; sg(
 4k+2 ) = 4k+2; sg( 4k+3 ) = 4k+4; sg( 4k+4 ) = 4k+3。...
                            
                            
                                分类:
其他好文   时间:
2015-01-13 09:03:56   
                                阅读次数:
199
                             
                    
                        
                            
                            
                                ,请谅解~
Nim or not Nim?
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 960    Accepted Submission(s): 466
Problem Description
...
                            
                            
                                分类:
其他好文   时间:
2014-07-06 11:15:10   
                                阅读次数:
196
                             
                    
                        
                            
                            
                                Nim or not Nim?Time Limit: 2000/1000 MS 
(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 
858Accepted Submission(s): 412Probl...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 03:13:54   
                                阅读次数:
294