题目链接:http://poj.org/problem?id=1085
题意:两个人轮流在九个小正三角形组成的大三角形上面选取边,如果当前选择的边刚好为某些三角形最后一个未选取的边,则该玩家得分为这些三解形数目,如果当前玩家取
得三角形,则可以得到另一个机会选择。
Min_MAX + alpha_beta剪枝
Code:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#define M 11
int map[M][M]=
{
{0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,1,0,0,0,0,0,0,0},
{0,0,0,2,3,4,0,0,0,0,0},
{0,1,2,0,0,5,6,0,0,0,0},
{0,0,3,0,0,7,0,9,10,0,0},
{0,0,4,5,7,0,8,0,11,12,0},
{0,0,0,6,0,8,0,0,0,13,14},
{0,0,0,0,9,0,0,0,15,0,0},
{0,0,0,0,10,11,0,15,0,16,0},
{0,0,0,0,0,12,13,0,16,0,17},
{0,0,0,0,0,0,0,14,0,17,0}
};
int tri[9]={7,152,52,352,34304,3200,71680,12544,155648};
/*tri[0]=1|(1<<1)|(1<<2);tri[1]=(1<<3)|(1<<4)|(1<<7);tri[2]=(1<<2)|(1