CPU doesn't have "parts" so I assume you mean PC. There's no way to tell without testing but of system was on, most is probably shot ....
Take everything apart and let dry for 48 hours in well ventilated area. With smaller parts you can even try sticking them in a refrigerator overnight, then when ya open fridge, immediately stick in plastic bag and let adjust to room temperature. (Otherwise humidity in warm air will condense water on cold parts).
Then test ecah component to see if still working .... I'd toss PSU