Идёт турнир! | В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.
|
|
imesecan | 24.ноя.2012 в 12:22:49
| 0 | Сообщение скрыто
|
imesecan | 24.ноя.2012 в 12:26:37 | |
1 | There are many different solutions.
|
imesecan | 24.ноя.2012 в 15:24:15
| 2 | Сообщение скрыто
|
imesecan | 24.ноя.2012 в 15:29:31 | |
3 | It's not very big. I sent it as email. There are larger test cases
|
imesecan | 24.ноя.2012 в 16:14:04
| 4 | Сообщение скрыто
|
imesecan | 24.ноя.2012 в 17:06:53
| 5 | Сообщение скрыто
|
imesecan | 13.мар.2013 в 21:47:26 | |
6 | Here 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 .
|
imesecan | 13.мар.2013 в 21:48:16 | |
7 | if 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,
|
|