#include<bits/stdc++.h>
using namespace std;

priority_queue<int>ans;//优先队列
int n,m,q,u,v,t;
int sigma;//累计加的
double p;
int tot;
inline int read(){
    char c;
    while(c<'0'||c>'9')
		c=getchar();
    long long sum = 0;
    while(c>='0'&&c<='9'){
    	sum=sum*10+c-48;
    	c=getchar();
    }
    return sum;
}

int main(){
    n=read();m=read();q=read();u=read();v=read();t=read();
    p=(double)u/v;
	int tmp;
    for(int i=1;i<=n;++i)
        tmp=read(),ans.push(tmp);
    for(int i=1;i<=m;++i){
        int top=ans.top()+sigma;
        ans.pop();
        int a1=floor(p*(double)top),a2=top-a1;
        a1-=sigma,a2-=sigma;
        a1-=q,a2-=q;
        ans.push(a1),ans.push(a2);
        if(i%t==0)printf("%d ",top);
        sigma+=q;
    }
    cout<<endl;
    for(int i=1;ans.size();++i){
        if(i%t==0)
        	cout<<ans.top()+sigma<<' ';
        ans.pop();
    }
    return 0;
}
测试点 #1
Accepted
得分:100
用时:2 ms
内存:228 KiB

输入文件(earthworm1.in

1 0 0 1 2 1
915866
输出文件(earthworm1.ans

915866
选手输出

915866 

测试点 #2
Accepted
得分:100
用时:2 ms
内存:224 KiB

输入文件(earthworm2.in

1000 0 0 1 2 1
751103 789683 573261 759320 204083 582213 998020 554041 172192 585984 170816 847474 615253 414729 199132 178154 1
<6800 bytes omitted>
输出文件(earthworm2.ans

999432 998469 998353 998020 997660 997414 996191 995344 992924 991006 990522 987069 986951 986765 986579 984571 984468 984232 9
<6786 bytes omitted>
选手输出

999432 998469 998353 998020 997660 997414 996191 995344 992924 991006 990522 987069 986951 986765 986579 984571 984468 984232 9
<6786 bytes omitted>

测试点 #3
Accepted
得分:100
用时:28 ms
内存:728 KiB

输入文件(earthworm3.in

100000 0 0 1 2 1
680351 451124 48910 505493 930478 545620 34252 111923 107488 31506 334922 122964 448779 923314 271688 954590 57
<688921 bytes omitted>
输出文件(earthworm3.ans

1000000 999979 999974 999950 999947 999942 999939 999911 999895 999886 999851 999848 999847 999835 999824 999818 999774 999774 
<688905 bytes omitted>
选手输出

1000000 999979 999974 999950 999947 999942 999939 999911 999895 999886 999851 999848 999847 999835 999824 999818 999774 999774 
<688905 bytes omitted>

测试点 #4
Accepted
得分:100
用时:2 ms
内存:224 KiB

输入文件(earthworm4.in

1 1000 0 1 2 1
33386
输出文件(earthworm4.ans
33386 16693 16693 8347 8347 8346 8346 4174 4174 4173 4173 4173 4173 4173 4173 2087 2087 2087 2087 2087 2087 2087 2087 2087 2087 
<6452 bytes omitted>
选手输出
33386 16693 16693 8347 8347 8346 8346 4174 4174 4173 4173 4173 4173 4173 4173 2087 2087 2087 2087 2087 2087 2087 2087 2087 2087 
<6453 bytes omitted>

测试点 #5
Accepted
得分:100
用时:2 ms
内存:208 KiB

输入文件(earthworm5.in

1000 1000 0 1 2 1
132625 572871 770124 563851 578941 933006 37851 712167 787787 21841 604359 544543 291697 614202 217317 279151 
<6764 bytes omitted>
输出文件(earthworm5.ans
999591 998289 992902 992899 990821 988583 987695 987062 984833 983641 982764 979755 979383 978593 977069 977048 976978 976054 97
<20746 bytes omitted>
选手输出
999591 998289 992902 992899 990821 988583 987695 987062 984833 983641 982764 979755 979383 978593 977069 977048 976978 976054 97
<20747 bytes omitted>

测试点 #6
Accepted
得分:100
用时:2 ms
内存:220 KiB

输入文件(earthworm6.in

1 1000 101 1 2 1
878550
输出文件(earthworm6.ans
878550 439275 439376 219739 219839 219890 219991 110173 110273 110324 110424 110450 110551 110602 110702 55794 55894 55945 56045
<11893 bytes omitted>
选手输出
878550 439275 439376 219739 219839 219890 219991 110173 110273 110324 110424 110450 110551 110602 110702 55794 55894 55945 56045
<11894 bytes omitted>

测试点 #7
Accepted
得分:100
用时:3 ms
内存:212 KiB

输入文件(earthworm7.in

1000 1000 130 1 2 1
719730 265368 766225 978873 180882 759547 799075 652390 846784 103245 459582 527132 263286 875985 799682 891
<6773 bytes omitted>
输出文件(earthworm7.ans
998520 998405 998288 997931 996455 995925 995214 994998 994931 993811 993022 991458 990524 989079 986680 986788 986176 985516 98
<20872 bytes omitted>
选手输出
998520 998405 998288 997931 996455 995925 995214 994998 994931 993811 993022 991458 990524 989079 986680 986788 986176 985516 98
<20873 bytes omitted>

测试点 #8
Accepted
得分:100
用时:32 ms
内存:784 KiB

输入文件(earthworm8.in

50000 50000 0 1 2 1
200240 332901 277204 806517 368526 442028 524956 700364 228807 786932 131910 655424 774858 118142 741296 999
<344422 bytes omitted>
输出文件(earthworm8.ans
1000000 999962 999959 999953 999880 999878 999874 999873 999863 999846 999828 999827 999804 999777 999760 999751 999745 999686 9
<1044402 bytes omitted>
选手输出
1000000 999962 999959 999953 999880 999878 999874 999873 999863 999846 999828 999827 999804 999777 999760 999751 999745 999686 9
<1044403 bytes omitted>

测试点 #9
Accepted
得分:100
用时:55 ms
内存:1116 KiB

输入文件(earthworm9.in

100000 100000 0 1 2 2
959613 194150 85516 394977 870052 300505 900903 647300 231641 734416 481762 684211 758915 137869 352605 39
<688700 bytes omitted>
输出文件(earthworm9.ans
999965 999954 999910 999900 999866 999862 999813 999794 999781 999764 999758 999725 999718 999714 999689 999674 999657 999628 99
<1044274 bytes omitted>
选手输出
999965 999954 999910 999900 999866 999862 999813 999794 999781 999764 999758 999725 999718 999714 999689 999674 999657 999628 99
<1044275 bytes omitted>

测试点 #10
Accepted
得分:100
用时:445 ms
内存:16148 KiB

输入文件(earthworm10.in

100000 2000000 0 1 2 21
66589 48392 791767 104800 766778 53663 117659 914981 951118 653732 575320 338907 972492 787435 419335 68
<688912 bytes omitted>
输出文件(earthworm10.ans
999864 999634 999499 999270 999104 998913 998716 998530 998331 998147 997897 997696 997453 997192 996928 996655 996442 996295 99
<1202233 bytes omitted>
选手输出
999864 999634 999499 999270 999104 998913 998716 998530 998331 998147 997897 997696 997453 997192 996928 996655 996442 996295 99
<1202234 bytes omitted>

测试点 #11
Accepted
得分:100
用时:537 ms
内存:16008 KiB

输入文件(earthworm11.in

100000 2500000 0 1 2 26
49672 613410 576709 19013 843381 207064 930756 472514 731146 788207 286649 381150 256723 435989 608747 4
<688616 bytes omitted>
输出文件(earthworm11.ans
999693 999361 999115 998848 998660 998487 998209 997983 997697 997494 997266 997001 996696 996437 996205 995894 995609 995328 99
<1201708 bytes omitted>
选手输出
999693 999361 999115 998848 998660 998487 998209 997983 997697 997494 997266 997001 996696 996437 996205 995894 995609 995328 99
<1201709 bytes omitted>

测试点 #12
Accepted
得分:100
用时:760 ms
内存:15732 KiB

输入文件(earthworm12.in

100000 3500000 0 1 2 36
2926831 7957102 9339535 6140298 9778289 7343914 3819688 3934516 4909839 1447788 2440966 6320207 1232456 
<788862 bytes omitted>
输出文件(earthworm12.ans
9997244 9993812 9990862 9988046 9984114 9979187 9975743 9971851 9967744 9963824 9960344 9957327 9952536 9948849 9945479 9940681 
<1398486 bytes omitted>
选手输出
9997244 9993812 9990862 9988046 9984114 9979187 9975743 9971851 9967744 9963824 9960344 9957327 9952536 9948849 9945479 9940681 
<1398487 bytes omitted>

测试点 #13
Time Limit Exceeded
得分:0
用时:1096 ms
内存:32672 KiB

输入文件(earthworm13.in

100000 5000000 0 153252866 506034425 51
9865456 7275647 9260296 4104264 5535150 462208 1644763 689101 7363715 1033468 31742 8117
<788750 bytes omitted>
输出文件(earthworm13.ans
9994209 9988048 9983017 9977409 9971961 9966543 9960245 9955426 9950317 9945283 9941161 9936720 9930457 9924999 9919022 9913206 
<1348152 bytes omitted>
选手输出
9994209 9988048 9983017 9977409 9971961 9966543 9960245 9955426 9950317 9945283 9941161 9936720 9930457 9924999 9919022 9913206 
<1007286 bytes omitted>

测试点 #14
Time Limit Exceeded
得分:0
用时:1089 ms
内存:32624 KiB

输入文件(earthworm14.in

100000 7000000 0 357111899 688810819 71
69584443 17447233 31714022 66332206 64271777 53896834 21891609 13004626 91242955 9384517
<888666 bytes omitted>
输出文件(earthworm14.ans
99912143 99831664 99762428 99698089 99623075 99550896 99462188 99386381 99299109 99225508 99164639 99092832 99023096 98951893 98
<1498747 bytes omitted>
选手输出
99912143 99831664 99762428 99698089 99623075 99550896 99462188 99386381 99299109 99225508 99164639 99092832 99023096 98951893 98
<1014619 bytes omitted>

测试点 #15
Accepted
得分:100
用时:34 ms
内存:704 KiB

输入文件(earthworm15.in

50000 50000 83 1 2 1
84360021 71347337 39044696 22626429 70396546 40094315 23005735 75656509 71700433 6879921 2129312 64690192 9
<444255 bytes omitted>
输出文件(earthworm15.ans
99998786 99998673 99996873 99994357 99992093 99990524 99990202 99986550 99985362 99980613 99977718 99975974 99975940 99973705 99
<1346924 bytes omitted>
选手输出
99998786 99998673 99996873 99994357 99992093 99990524 99990202 99986550 99985362 99980613 99977718 99975974 99975940 99973705 99
<1346925 bytes omitted>

测试点 #16
Accepted
得分:100
用时:55 ms
内存:1120 KiB

输入文件(earthworm16.in

50000 150000 131 1 2 2
20230216 16944549 92292904 97379087 27243476 17669963 70262093 22087930 15981549 73852548 74993903 961393
<444125 bytes omitted>
输出文件(earthworm16.ans
99995655 99988697 99984529 99977146 99974971 99966567 99965867 99963568 99961070 99960999 99959482 99956137 99955657 99953216 99
<1574872 bytes omitted>
选手输出
99995655 99988697 99984529 99977146 99974971 99966567 99965867 99963568 99961070 99960999 99959482 99956137 99955657 99953216 99
<1574873 bytes omitted>

测试点 #17
Accepted
得分:100
用时:52 ms
内存:1184 KiB

输入文件(earthworm17.in

100000 100000 178 132358018 140364259 3
83072957 5441239 53478006 30551173 88543592 82231284 93626258 17504195 42460232 23515751
<888601 bytes omitted>
输出文件(earthworm17.ans
99996327 99993082 99991642 99991386 99990496 99990769 99990699 99987089 99985399 99984658 99983590 99983162 99979432 99977825 99
<890443 bytes omitted>
选手输出
99996327 99993082 99991642 99991386 99990496 99990769 99990699 99987089 99985399 99984658 99983590 99983162 99979432 99977825 99
<890444 bytes omitted>

测试点 #18
Accepted
得分:100
用时:98 ms
内存:1968 KiB

输入文件(earthworm18.in

100000 300000 92 258729579 850884467 4
41792818 41347297 9862677 26430344 30975686 74655582 35126740 36768313 65809829 44157475 
<888454 bytes omitted>
输出文件(earthworm18.ans
99995333 99990181 99985754 99982607 99980455 99976678 99970940 99965773 99961646 99955959 99952184 99945407 99941617 99939092 99
<1574872 bytes omitted>
选手输出
99995333 99990181 99985754 99982607 99980455 99976678 99970940 99965773 99961646 99955959 99952184 99945407 99941617 99939092 99
<1574873 bytes omitted>

测试点 #19
Accepted
得分:100
用时:885 ms
内存:15348 KiB

输入文件(earthworm19.in

100000 3500000 104 102514430 964087490 36
28839242 27693274 44178102 57443460 77799442 72224991 27753602 66608430 177253 1324344
<888516 bytes omitted>
输出文件(earthworm19.ans
99974806 99950998 99916312 99886038 99862310 99823810 99798321 99759808 99722558 99690439 99666640 99632135 99588418 99565796 99
<1923017 bytes omitted>
选手输出
99974806 99950998 99916312 99886038 99862310 99823810 99798321 99759808 99722558 99690439 99666640 99632135 99588418 99565796 99
<1923018 bytes omitted>

测试点 #20
Time Limit Exceeded
得分:0
用时:1097 ms
内存:32400 KiB

输入文件(earthworm20.in

100000 7000000 67 208233944 504103320 71
7263944 53468728 10518204 48490395 37736986 77899217 30359056 89599056 71210516 4675066
<888251 bytes omitted>
输出文件(earthworm20.ans
99924577 99856647 99773016 99705429 99634016 99559279 99501349 99436902 99353202 99297141 99224529 99160975 99068283 98992431 98
<1956790 bytes omitted>
选手输出
99924577 99856647 99773016 99705429 99634016 99559279 99501349 99436902 99353202 99297141 99224529 99160975 99068283 98992431 98
<1259895 bytes omitted>