
ZOJ Problem Set  3411
Because of recent update of ZOJ, some special judges were broken. You're requested to fix the special judge for Problem 0000. The norm of a vector v = (v_{1}, v_{2}, ... , v_{n}) is define as norm(v) = v_{1} + v_{2} + ... + v_{n}. And in Problem 0000, there are n cases, the standard output is recorded as a vector x = (x_{1}, x_{2}, ... , x_{n}). The output of a submitted solution is also records as a vector y = (y_{1}, y_{2}, ... , y_{n}). The submitted solution will be accepted if and only if norm(x  y) ≤ m (a given tolerance). Knowing that all the output x_{i} are in range [a, b], an incorrent solution that outputs integer y_{i} in range [a, b] with equal probability may also get accepted. Given the standard output x_{i}, you are supposed to calculate the possibility of getting accepted using such solution. InputThe input contains no more than 100 test cases. The first line of each case contains 4 integers n, m, a, b (1 ≤ n, m ≤ 50, 50 ≤ a < b ≤ 50), as described above. Then follows a line contains n integers, x_{1}, x_{2}, ... , x_{n} (a ≤ x_{i} ≤ b), indicating the standard output of the n cases. Process to end of input. OutputFor each case, output the possibility as a irreducible fraction of getting accepted using the incorrent solution in a single line. Sample Input1 1 0 2 1 Sample Output1/1 Author: LI, Dinghua Contest: ZOJ Monthly, October 2010 