HDU 1536 & 1944
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1536http://acm.hdu.edu.cn/showproblem.php?pid=1944一样的题题意:先给一个集合,代表可能发生的转移。然后m个询问,可以理解为每次给l堆石子,每堆有hi个,问博弈策略直接...
        
阅读全文
 
            
         
        
            
    HDU 1538
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1538经典经济学问题,海盗分金分析http://www.guokr.com/article/41423/#include #include using namespace std;int a[15];int mai...
        
阅读全文
 
            
         
        
            
    HDU 2177
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2177威佐夫博奕,面对奇异局势既bk=ak+k时是必败点,其中bk>=ak,k=bk-ak别的处理和其他博弈相同,注意题目的数据取一堆的时候数据有问题#include #include #include #incl...
        
阅读全文
 
            
         
        
            
    HDU 2176
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2176nim博弈的模型。要输出先手第一次取的情况,考虑角度是留给对手必败态#include #include using namespace std;int a[200005];int main() { in...
        
阅读全文
 
            
         
        
            
    HDU 1848
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1848利用计算grundy数组,把一类博弈转化为nim博弈,最后x不为0为先手必胜态#include #include #include #include #include using namespace std ...
        
阅读全文
 
            
         
        
            
    HDU 1849 Rabbit and Grass
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1849Nim博弈View Code #include <iostream>using namespace std ;int main(){ int n ; while(scanf("%d",&n),n) { int a ; int ans=0 ; while(n--) { scanf("%d",&a) ; ans^=a ; } if(!ans) ...
        
阅读全文
 
            
         
        
            
    HDU 1847 Good Luck in CET-4 Everybody!
    
            
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1847如果j-A[i]是必败态,j就是必胜态,显然0必败,一个dp的过程#include #include #include using namespace std;int A[15], win[1005];int...
        
阅读全文