Colorful floors

Problem Name:
Colorful floors
Site:HackerEarth
Links:
Tags:
Problem setters: