This puzzle appeared in World Puzzle Championship 2009. I have prepared couple of puzzles of this type which I will be posting soon. Here are the rules of "Magic Square" as taken from the WPC2009 Instruction booklet.
"Magic Squares" Instructions:
The four puzzle types in this part: Skyscrapers, Battleships, Tents and Snake all rely on clue numbers on the outside of the four puzzle grids. Find the missing clues that are shared between the grids so that all puzzles can be solved, and solve them.
Skyscrapers: Place digits 1-6 into the grid so that each digit appears exactly once in each row and
in each column, and the clue numbers are the number of buildings that can be seen from the corresponding direction.
Battleships: Place the given fleet into the grid so that ships do not touch each other, not even diagonally. The clue numbers are the number of ship segments in the corresponding direction.
Tents: Locate the tents in the grid. Trees and tents appear in distinct pairs, in horizontally or vertically adjacent squares. Tents do not touch each other, not even diagonally. The clue numbers are the total number of tents in the corresponding direction.
Snake: Find a path of sequentially numbered and edge-connected squares starting from 1, passing through 10 and 24, and ending at 30 (1-12 for the example). The path cannot loop back or touch itself, not even diagonally. The clue numbers are the number of times the snake makes a 90-degree turn in the corresponding direction.