记录编号 |
79606 |
评测结果 |
AAAAAAA |
题目名称 |
方块转换 |
最终得分 |
100 |
用户昵称 |
张铭哲 |
是否通过 |
通过 |
代码语言 |
Pascal |
运行时间 |
0.001 s |
提交时间 |
2013-11-05 23:14:21 |
内存使用 |
0.17 MiB |
显示代码纯文本
type
fuck=Array[1..10,1..10] of char;
var
a,b,c,d:fuck;
i,j,n:integer;
function check:boolean;
var i,j:integer;
begin
for i:=1 to n do
for j:=1 to n do
if c[i,j]<>b[i,j] then exit(false);
exit(true);
end;
function check1:boolean;
var i,j:integer;
begin
for i:=1 to n do
for j:=1 to n do
if c[i,j]<>d[i,j] then exit(false);
exit(true);
end;
procedure f1;
var i,j:integer;
begin
for i:=1 to n do
for j:=1 to n do
b[i,j]:=a[n-j+1,i];
end;
procedure f2;
var i,j:integer;
begin
for i:=1 to n do
for j:=1 to n do
b[i,j]:=a[n-i+1,n-j+1];
end;
procedure f3;
var i,j:integer;
begin
for i:=1 to n do
for j:=1 to n do
b[i,j]:=a[j,n-i+1];
end;
procedure f4;
var i,j:integer;
begin
for i:=1 to n do
for j:=1 to n do
b[i,j]:=a[i,n-j+1];
end;
begin
assign(input,'transformations.in');
reset(input);
assign(output,'transformations.out');
rewrite(output);
readln(n);
for i:=1 to n do
begin
for j:=1 to n do
read(a[i,j]);
readln;
end;
d:=a;
for i:=1 to n do
begin
for j:=1 to n do
read(c[i,j]);
readln;
end;
f1;
if check then begin write(1);exit;end;
f2;
if check then begin write(2);exit;end;
f3;
if check then begin write(3);exit;end;
f4;
if check then begin write(4);exit;end;
a:=b;
f1;
if check then begin write(5);exit;end;
f2;
if check then begin write(5);exit;end;
f3;
if check then begin write(5);exit;end;
if check1 then begin write(6);exit;end
else write(7);
end.