P21425 [HackerEarth] "Sometimes the thing that brings us together also pulls us apart." - Jarod Kintz.
普及
题目描述

"Sometimes the thing that brings us together also pulls us apart." - Jarod Kintz.
Shivam and Shantam are really good friends. What mostly brings them together is the hours of group study they have done in the two years of their engineering, and there is only more to add to this. They both start studying together for exams , and keep explaining topics and clearing each other's slightest of doubts.

But , unfortunately , marks and money can always make or break relations. Both of them have to answer N questions in tomorrow's paper. We also have two arrays , A and B. Ai denotes the marks Shivam will get if he answers the i^th question. Bi denotes the marks Shantam will get if he answers the i^th question. The person not choosing to answer the question would get no marks.

Obviously , there are many ways in which they can give their papers. Let the final score of Shivam be S and that of Shantam be K. We are interested in knowing the number of ways such that the absolute difference in S and K is less than or equal to Q.

Input Format :

The first line contains N , the number of questions. The next line contains N space separated integers denoting Ai , the marks that Shivam can score if he attempts the i^th question. The next line contains N space separated integers denoting Bi , the marks that Shantam can score if he attempts the i^th question. The next line contains Q , the maximum allowed absolute difference.

Output Format :

Since the number of ways can be huge , output the answer modulo 10^9 + 7 in a separate line.

Contraints :
1 ≤ N ≤ 200
0 ≤ Ai, Bi ≤ 2 * 10^3
0 ≤ Q ≤ 10^6

SAMPLE INPUT
2
1 2
4 5
2

SAMPLE OUTPUT
6

Explanation

There are 6 ways to get an absolute difference less than equal to 2 :
Shivam : {1 , 0} Shantam: {0 , 0} i. e. Shivam answers only the first question, but Shantam answers none.
Shivam : {0 , 2} Shantam: {0 , 0} i. e. Shivam answers only the second question, but Shantam answers none.
Shivam : {0 , 2} Shantam: {4 , 0}
Shivam : {1 , 2} Shantam: {4 , 0}
Shivam : {1, 2} Shantam: {0 , 5}
Shivam : {0 , 0} Shantam: {0 , 0}

输入格式

见题面

输出格式

见题面

样例输入
85 1334 1874 1372 1159 1833 1070 1487 1297 1518 1177 1773 1270 1763 1668 1192 1985 1102 1480 1213 1627 1802 1099 1527 1625 1543 1924 1023 1972 1061 1181 1003 1432 1505 1593 1725 1031 1492 1142 1222 1286 1064 1900 1187 1360 1413 1974 1270 1170 1235 1833 1711 1760 1896 1667 1285 1550 1140 1694 1695 1624 1019 1125 1576 1694 1658 1302 1371 1466 1678 1593 1851 1484 1018 1464 1119 1152 1800 1087 1060 1926 1010 1757 1170 1315 1576 1227 1043 1758 1164 1109 1882 1086 1565 1487 1577 1474 1625 1627 1629 1928 1423 1520 1902 1962 1123 1596 1737 1261 1195 1525 1264 1260 1202 1116 1030 1326 1011 1771 1411 1547 1153 1520 1790 1924 1188 1763 1940 1851 1662 1829 1900 1713 1958 1578 1365 1007 1477 1200 1058 1439 1303 1760 1357 1324 1477 1108 1113 1887 1801 1850 1460 1428 1993 1384 1405 1540 1111 1704 1835 1356 1072 1350 1823 1485 1556 1216 1626 1357 1526 1357 29437
样例输出
599947829