Improved error in main.cpp. Improved code formatting.

In main.cpp avoid mismatching allocation and deallocation of puzzle.
For arrays need to use delete[].

Applied rules:
 - use prefix increment form (except situation where postfix needed)
 - try to split very long lines
 - add space after comma
 - write * near identifier
 - avoid unneccessery brackets