11085 - Back to the 8-Queens

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

Moderator: Board moderators

11085 - Back to the 8-Queens

Postby DanS » Mon May 21, 2007 9:01 pm

I'm getting WA for this problem, but every test case that I came up with seemed to work fine. So I'm a bit stuck, as I don't see where the error is coming from.

for example:
1 7 4 6 8 2 5 3
Case 1: 0

1 7 2 6 3 5 8 4
Case 2: 1

1 1 1 1 1 1 1 1
Case 3: 7

1 2 3 4 5 6 7 8
Case 4: 7
Last edited by DanS on Fri Jun 01, 2007 2:51 am, edited 1 time in total.
DanS
New poster
 
Posts: 3
Joined: Mon May 21, 2007 8:55 pm

Postby Robert Gerbicz » Mon May 21, 2007 10:16 pm

My accepted program gives
Code: Select all
Case 1: 0
Case 2: 2
Case 3: 7
Case 4: 7

So for the second case your program is wrong.
Robert Gerbicz
Experienced poster
 
Posts: 196
Joined: Wed May 02, 2007 10:12 pm
Location: Hungary, Pest county, Halasztelek

Postby DanS » Fri Jun 01, 2007 2:51 am

OK, I'm now recursively searching for all 92 solutions and then determining the minimum number of moves by matching the board to each of these solutions. It still doesn't work.
Can I have a number of test cases & outputs to see where it's going wrong?
DanS
New poster
 
Posts: 3
Joined: Mon May 21, 2007 8:55 pm

Re: 11085 - Back to the 8-Queens

Postby cyiucsy » Sun May 13, 2012 5:12 am

DanS wrote:OK, I'm now recursively searching for all 92 solutions and then determining the minimum number of moves by matching the board to each of these solutions. It still doesn't work.

Can I have a number of test cases & outputs to see where it's going wrong?


A rather late reply after 5 years.

Well I used a similar approach and I got AC-ed. I didn't even use any special test cases other than the sample I/O. So I am convinced that there's something wrong with your matching.
cyiucsy
New poster
 
Posts: 1
Joined: Sun May 13, 2012 5:06 am


Return to Volume CX

Who is online

Users browsing this forum: No registered users and 0 guests