The materials from which carpet padding is made retain moisture and do not dry effectively. Also, items need to be removed from the flood environment and dried outside or in a well-ventilated area. This is not possible with carpet padding, since it is either glued or nailed to the floor.
Although the carpet padding must be discarded and replaced, you may be able to salvage the carpet. Remove the carpet and hose it down outside. Using a scrub brush, work a non-phosphate cleaner into the pile. Dry the carpet outdoors, preferably. If this isn't possible, dry it in a well-ventilated area that was not flooded using a dehumidifier and wet/dry vacuum. When the carpet has dried, spray it with disinfectant and let that dry before putting it down again.
With the carpet and carpet padding completely removed, dry the floor underneath. Scrub it with a stiff brush and mixture of bleach and water paying special attention to corners and cracks where mud and silt may imbed. Follow with a disinfectant, then allow it to dry. Open windows to allow natural ventilation. Avoid accelerated drying with heaters since this can cause wood floors to crack, split or buckle.
Once the floor has dried completely, you can lay down the new carpet padding. Give the floor ample drying time. Padding glue won't stick to a damp floor and installing padding over a still damp floor can enable mold growth.
Protect yourself from mold exposure when cleaning up after a flood by wearing a N-95 mask, gloves, and goggles. Without protection you risk skin irritation, allergic reactions, infections, asthma episodes, and other respiratory problems. Mold poses a higher risk to people with existing respiratory problems.