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

Форумы > Обсуждение задач > тема:


Задача "Question 4"

Идёт турнир!

В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.

imesecan24.ноя.2012 в 12:22:49
0Сообщение скрыто

imesecan24.ноя.2012 в 12:26:37
1There are many different solutions.

imesecan24.ноя.2012 в 15:24:15
2Сообщение скрыто

imesecan24.ноя.2012 в 15:29:31
3It's not very big. I sent it as email. There are larger test cases

imesecan24.ноя.2012 в 16:14:04
4Сообщение скрыто

imesecan24.ноя.2012 в 17:06:53
5Сообщение скрыто

imesecan13.мар.2013 в 21:47:26
6Here is the algorithm
Having N=250 you can understand that you can use a simple algorithm like N^4. Start from one corner and go one by one until to the other corner.
1 2 3 4 5 6 7 8
1 . . . . . . . .
2 . # . . . # . .
3 . . . . . . . .
4 . . . . . . . .
5 . . . . . . . .
6 . . . # . . . .
7 . . . . . . . .
8 . . . . . . . .
It asks square ranges that is to make our work easy. Let's say that you started from bottom left corner (normally you should start from (1,1), anyway). If that cell is an empty celll you start checking square ranges
7 . .
8 S .

imesecan13.мар.2013 в 21:48:16
7if all cells in the newly added rows and columns are available cells, or not. If yes, increment the range and check the upper row and right column.
6 . . .
7 . . .
8 S . .
Because the inner cells of this new square have already been checked, just check the new row and column. If yes, Increment the size of the square
5 . . . .
6 . . . #
7 . . . .
8 S . . .
When we check the new row and column, we see that the largest square is 3 for the cell (1,8).

Repeat this process for all cells,


www.contester.ru