Worth being aware that one of the potential problems with flooding (at least in the UK) is that it often leads to waste pipes or sewers becoming blocked and/or sewage mixing with flood water. This can still make replacing the building the most economic recovery option even if it's structurally fine.