← All problemsSign in

E - Longest Increasing Subsequence

Given an array of size $N$ with distinct integers. Longest Increasing Subsequence(LIS) is the longest subsequence of a given array such that all elements of the subsequence are sorted in increasing order. For every $i$ $(1 <= i <= N)$, find the number of subsequences such that length of LIS of the subsequence is equal to $i$. Print the $answer$ $modulo$ $10^{9}+7$. ###Input: - F

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start