标签:hdu1730 northcott game nim博弈


3 6 4 5 1 2 1 2 3 6 4 5 1 3 1 2
BAD LUCK! I WIN!
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n , m ;
while(~scanf("%d%d",&n,&m))
{
int sg = 0;
for(int i = 0 ; i < n ; ++i)
{
int x , y ;
scanf("%d%d",&x,&y) ;
sg ^= abs(x-y)-1 ;
}
if(sg==0)
puts("BAD LUCK!") ;
else
puts("I WIN!") ;
}
return 0 ;
}hdu 1730 Northcott Game Nim博弈~~
标签:hdu1730 northcott game nim博弈
原文地址:http://blog.csdn.net/lionel_d/article/details/44747925