Flood fill pe fiecare insulă de uscat, numărarea comorilor și produsul deranjamentelor D(t) modulo 1e9+7.