记录编号 137507 评测结果 AAAAAAAAAA
题目名称 跳马问题 最终得分 100
用户昵称 Gravatarkamisama 是否通过 通过
代码语言 Pascal 运行时间 0.000 s
提交时间 2014-11-04 20:51:31 内存使用 0.16 MiB
显示代码纯文本
var
  i,j:longint;
  f:array[1..20,1..20] of longint;
begin
f[1,3]:=1;
f[1,5]:=1;
f[2,3]:=1;
f[2,4]:=1;
f[2,5]:=1;
f[2,7]:=1;
f[2,8]:=1;
f[2,9]:=1;
f[2,11]:=1;
f[2,12]:=1;
f[2,13]:=1;
f[2,15]:=1;
f[2,16]:=1;
f[2,17]:=1;
f[2,19]:=1;
f[2,20]:=1;
f[3,2]:=1;
f[3,4]:=1;
f[3,5]:=1;
f[3,6]:=3;
f[3,7]:=3;
f[3,8]:=5;
f[3,9]:=7;
f[3,10]:=13;
f[3,11]:=19;
f[3,12]:=29;
f[3,13]:=43;
f[3,14]:=69;
f[3,15]:=107;
f[3,16]:=165;
f[3,17]:=251;
f[3,18]:=389;
f[3,19]:=603;
f[3,20]:=933;
f[4,4]:=2;
f[4,5]:=1;
f[4,6]:=4;
f[4,7]:=3;
f[4,8]:=12;
f[4,9]:=16;
f[4,10]:=40;
f[4,11]:=56;
f[4,12]:=122;
f[4,13]:=197;
f[4,14]:=408;
f[4,15]:=695;
f[4,16]:=1352;
f[4,17]:=2368;
f[4,18]:=4512;
f[4,19]:=8096;
f[4,20]:=15202;
f[5,3]:=1;
f[5,5]:=2;
f[5,6]:=3;
f[5,7]:=10;
f[5,8]:=15;
f[5,9]:=37;
f[5,10]:=65;
f[5,11]:=150;
f[5,12]:=291;
f[5,13]:=634;
f[5,14]:=1258;
f[5,15]:=2654;
f[5,16]:=5375;
f[5,17]:=11235;
f[5,18]:=22984;
f[5,19]:=47701;
f[5,20]:=97937;
f[6,5]:=3;
f[6,6]:=2;
f[6,7]:=10;
f[6,8]:=12;
f[6,9]:=46;
f[6,10]:=74;
f[6,11]:=211;
f[6,12]:=388;
f[6,13]:=980;
f[6,14]:=1954;
f[6,15]:=4655;
f[6,16]:=9732;
f[6,17]:=22391;
f[6,18]:=47928;
f[6,19]:=108183;
f[6,20]:=234796;
f[7,4]:=1;
f[7,6]:=3;
f[7,7]:=6;
f[7,8]:=20;
f[7,9]:=38;
f[7,10]:=100;
f[7,11]:=212;
f[7,12]:=530;
f[7,13]:=1175;
f[7,14]:=2821;
f[7,15]:=6377;
f[7,16]:=15020;
f[7,17]:=34318;
f[7,18]:=80133;
f[7,19]:=184249;
f[7,20]:=428347;
f[8,6]:=4;
f[8,7]:=3;
f[8,8]:=18;
f[8,9]:=26;
f[8,10]:=104;
f[8,11]:=191;
f[8,12]:=578;
f[8,13]:=1187;
f[8,14]:=3216;
f[8,15]:=7082;
f[8,16]:=18114;
f[8,17]:=41380;
f[8,18]:=102592;
f[8,19]:=239156;
f[8,20]:=583068;
f[9,5]:=1;
f[9,7]:=4;
f[9,8]:=10;
f[9,9]:=33;
f[9,10]:=75;
f[9,11]:=203;
f[9,12]:=491;
f[9,13]:=1270;
f[9,14]:=3100;
f[9,15]:=7781;
f[9,16]:=19007;
f[9,17]:=47101;
f[9,18]:=115212;
f[9,19]:=283827;
f[9,20]:=694622;
f[10,7]:=5;
f[10,8]:=4;
f[10,9]:=28;
f[10,10]:=46;
f[10,11]:=192;
f[10,12]:=388;
f[10,13]:=1226;
f[10,14]:=2728;
f[10,15]:=7713;
f[10,16]:=18124;
f[10,17]:=48365;
f[10,18]:=116806;
f[10,19]:=302132;
f[10,20]:=740368;
f[11,6]:=1;
f[11,8]:=5;
f[11,9]:=15;
f[11,10]:=49;
f[11,11]:=129;
f[11,12]:=357;
f[11,13]:=959;
f[11,14]:=2548;
f[11,15]:=6702;
f[11,16]:=17367;
f[11,17]:=44967;
f[11,18]:=115284;
f[11,19]:=295795;
f[11,20]:=754121;
f[12,8]:=6;
f[12,9]:=5;
f[12,10]:=40;
f[12,11]:=73;
f[12,12]:=316;
f[12,13]:=693;
f[12,14]:=2268;
f[12,15]:=5399;
f[12,16]:=15782;
f[12,17]:=39124;
f[12,18]:=107784;
f[12,19]:=271985;
f[12,20]:=725546;
f[13,7]:=1;
f[13,9]:=6;
f[13,10]:=21;
f[13,11]:=68;
f[13,12]:=203;
f[13,13]:=574;
f[13,14]:=1683;
f[13,15]:=4590;
f[13,16]:=12848;
f[13,17]:=34278;
f[13,18]:=93119;
f[13,19]:=245825;
f[13,20]:=655697;
f[14,9]:=7;
f[14,10]:=6;
f[14,11]:=54;
f[14,12]:=108;
f[14,13]:=482;
f[14,14]:=1138;
f[14,15]:=3838;
f[14,16]:=9708;
f[14,17]:=29204;
f[14,18]:=75940;
f[14,19]:=215028;
f[14,20]:=563996;
f[15,8]:=1;
f[15,10]:=7;
f[15,11]:=28;
f[15,12]:=90;
f[15,13]:=300;
f[15,14]:=867;
f[15,15]:=2740;
f[15,16]:=7674;
f[15,17]:=22662;
f[15,18]:=62213;
f[15,19]:=176178;
f[15,20]:=478155;
f[16,10]:=8;
f[16,11]:=7;
f[16,12]:=70;
f[16,13]:=152;
f[16,14]:=696;
f[16,15]:=1759;
f[16,16]:=6092;
f[16,17]:=16294;
f[16,18]:=50304;
f[16,19]:=136679;
f[16,20]:=396844;
f[17,9]:=1;
f[17,11]:=8;
f[17,12]:=36;
f[17,13]:=115;
f[17,14]:=423;
f[17,15]:=1250;
f[17,16]:=4217;
f[17,17]:=12135;
f[17,18]:=37561;
f[17,19]:=106086;
f[17,20]:=311716;
f[18,11]:=9;
f[18,12]:=8;
f[18,13]:=88;
f[18,14]:=206;
f[18,15]:=964;
f[18,16]:=2596;
f[18,17]:=9209;
f[18,18]:=25942;
f[18,19]:=82042;
f[18,20]:=232208;
f[19,10]:=1;
f[19,12]:=9;
f[19,13]:=45;
f[19,14]:=143;
f[19,15]:=575;
f[19,16]:=1738;
f[19,17]:=6211;
f[19,18]:=18370;
f[19,19]:=59292;
f[19,20]:=172263;
f[20,12]:=10;
f[20,13]:=9;
f[20,14]:=108;
f[20,15]:=271;
f[20,16]:=1292;
f[20,17]:=3693;
f[20,18]:=13392;
f[20,19]:=39598;
f[20,20]:=128110;

assign(input,'horse.in');
assign(output,'horse.out');
reset(input);rewrite(output);
read(i,j);
writeln(f[i,j]);
close(input);close(output);
end.