比赛 20130725暑期B班1测 评测结果 AWWWWWWWWW
题目名称 打乒乓球 最终得分 10
用户昵称 o_o 运行时间 0.022 s
代码语言 Pascal 内存使用 1.13 MiB
提交时间 2012-07-18 10:10:29
显示代码纯文本
var
a,b,c,d,e,r,t,i,j,o,m,n:longint;
s,k,l:array[0..1000]of longint;
q:array[0..500,0..500]of longint;
begin
assign(input,'table2.in');
assign(output,'table2.out');
reset(input);
rewrite(output);
read(a);
e:=0;
for b:=1 to a do
begin
read(s[b]);

for c:=1+e to s[b]+e do
begin
read(k[c],l[c]);
readln;



end;
e:=e+s[b];
end;

for i:=1 to 500 do
for j:=1 to 500 do
q[i,j]:=0;
for i:=11 to 49 do
for j:=11 to 49 do
q[i,j]:=1;

for i:=91 to 109 do
for j:=21 to 39 do
q[i,j]:=2;
for i:=166 to 174 do
for j:=26 to 34 do
q[i,j]:=3;
e:=0;
for b:=1 to a do
begin
o:=0;
for c:=1+e to s[b]+e do
if q[k[c],l[c]]>0 then
o:=o+q[k[c],l[c]];
writeln(o);
e:=e+s[b];
end;
close(input);
close(output);
end.