We consider the problem of distributed exploration or coverage of an unknown environment by a swarm of mobile minirobots that have limited memory, computation and communication capabilities. We describe a novel mechanism of distributed coverage of an unknown environment by swarmed robots that can dynamically merge and split into structured teams or exchange team members to improve the efficiency of solving the coverage problem. Our mechanism combines the technique of swarm-based flocking with coalition games to enable robots dynamically select utility maximizing teams that move in formation. Categories and Subject Descriptors I.2.9 [Artificial Intelligence]: Robotics--Autonomous Vehicles; I.2.11 [Artificial Intelligence]: Distributed Artificial Intelligence--Multi-agent Systems