My poor bike's chain lasted all of three months before it gave in to the winter floods where I live. Storing it indoors is not an option, and despite my maintenance efforts, the knee-deep floods that come once a month or so, rain every other day, and ocean only a quarter of a mile away has made it pretty much impossible to keep my chain dry. It's deteriorated beyond a useable point, so I have to buy a new one now. I'm new to bike maintenance on this level so I'd really like some advice on how to avoid replacing it again in three months.
While I agree with cherouvim that wet lube is a good thing for rust prevention, I would also ask if it's possible to store the bike higher up, perhaps with some kind of simple cover to prevent the rain and salt-spray from getting to it. Perhaps a couple of hooks on the wall and some rope or a simple bench or couple of large stones to stand the bike on.
Whatever magical product you treat it with, all parts of a bike are going to suffer from being repeatedly immersed in salt-water.
You need to start using a "wet" chain lube.
“Wet” chain lubes are recommended for wet riding conditions. They are generally made from oils and are not easily washed off by water.
Have a look at http://www.pinkbike.com/news/To-the-Point-Chain-Lube-2013.html for detailed chain maintenance information.
You can get stainless steel chains, but that won't stop the other components from failing, and they are typically not all stainless so will still rust a bit.
Have a read of This answer as it has useful information on rust resistant chains.
You could remove the chain from the sprockets while it's not being used. If you have quick release wheels removing it and putting it back on should take no longer than 5 minutes. Removed the back wheel, disengage the chain, and wrap it up around the seat post. If you have a single speed or fixed gear bike, this will be easy but it gets more complicated with derailleurs, but depending on their design it still might be possible with about 10 minutes of work. But it probably doesn't flood every day, so you should watch your weather forecast and only do this if you think there's a chance of a flood.
I would second @Daniel's recommendation of getting the bike up off the ground. If you have a derrailleur, yoo will at least have part of that sitting in the water along with the chain, and depending on the depth of the water, your bottom bracket and wheel hubs also. You can also purchase a stainless steel or nickel plated chain which might hold up to the water a bit better. If your spokes and wheels aren't rusted out then a stainless chain might be an easy solution.