### [Gist with solution](https://gist.github.com/asahiocean/60869ea4465a3557f844f26d96f3b011) • [Open Problem](https://leetcode.com/problems/avoid-flood-in-the-city/) • [Discuss](https://vk.cc/c4akh5)
### [Open Problem](https://leetcode.com/problems/avoid-flood-in-the-city/) • [Discuss](https://vk.cc/c4akh5) • [Gist with solution](https://gist.github.com/asahiocean/60869ea4465a3557f844f26d96f3b011)
-------
<div><p>Your country has an infinite number of lakes. Initially, all the lakes are empty, but when it rains over the <code>nth</code> lake, the <code>nth</code> lake becomes full of water. If it rains over a lake which is <strong>full of water</strong>, there will be a <strong>flood</strong>. Your goal is to avoid the flood in any lake.</p>
<p>Given an integer array <code>rains</code> where:</p>
...
...
@@ -77,4 +83,4 @@ After that, it will rain over lakes [1,2]. It's easy to prove that no matter whi