Scheduler

아직 제출이 없습니다시간 제한2초메모리 제한256 MB

문제

There are TT processes running in the multitasking operating system <<Squirrel OS>>. Each of the TT processes has a given priority p_ip\_i, which affects how often the process is run. Since the system only has a single core in a single processor to run things, it is facing a challenge of distributing the CPU time between these processes, taking their priorites into account.

The algorithm of defining which process is run at each time moment can be described in the following way. For each process, in addition to the priority p_ip\_i, there is also a counter t_it\_i. Initially all t_it\_i equal 0. Then every second:

  1. processes with the maximum value of p_i+t_ip\_i + t\_i are chosen.
  2. among such processes, the process with the minimum number ii is chosen.
  3. the chosen process ii is run for one second.
  4. for the chosen process ii the value t_it\_i is set to 0.
  5. for all other processes, the value t_it\_i is increased by 1.

Model the work of the operating system for TT seconds and calculate for how many seconds each process was run. Assume that all calculations and switches between processes are instant, so the running time for each process in seconds is an integer.

입력

The first line contains two space-separated integers NN and TT --- the number of processes in the operating system (1N1051 \le N \le 10^5) and the number of seconds to be modeled (1T1061 \le T \le 10^6).

The second line contains NN space-separated integers p_ip\_i --- the process priorities (0p_i1050 \le p\_i \le 10^5).

출력

In the only line of the output file, print NN space-separated integers --- for how many seconds each of the processes was run.