CF369B.Valera and Contest

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Valera loves to participate in competitions. Especially in programming contests. Today he has participated in the contest with his team, consisting of nn students (including Valera). This contest was an individual competition, so each student in the team solved problems individually.

After the contest was over, Valera was interested in results. He found out that:

  • each student in the team scored at least ll points and at most rr points;
  • in total, all members of the team scored exactly salls_{all} points;
  • the total score of the kk members of the team who scored the most points is equal to exactly sks_{k} ; more formally, if a1,a2,...,ana_{1},a_{2},...,a_{n} is the sequence of points earned by the team of students in the non-increasing order (a1>=a2>=...>=an)(a_{1}>=a_{2}>=...>=a_{n}) , then sk=a1+a2+...+aks_{k}=a_{1}+a_{2}+...+a_{k} .

However, Valera did not find out exactly how many points each of nn students scored. Valera asked you to recover any distribution of scores between the students of the team, such that all the conditions above are met.

输入格式

The first line of the input contains exactly six integers n,k,l,r,sall,skn,k,l,r,s_{all},s_{k} ( 1<=n,k,l,r<=10001<=n,k,l,r<=1000 ; l<=rl<=r ; k<=nk<=n ; 1<=sk<=sall<=1061<=s_{k}<=s_{all}<=10^{6} ).

It's guaranteed that the input is such that the answer exists.

输出格式

Print exactly nn integers a1,a2,...,ana_{1},a_{2},...,a_{n} — the number of points each student scored. If there are multiple solutions, you can print any of them. You can print the distribution of points in any order.

输入输出样例

  • 输入#1

    5 3 1 3 13 9
    

    输出#1

    2 3 2 3 3 
  • 输入#2

    5 3 1 3 15 9
    

    输出#2

    3 3 3 3 3 
首页