Tidally disrupted stars as a possible origin of both cosmic rays and neutrinos at the highest energies