A comparison principle for the subdiffusive p-Laplacian in a possibly nonsmooth and unbounded open set is proved. The result requires that the involved sub and supersolution are positive, and the ratio of the former to the latter is bounded. As an application, constrained radial symmetry for overdetermined problems is obtained. More precisely, both Dirichlet and Neumann conditions are prescribed on the boundary of a bounded open set, and the Neumann condition depends on the distance from the origin. The domain of the problem, unknown at the beginning, turns out to be a ball centered at the origin if a positive solution exists. Counterexamples are also discussed.