# # 1 # A sequence of numbers is given. # Find the starting position of the longest increasing section # when looking from the back of the sequence. # In other words, # find the leftmost position where: # a[i] < a[i+1] # continues to be true. # INPUT # 5 # 1 2 3 5 4 # OUTPUT # 4 # -------------------------------------------------------------------------------- # # 2 # In a sequence, # find the length of the already sorted increasing part # when looking from the back. # INPUT # 6 # 2 1 3 4 5 6 # OUTPUT # 4 # Explanation: # Looking from the back: # 3 < 4 < 5 < 6 # The length is 4. # INPUT # 5 # 5 1 2 3 4 # OUTPUT # 4 # -------------------------------------------------------------- # # 3 # You can move only the first number. # In one operation: # - Remove the first number # - Insert it into any position you want # Find the minimum number of operations # needed to sort the sequence in increasing order. # INPUT # 4 # 1 2 4 3 # OUTPUT # 3
To embed this project on your website, copy the following code and paste it into your website's HTML: