G. Longest strictly increasing subsequence
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given an array of $$$N$$$ integers $$$A_1, A_2, \ldots A_N$$$. For each $$$k$$$ from $$$0$$$ to $$$N$$$ inclusive, find the length of the longest possible strictly increasing subsequence of the array if you are allowed to change at max $$$k$$$ values of the array to any integer (in particular, you're allowed to change to a zero or negative integer as well).

A sequence $$$X$$$ is a subsequence of a sequence $$$Y$$$ if $$$X$$$ can be obtained from $$$Y$$$ by deleting several (possibly zero) elements. A sequence is strictly increasing if every element in it is greater than the previous element. In particular, a sequence of length $$$1$$$ is strictly increasing.

Input
  • The first line contains $$$T$$$, the number of testcases. Then the testcases follow, each consisting of two lines.
  • The first line of each testcase contains two space separated integers $$$N$$$ and $$$K$$$.
  • The second line of each testcase contains $$$N$$$ space separated integers $$$A_1, A_2, \ldots A_N$$$.

Constraints

  • $$$1 \le T \le 1000$$$
  • $$$1 \le N \le 4000$$$
  • The sum of $$$N$$$ over all testcases doesn't exceed $$$4000$$$
  • $$$1 \le A_i \le 10^7$$$
Output

For each testcase, print for each $$$k$$$ from $$$0$$$ to $$$N$$$ inclusive, the length of the longest possible strictly increasing subsequence of the array if you are allowed to change at max $$$k$$$ values of the array to any integer.

Example
Input
2
4
1 2 1 3
4
1 1 1 1
Output
3 3 4 4 4 
1 2 3 4 4