RP\cap coRP \subseteq ZPP
Suppose we have a language L recognized by both the RP algorithm A and the (possibly completely different) co-RP algorithm B.
Given an input in L, run A on the input. If it returns YES, the answer must be YES. Otherwise, run B on the input. If it returns NO, the answer must be NO. If neither occurs, repeat this step.
P(X = k) = (1-\frac 1 2)^{k-1}\frac 1 2 = 2^{-k} (X - liczba rund, rozklad geometryczny)
E(X) = 2
E(t) = t_1E(X) = \mathrm{poly}