The Cakewalk
CodeChefOpen on judge ↗
Lakshmi Narayanan is so fond of arrays. His friend Siva gifted him an array of positive integers of size n x T. The array has the property, for any i > n, a[i] = a[i - n]. He is interested in knowing the length of the longest non-decreasing subsequence of the given array. Input The first line contains two space-separated integers: n, T (1 ≤ n ≤ 100, 1 ≤ T ≤ 10^7). The second line contains n s
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.
Sign in to chat with the tutor and save your progress.
Sign in to start