比赛 20121107 评测结果 AWWWW
题目名称 三只小猪 最终得分 20
用户昵称 Truth.Cirno 运行时间 0.002 s
代码语言 C++ 内存使用 2.63 MiB
提交时间 2012-11-07 11:58:53
显示代码纯文本
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

string ans[51][51]={
{"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","0"},
{"0","1","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","1","1","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","1","3","1","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","1","7","6","1","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","1","15","25","10","1","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","1","31","90","65","15","1","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","1","63","301","350","140","21","1","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","1","127","966","1701","1050","266","28","1","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","1","255","3025","7770","6951","2646","462","36","1","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","1","511","9330","34105","42525","22827","5880","750","45","1","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","1","1023","28501","145750","246730","179487","63987","11880","1155","55","1","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","1","2047","86526","611501","1379400","1323652","627396","159027","22275","1705","66","1","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","1","4095","261625","2532530","7508501","9321312","5715424","1899612","359502","39325","2431","78","1","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","1","8191","788970","10391745","40075035","63436373","49329280","20912320","5135130","752752","66066","3367","91","1","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","16383","2375101","42355950","210766920","420693273","408741333","216627840","67128490","12662650","1479478","106470","4550","105","1","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","32767","7141686","171798901","1096190550","2734926558","3281882604","2141764053","820784250","193754990","28936908","2757118","165620","6020","120","1","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","65535","21457825","694337290","5652751651","17505749898","25708104786","20415995028","9528822303","2758334150","512060978","62022324","4910178","249900","7820","136","1","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","131071","64439010","2798806985","28958095545","110687251039","197462483400","189036065010","106175395755","37112163803","8391004908","1256328866","125854638","8408778","367200","9996","153","1","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","262143","193448101","11259666950","147589284710","693081601779","1492924634839","1709751003480","1144614626805","477297033785","129413217791","23466951300","2892439160","243577530","13916778","527136","12597","171","1","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","524287","580606446","45232115901","749206090500","4306078895384","11143554045652","15170932662679","12011282644725","5917584964655","1900842429486","411016633391","61068660380","6302524580","452329200","22350954","741285","15675","190","1","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 main(void)
{
	freopen("piggy.in","r",stdin);
	freopen("piggy.out","w",stdout);
	int times,T,n,m;
	cin>>T;
	for (times=1;times<=T;times++)
	{
		cin>>n>>m;
		cout<<ans[n][m]<<endl;
	}
	return(0);
}