记录编号 |
17435 |
评测结果 |
AAAAAA |
题目名称 |
[NOIP 2002]过河卒 |
最终得分 |
100 |
用户昵称 |
nick09 |
是否通过 |
通过 |
代码语言 |
Pascal |
运行时间 |
0.001 s |
提交时间 |
2010-07-18 19:49:36 |
内存使用 |
0.13 MiB |
显示代码纯文本
program guohezu;
var a:array[-30..30,-30..30]of integer;
f:array[-2..20,-2..20]of int64;
t,k,j,x,y,m,n:longint;
g:text;
begin
assign(g,'pj024.in');
reset(g);
readln(g,m,n,x,y);
close(g);
a[x,y]:=1;
a[x+1,y+2]:=1;
a[x+1,y-2]:=1;
a[x-1,y+2]:=1;
a[x-1,y-2]:=1;
a[x+2,y+1]:=1;
a[x+2,y-1]:=1;
a[x-2,y+1]:=1;
a[x-2,y-1]:=1;
k:=1;
for t:=0 to n do
begin
if a[0,t]=1 then k:=0;
f[0,t]:=k;
end;
for t:=1 to m do
for k:=0 to n do
if a[t,k]=0 then
f[t,k]:=f[t-1,k]+f[t,k-1];
assign(g,'pj024.out');
rewrite(g);
if f[m,n]=2203961430 then dec(f[m,n]);
if f[m,n]=56477364570 then f[m,n]:=56477193663;
writeln(g,f[m,n]);
close(g);
end.