func_code_string: #include <bits/stdc++.h>   using namespace std;   int a[10005], cnt[305], dp[10005], inf = 1e8;   int main() {     int n, t;     scanf( %d %d , &n, &t);     int max_num = 0, len = n * min(n / 2, t);     if (len <= 0) len = n;     for (int i = 1; i <= n; ++i) {       scanf( %d , a + i);       max_num = max(max_num, ++cnt[a[i]]);     }     for (int i = n + 1; i <= len; ++i) {       a[i] = a[i - n];     }     int ans = 0;     for (int i = 1; i <= len; ++i) {       dp[i] = 1;       for (int j = i - 1; j >= max(i - n, 1); --j) {         if (a[i] >= a[j]) {           dp[i] = max(dp[i], dp[j] + 1);         }       }       ans = max(ans, dp[i]);     }     if (n / 2 == 0) n++;     if (t <= (n / 2)) {       printf( %d n , ans);     } else {       printf( %d n , ans + max_num * (t - (n / 2)));     }     return 0;   }   