CF582B.Once Again...
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You are given an array of positive integers a1,a2,...,an×T of length n×T . We know that for any i>n it is true that ai=ai−n . Find the length of the longest non-decreasing sequence of the given array.
输入格式
The first line contains two space-separated integers: n , T ( 1<=n<=100 , 1<=T<=107 ). The second line contains n space-separated integers a1,a2,...,an ( 1<=ai<=300 ).
输出格式
Print a single number — the length of a sought sequence.
输入输出样例
输入#1
4 3 3 1 4 2
输出#1
5
说明/提示
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.