CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #924 #926 →

#925. Largest island

On a map of `1` and `0`, find the area (number of cells) of the largest island. If there are no islands, print 0. ### Input n m, then n lines. ### Output A number.

Examples

Input
2 7
0011010
0101110
Output
6
Input
7 4
0011
1000
0111
0001
1011
1100
0011
Output
6

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!