记录编号 401078 评测结果 AAAAAAAAAA
题目名称 [UVa 861]小象 最终得分 100
用户昵称 GravatarFoolMike 是否通过 通过
代码语言 C++ 运行时间 0.448 s
提交时间 2017-05-01 12:05:43 内存使用 0.29 MiB
显示代码纯文本
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N=1e6+10;
ll ans[9][65]={
{},
{1,1},
{1,4,4,0,0},
{1,9,26,26,8,0,0,0,0,0},
{1,16,92,232,260,112,16,0,0,0,0,0,0,0,0,0,0},
{1,25,240,1124,2728,3368,1960,440,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,36,520,3896,16428,39680,53744,38368,12944,1600,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,49,994,10894,70792,282248,692320,1022320,867328,389312,81184,5792,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{1,64,1736,26192,242856,1444928,5599888,14082528,22522960,22057472,12448832,3672448,489536,20224,256,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
int n,m;
int main()
{
	freopen("bishops.in","r",stdin);
	freopen("bishops.out","w",stdout);
	while (1){
		scanf("%d%d",&n,&m);
		if (!n&&!m) break;
		printf("%lld\n",ans[n][m]);
	}
	return 0;
}