输入描述:
The first line contains an integer n (1 <= n <= 1000) ——Indicates the number of days planned. The second line contains space-separated n integers which are the spoilt sequence of plans.
It is guaranteed that the given sequence is a permutation, i.e. it contains only integers from 1 to n, and every number is used exactly 1 time.
输出描述:
If it is impossible to obtain the given permutation from the original one in exactly one action, print 0 0. Otherwise, print two numbers l r (1 <= l <= r <= n)which are the endpoints of the
segment that needs to be reversed to obtain from permutation 1 2 ... n the given one.