Negotiating these concerns prior to leasing is going to be your best bet. Once you have taken possession of the apartment, it is generally acceptable to ask for fresh paint at the renewal of a two-year lease. With carpets, if not regulated by local ordinances or agreed upon prior to the lease signing, are undoubtedly a bit trickier. If addressed prior to the signing of a lease or during a lease renewal, you can have it written into the official lease. Once you have accepted occupation of the apartment, it will be much harder to negotiate a needed paint job or carpet replacement without local regulatory assistance.
Be prepared to negotiate, as some landlords will show an apartment needing both paint and carpet hoping you won’t notice. If you note that the carpet is due to be replaced or the walls need repainting, ask the landlord when they intend to do these things, it’s ultimately up to you. Remember, due to the current housing slump we are in a buyer’s market, so use this leverage to your advantage.