P5051 [COCI 2017/2018 #7] Timovi

题目描述

把$m$个人放在$n$个队伍里。 规则: - 每次放$k$个人 - 顺序为$1^{th}$->$2^{th}$->$3^{th}$->……->$(n-1)^{th}$->$n^{th}$->$(n-1)^{th}$->$(n-2)^{th}$->……->$2^{th}$->$1^{th}$->$2^{th}$->…… - 一直重复到$\text{当前剩余人数}

输入格式

The first line of input contains the integers N (2 ≤ N ≤ 200 000), K and M (1 ≤ K ≤ M ≤ 2 000 000 000) from the task.

输出格式

In a single line, output the number of kids in each of the N teams, respectively from the first to the $N^{th}$ team.

说明/提示

In test cases worth a total of 40 points, it will hold M / K ≤ 200 000.