In situations like this I would lift the carpet up, pull out the padding underneath,, hang it on something and let all the padding drain and dry. Meanwhile I would have the carpeting propped up from the floor and mop up and other water and let the carpeting dry for as long as it takes. If you have the time and if it's not too much of a hassle you could get the carpeting all the way out.