Problem Description

Given n numbers and limit k, apply async function f(x)=x*x with at most k in flight. Output results in original order.

Input Format

Line1: n k. Line2: n integers.

Output Format

One line results.

Sample Test Case

Input:
6 2 1 2 3 4 5 6
Output:
1 4 9 16 25 36

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next