Pro.ID10106 TitleTransformations Title链接http://10.20.2.8/oj/exercise/problem?problem_id=10106 AC89 Submit239 Ratio37.24% 时间&空间限制描述A square pattern of size N × N (1 ≤ N ≤ 10) black and white square tiles is transformed into another square pattern. Write a program that will recognize the minimum transformation that has been applied to the original pattern given the following list of possible transformations:
In the case that more than one transform could have been used, choose the one with the minimum number above. 输入Line 1: A single integer, N Line 2..N+1: N lines of N characters (each either '@' or '-'); this is the square before transformation Line N+2..2*N+1: N lines of N characters (each either '@' or '-'); this is the square after transformation 输出Description A square pattern of size N × N (1 ≤ N ≤ 10) black and white square tiles is transformed into another square pattern. Write a program that will recognize the minimum transformation that has been applied to the original pattern given the following list of possible transformations:
In the case that more than one transform could have been used, choose the one with the minimum number above. Input Line 1: A single integer, N Line 2..N+1: N lines of N characters (each either '@' or '-'); this is the square before transformation Line N+2..2*N+1: N lines of N characters (each either '@' or '-'); this is the square after transformation Output A single line containing the the number from 1 through 7 (described above) that categorizes the transformation required to change from the 'before' representation to the 'after' representation. Sample Input 3 Sample Output 1 Source 样例输入3 样例输出1 作者 |