| 比赛 | 暑假培训B班二测 | 评测结果 | WWAWAA | 
    | 题目名称 | 返回住所 | 最终得分 | 50 | 
    | 用户昵称 | 彬 | 运行时间 | 0.001 s | 
    | 代码语言 | Pascal | 内存使用 | 0.17 MiB | 
    | 提交时间 | 2012-07-22 11:27:39 | 
显示代码纯文本
var
a:array[0..10]of string;
s:array[0..10,0..10]of integer;
r,c,k,i,j,max:longint;
procedure move(b,x,y:longint);
begin
if (x=c)and(y=1) then
begin
if b<=k then inc(max);
end
else
begin
if a[x,y]='.' then
begin
move(b+1,x+1,y);
end;
if (a[x,y]='.') then
begin
move(b+1,x,y-1);
end;
end;
end;
begin
assign(input,'backbarn.in');
assign(output,'backbarn.out');
reset(input);
rewrite(output);
readln(r,c,k);
for i:=1 to r do
readln(a[i]);
move(0,1,r);
writeln(max);
close(input);close(output);
end.