#K7331. Longest Increasing Subsequence
Longest Increasing Subsequence
Longest Increasing Subsequence
Given a list of integers, your task is to determine the length of the longest strictly increasing subsequence. A subsequence is derived by deleting some or no elements from the original list without changing the order of the remaining elements. For a sequence \(a_1, a_2, \dots, a_n\), a subsequence \(a_{i_1}, a_{i_2}, \dots, a_{i_k}\) is strictly increasing if \(a_{i_1} < a_{i_2} < \dots < a_{i_k}\). The optimal solution should ideally achieve a time complexity of \(O(n \log n)\) by using a binary search technique.
inputFormat
The input is provided via standard input (stdin). The first line contains an integer (N) representing the number of elements in the list. The second line contains (N) space-separated integers.
outputFormat
Output a single integer to standard output (stdout) representing the length of the longest strictly increasing subsequence.## sample
0
0
</p>