CHEFTIC - Editorial

The links to the Problem in the Contest section and Practice section are incorrect. Please fix them.

Could someone point out what’s wrong in my solution here or give a set of n=k=3 tests?
https://www.codechef.com/viewsolution/9503691

Thanks

@likecs I have a doubt. Is this a valid test case?-

1

4 3

. X O .

X O O X

O X X O

X O X O

Because in this case that logic will also no work.

Done exactly like this !!!

https://www.codechef.com/viewsolution/9500258

and got AC :slight_smile:

1 Like

Can anyone help me find out test cases for 3rd subtask for which my solln. does not work?
https://www.codechef.com/viewsolution/9502837

1 Like

how can we access the minor diagonal elements?

Can anyone, give some hints or algorithm to be used to solve it in O(n^2)?

the question was poorly expressed. I thought that we had to check all possible diagonals for win

You can add only one X.

And what about this test case?

1

4 3

. X O .

X O O X

O X X O

X O X O

In that case also, it will work. You can put X in two places and check for those cases. Answer will be NO.

But the answer should be ‘YES’…because there are already 3 consecutive ‘X’.

That input is invalid according to problem. The board cannot already have some winner.

1 Like

Invalid, read the last line of the problem saying that it will be always chef’s chance and the board will not have any winner already.

Oh! I missed the last line. Thankz :slight_smile:

Sorry. I missed the last line.

@likecs: I have expanded the editorial, hope that will answer the question properly.

Oh, I didn’t see that. Yes it’s invalid input.

(i,N-i) for 1 <= i <= N

em still not getting it:(