比赛 |
NOIP_1 |
评测结果 |
WAWAW |
题目名称 |
画海岛地图 |
最终得分 |
40 |
用户昵称 |
rottenwood |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2009-07-20 11:16:44 |
显示代码纯文本
program island;
type
shuzu=array[0..9,0..9] of integer;
var
s,f,a,b:shuzu;
flag:boolean;
i,j,m,n,temp:longint;
begin
assign(input,'island.in');reset(input);
assign(output,'island.out');rewrite(output);
readln(n);
for i:=1 to 8 do
for j:=1 to 4 do
begin
a[i,j]:=1;
b[i,j]:=1;
end;
for i:=1 to n do
begin
read(temp); j:=0;
while temp<>0 do
begin
inc(s[i,0]);
inc(j);
s[i,j]:=temp;
read(temp);
end;
end;
for i:=1 to n do
begin
read(temp); j:=0;
while temp<>0 do
begin
inc(f[i,0]);
inc(j);
f[i,j]:=temp;
read(temp);
end;
end;
flag:=true;
for i:=1 to 8 do
for j:=1 to 8 do
if (a[i,j]<>s[i,j])or(b[i,j]<>s[i,j]) then flag:=false;
if flag then begin
writeln('1');
writeln('*',' ','*',' ','*',' ','*',' ');
writeln(' ','*',' ','*',' ','*',' ','*');
writeln('*',' ','*',' ','*',' ','*',' ');
writeln(' ','*',' ','*',' ','*',' ','*');
writeln('*',' ','*',' ','*',' ','*',' ');
writeln(' ','*',' ','*',' ','*',' ','*');
writeln('*',' ','*',' ','*',' ','*',' ');
writeln(' ','*',' ','*',' ','*',' ','*');
writeln('2');
writeln(' ','*',' ','*',' ','*',' ','*');
writeln('*',' ','*',' ','*',' ','*',' ');
writeln(' ','*',' ','*',' ','*',' ','*');
writeln('*',' ','*',' ','*',' ','*',' ');
writeln(' ','*',' ','*',' ','*',' ','*');
writeln('*',' ','*',' ','*',' ','*',' ');
writeln(' ','*',' ','*',' ','*',' ','*');
writeln('*',' ','*',' ','*',' ','*',' ');
end
else writeln('no');
close(output);
end.