1、为什么MAX等于10以下数据在我的机器上结果正确,而提交通不过?换成11就可以。有谁知道了麻烦留言告诉一声。:)
10
@--------@
----------
----------
----------
----------
----------
----------
----------
----------
----------
@---------
----------
----------
----------
----------
----------
----------
----------
----------
---------@
for(i = 0; i < N; i++)
{
for(j = 0; j < N; j++)
{
tb[i][j] = before[i][j];
}
}
rotate90(before, N);
if(compare(before, after, N) == 0)
{
count = 1;
}
else if(rotate90(before, N), compare(before, after, N) == 0)
{
count = 2;
}
else if(rotate90(before, N), compare(before, after, N) == 0)
{
count = 3;
}
else
{
for(i = 0; i < N; i++)
{
for(j = 0; j < N; j++)
{
before[i][j] = tb[i][j];
}
}
reflect(before, N);
if(compare(before, after, N) == 0)
{
count = 4;
}
else if(rotate90(before, N), compare(before, after, N) == 0)
{
count = 5;
}
else if(rotate90(before, N), compare(before, after, N) == 0)
{
count = 5;
}
else if(rotate90(before, N), compare(before, after, N) == 0)
{
count = 5;
}
}
if(count == 0)
{
for(i = 0; i < N; i++)
{
for(j = 0; j < N; j++)
{
before[i][j] = tb[i][j];
}
}
if(compare(before, after, N) == 0)
{
count = 6;
}
else
{
count = 7;
}
}
fprintf (fout, "%d/n", count);
fclose(fin);
fclose(fout);
exit(0);
}