286 - Dead Or Not -- That Is The Question

All about problems in Volume 2. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

mpi
New poster
Posts: 46
Joined: Fri Nov 03, 2006 7:53 pm
Location: Madrid

Post by mpi » Mon Jan 14, 2008 10:12 pm

You don't have to watch for any string "EOF" at the end of the input. EOF stands for End Of File and means "no data", that is, after the last description of a board there is nothing. In C, you should do something like this:

Code: Select all

while (gets(buffer) != NULL)
where buffer is an array of at least 64+1 chars.

RC's
Learning poster
Posts: 65
Joined: Fri Jul 13, 2007 3:17 pm

Post by RC's » Tue Jan 15, 2008 11:50 am

I think the output is "game is not over", since the king can move south..
is there any other cases ?

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 286: WA What is the trick?

Post by brianfry713 » Thu Feb 09, 2012 1:22 am

It's checkmate, not checkermate.
Check input and AC output for thousands of problems on uDebug!

metaphysis
Experienced poster
Posts: 139
Joined: Wed May 18, 2011 3:04 pm

Re: 286 - Dead Or Not -- That Is The Question

Post by metaphysis » Sun Jun 05, 2016 5:53 am

The problem statement is not so clear.
When a pawn is in the 8th row, do I have to count it as any potentially promoted piece?
NO, you can assume that potential promotion already took place. so, a pawn in the 8th row is just a pawn.
The input is given as row by row, first a1 - h1, then a2 - h2, etc.

RandyWaterhouse
New poster
Posts: 4
Joined: Tue Dec 13, 2016 1:41 pm

Re: 286 - Dead Or Not -- That Is The Question

Post by RandyWaterhouse » Tue Dec 20, 2016 2:14 pm

The problem statement is completely messed up IMO. The possible values for the characters indicating the pieces (e.g. 's' for knights, 'd' for queens) don't match at all with the provided sample input which uses a different character set, e.g. including a 'q' (which I suppose is for queens) and a 'p' (pawns?).

Also, there are no spaces at all in the sample input so the black king wouldn't have a possible move in any of them.

???

Post Reply

Return to “Volume 2 (200-299)”