First mass-resolved measurement of high-energy cosmic-ray antiprotons