比赛 |
暑假培训七 |
评测结果 |
EEAWWA |
题目名称 |
过河卒 |
最终得分 |
20 |
用户昵称 |
E.M.B.E.R |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2008-07-24 15:04:36 |
显示代码纯文本
program EmberAsh;
const
dis:array[1..8,1..2] of integer=
((-2,1),(-1,2),(1,2),(2,1),(2,-1),(1,-2),(-1,-2),(-2,-1));
var
a,b:array[-2..20,-2..20] of longint;
i,j,m,n,k,x,y:integer;
fin,fout:Text;
BEGIN
assign(fin,'pj024.in');
assign(fout,'pj024.out');
reset(fin);rewrite(fout);
readln(fin,n,m,x,y);
for i:=1 to 8 do
a[x+dis[i,1],y+dis[i,2]]:=-1;
a[x,y]:=-1;
b[0,0]:=1;
for i:=0 to n do
for j:=0 to m do
if a[i,j]=0 then
b[i,j]:=b[i-1,j]+b[i,j]+b[i,j-1];
writeln(fout,b[n,m]);
close(fin);close(fout);
END.