ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Unsorted > задача:


50276 - Nice Floor

Гость
• Обсуждение задачи (1)

Задачи раздела

• 50245 - Santa Gifts
• 50256 - Sequence
• 50257 - Galls village
• 50280 - Division
• 50266 - Kovrov
• 50254 - Lawyers Council
• 50260 - What about judges?
• 50259 - Many-coloured roads
• 50276 - Nice Floor
• 50270 - Bitsorting
• 50272 - Strange Numbers
• 50275 - Wedding
• 50273 - Two Captains
• 50274 - Boundary Troops
• 50278 - ATM
• 50277 - Unusual Lottery
• 50283 - Tetris 3D

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Автор: Павел Кузнецов, ПГУ. Сложность Бета

Once a king of Byteland conceived repair in his palace. It was necessary to break a pair of walls and make a banquet hall more spacious. When he planned a floor, he thought what would be more beautifil - marble or wooden parquet. Marble is more smooth, but it would be more painful to fall on it, so the king chose parquet. And he wanted something unusual. Palace hall is a square with side N meters. Every parquet piece is a square with side 1 meter and of white or black color. There are enough pieces of each color to cover the floor with them. But the king askes you to lay the floor with the pieces, considering the following conditions:

• The four corner pieces must have the same color.
• Every piece must have at least 2 neighbour pieces of other color.

Two pieces are neighbours if they contact by a side.
Your task is to present the plan of covering the floor or to say if it is impossible.

Input
The first line contains an integer number N (3 ≤ N ≤ 200).
Output
If it is impossible to lay the hall in the way the king asked, write "NO SOLUTION" without quotes. Otherwise, output must contain N lines, N symbols length each. White pieces must be presented as '.' (dot), black '#' (sharp).

Input 1 Output 1
3
.#.
#.#
.#.

Для отправки решений необходимо выполнить вход.

www.contester.ru