#P2630. 图像变换
图像变换
Description
Given the grayscale values of every pixel in a image and a target image, find the shortest and, among those, lexicographically smallest non-empty sequence of operations.
The possible operations and their corresponding characters are:
A: rotate degrees clockwise;
B: rotate degrees counterclockwise;
C: flip left–right;
D: flip up–down.
Input Format
- Three lines, each containing integers, representing the initial image matrix.
- Three lines, each containing integers, representing the target image matrix.
Output Format
Output the shortest, lexicographically smallest non-empty operation sequence. If there is no solution, or if the shortest sequence would have length greater than , output Poland cannot into space!!!.
3 4 5
6 7 8
1 2 3
1 2 3
6 7 8
3 4 5
D
Hint
The string length does not exceed .
Translated by ChatGPT 5
京公网安备 11011102002149号