To begin with, if you had the apartment professionally cleaned, present them with the receipt, and they will have no need or excuse to charge you for cleaning. If you had the carpets professionally cleaned, do the same.
Regarding paint: Assuming the rental was newly painted when you moved in, you should have to pay half the cost of painting. Paint is presumed to last two years and repainting is -- as a rule of thumb -- not chargable following a tenancy of more than two years. Thus, if the paint has only been on the wall the one your you were there, that's half the lifespan of a paintjob, and you should pay half. Carpets are considered not chargable after 7-10 years of use. If the carpets were well worn when you arrived, then you certainly have an argument. If the carpets were new when you arrived and are now being replaced by necessity, then you can expect to pay around 83% of the replacement.
If all of this is just normal wear and tear, you shouldn't have to pay anything. The Department of Consumer Affairs has a great landlord/tenant handbook that lets you know all your rights and how to go about getting them. Follow the link below.