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

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


50276 - Nice Floor

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

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

• 50626 - Маршрут
• 50642 - Шашечная доска
• 50646 - Чем больше, тем лучше
• 51153 - A+B
• Student results
• 50252 - Birthday
• 50245 - Santa Gifts
• 50239 - Eating cheese
• 50276 - Nice Floor
• 50476 - Meditation
• 50551 - Kamelot
• 50608 - Гангстеры
• 50623 - Прямоугольники
• 50624 - Простая задача
• 50627 - Площадь многоугольника
• 50629 - Минусы
• 50632 - Снова игра в числа

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

Если у вас есть предложения или пожелания по работе 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