Recently, I have tried a problem:1893B - Neutral Tonalityand solved it with O(NlogN) tc. Problem Summary:Insert arraybinto arrayaat any position while making sure that the LIS is minized. Approach:For an elementelof the arrayainsert the elements ofbwhich are greater than or equal toel. ...
and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length of the subsequence of consecutive elements of the sequence, the sum of which is greater than or equal to S.