时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld
题目描述
Once upon a time, high up on Mount Olympus, it came to pass that the gods held a competition to see who among them was the best at sorting lists of integers. Eris, the goddess of discord, finds this terribly boring and plans to add some mischief to the mix to make things more fun. She will sabotage the answers of Zeus so that his list of numbers is no longer sorted, which will no doubt be so embarrassing that he becomes furious and starts a minor war.
Eris must be careful not to be discovered while performing her sabotage, so she decides to only change a single digit in one of the numbers in Zeus’ answer. The resulting number may not have any leading zeros (unless it becomes equal to zero in which case a single zero digit is allowed). Eris can only replace a digit with another digit – adding or removing digits is not allowed
输入描述:
The first line of input contains n (2 ≤ n ≤ 100), the length of Zeus’ answer. The second line contains n integers
(
), Zeus’ answer
输出描述:
If Eris can make the list not be sorted by changing a single digit of one of the numbers, then output n integers b1, . . . , bn, the resulting list of numbers after making the change. Otherwise, output “impossible”. If there are many valid solutions, any one will be accepted.