Cocktails

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

문제

A party is coming tonight, and drinks are not ready yet! You are going to prepare a cocktail for your friends. The cocktail consists of nn different ingredients. There are nn jars in front of you, numbered from left to right starting from 1. Each of the jars contains a single ingredient. You have to blend each ingredient in its separate jar.

Blending the contents of ii-th jar by hand takes a_ia\_i seconds. Also, you have a very powerful blender which can blend the contents in any kk subsequent jars in BB seconds (the blender can be applied any number of times). Finally, you can swap any two jars in CC seconds (the two jars don't have to be adjacent). It is allowed to blend the contents of any jar more than once.

What is the smallest possible time to blend the ingredients in all nn jars? The final order of jars does not matter as long as they are all blended.

입력

In the first line of input there are four space-separated integers nn, kk, BB, CC (1kn5001 \leq k \leq n \leq 500, 1B,C10,0001 \leq B, C \leq 10\\,000) --- the number of jars, the reach of the blender, the time needed to use the blender, and the time needed to swap two jars respectively.

In the second line there are nn space-separated integers a_1a\_1, \ldots, a_na\_n (1a_i10,0001 \leq a\_i \leq 10\\,000), where a_ia\_i is the time needed to manually blend the contents of ii-th jar.

출력

Print a single integer --- the smallest time needed to blend the contents in all jars.