CF582B Once Again...
Description
You are given an array of positive integers $ a_{1},a_{2},...,a_{n×T} $ of length $ n×T $ . We know that for any $ i>n $ it is true that $ a_{i}=a_{i-n} $ . Find the length of the longest non-decreasing sequence of the given array.
Input Format
The first line contains two space-separated integers: $ n $ , $ T $ ( $ 1
Output Format
Print a single number — the length of a sought sequence.
Explanation/Hint
The array given in the sample looks like that: 3, 1, 4, 2, 3, 1, 4, 2, 3, 1, 4, 2. The elements in bold form the largest non-decreasing subsequence.