  We consider a new type of obstacle problem in the cylindrical domain
$\Omega=D\times (0,1)$ arising from minimization of the functional $$
\int_\Omega \frac{1}{2}|\nabla u|^2+\chi_{\{v>0\}}udx, $$ where $v(x')=\int_0^1
u(x', t) dt $. We prove several existence and regularity results and show that
the comparison principle does not hold for minimizers.
  This problem is derived from a classical optimal rearrangement problem in a
cylindrical domain, under the constraint that the force function does not
depend on the $x_n$ variable of the cylindrical axis.
  A mistake in the Theorem 4.2 of the previous version has been found. The
statement remains an open problem.
