Given the information provided, let's solve for the number of patients treated with medicine types B and D only.
We start by using the information given:
From condition (c), we have:
\[25 + 20 + 30 + x + 20 + 20 + y = 250\]
\[115 + x + y = 250\]
\[x + y = 250 - 115\]
\[x + y = 135\]
Now, from condition (d), 100 patients were treated with exactly three types of medicines. So, we add the number of patients treated with all four types (50) to this to get the total number of patients treated with at least three types:
\[100 + 50 = 150\]
We'll replace this value with \( x + 20 + z + y \):
\[150 = x + 20 + 50 + y\]
\[80 = x + y\]
Now, we have two equations:
\[x + y = 135\] (from condition c)
\[x + y = 80\] (from condition d)
Now, we can solve for \(x\) and \(y\):
\[135 = 80\]
\[x = 135 - 80\]
\[x = 55\]
\[y = 135 - x\]
\[y = 135 - 55\]
\[y = 80\]
Now, we can calculate the number of patients treated with medicine types B and D only:
\[ \text{B and D only} = 100 + 20 = 120 \]
But we need to subtract this from the total to get the number treated with B and D only:
\[ \text{B and D only} = 1000 - (250 + 55 + 210 + 80 + 25 + 20 + 20 + 10 + 20 + 30 + 20 + 20 + 20 + 25 + 40 + 20 + 10 + 50 + 75) \]
\[ \text{B and D only} = 1000 - 1020 = 150 \]
So, the number of patients treated with medicine types B and D only is 150.