记录编号 |
22055 |
评测结果 |
WAAAWWWWWW |
题目名称 |
打砖块 |
最终得分 |
30 |
用户昵称 |
itachi |
是否通过 |
未通过 |
代码语言 |
Pascal |
运行时间 |
0.569 s |
提交时间 |
2010-11-16 20:07:37 |
内存使用 |
0.65 MiB |
显示代码纯文本
program t2(input,output);
const
jl:array['N'..'Y'] of byte =(0,0,0,0,0,0,0,0,0,0,0,1);
type
atype=array[1..200] of integer;
var
n,m,k,i,j,l:longint; ans:int64;
data:array[1..200,1..200] of longint;
sum,f:array[1..200,0..200] of longint;
map:array[1..200,1..200]of integer;
q:atype;
procedure init;
var
i,j:longint;ch:char;
begin
fillchar(data,sizeof(data),0);
fillchar(map,sizeof(map),0);
readln(n,m,k);
for i:= 1 to n do
for j:=1 to m do
begin
read(data[i,j]);
read(ch);
read(ch);
map[i,j]:=jl[ch];
end;
end;
procedure deal;
var
i,j:integer;
begin
fillchar(sum,sizeof(sum),0);
for i:= 1 to m do
for j:= 1 to k do
inc(sum[i,j],sum[i,j-1]+data[n+1-j,i]);
end;
begin
assign(input,'gamea.in');
reset(input);
assign(output,'gamea.out');
rewrite(output);
init;
close(input);
deal;
fillchar(f,sizeof(f),0);
for i:= 1 to k do
f[1,i]:=sum[1,i];
for i:= 2 to m do
for j:= 1 to k do
for l:=0 to j do
if f[i,j]<f[i-1,l]+sum[i,j-l] then f[i,j]:=f[i-1,l]+sum[i,j-l];
writeln(f[m,k]);
close(output);
end.