#P11277. Construct a Sequence with k Multiplicative Pairs

    ID: 13351 Type: Default 1000ms 256MiB

Construct a Sequence with k Multiplicative Pairs

Construct a Sequence with k Multiplicative Pairs

Given a positive integer (n) and a non-negative integer (k), construct a sequence of (n) positive integers (a_1, a_2, \ldots, a_n) such that exactly (k) ordered pairs ((i,j)) with (1 \le i < j \le n) satisfy [ \max(a_i,a_j)\text{ is an integer multiple of }\min(a_i,a_j). ] Moreover, to achieve full score, you must ensure that (a_i \le 2n-1) for all (1 \le i \le n).

It is guaranteed that an answer exists for the given input.

inputFormat

The input consists of two integers (n) and (k) on a single line, where (n) is a positive integer and (k) is a non-negative integer.

outputFormat

Output a sequence of (n) positive integers (separated by spaces) that satisfies the conditions above.

sample

1 0
1