![:lol:](./images/smilies/icon_lol.gif)
after getting 5-7 WAs I found bug in my dfs , but before that I have read this thread and rewrote my program for about 4-6 times
![:evil:](./images/smilies/icon_evil.gif)
This test should help:
Code: Select all
3
1 1 1 2 1 3 2 1 3 1
2 2
Code: Select all
wrong
![:lol:](./images/smilies/icon_lol.gif)
Good luck!
Moderator: Board moderators
Code: Select all
3
1 1 1 2 1 3 2 1 3 1
2 2
Code: Select all
wrong
Try the problem.An equidivision of an n x n square array of cells is a partition of the n^2 cells in the array in exactly n sets, each one with n contiguous cells.
Problem description saysmrahman wrote:input #Code: Select all
2 1 2 0 0 5 0 0 1 2 1 3 3 2 2 2 2 1 4 2 4 1 5 1 3 1 3 4 5 5 2 5 3 5 5 5 4 2 5 3 4 3 5 4 3 4 4 0
Judge's input don't contain cell coordinates having value equal to 0 or greater n.It is understood that a cell in an n x n square array is denoted by a pair (i, j), with 1 <= i, j <= n
I checked that each line contains at least 2 * N numbers, so it can't be less or no numbers or empty line.TimeString wrote:- A line may not contain exactly 2*N numbers, maybe less than it, maybe more than it. Moreover, it is possible that there are no numbers in this line!! So if you use C or C++, you'd better use gets().
As TimeString pointed there will be even number of input numbers in a line.Robert Gerbicz wrote: 3. If there are odd number of numbers in a line then the answer is wrong.