Coexistence of the spin-density wave and superconductivity in Ba1−xKxFe2As2