Similar Items: Assessing and Optimizing Urban Dynamic Resilience to Extreme Rainfall from Shock to Recovery