Author: Uri Blass
Date: 03:43:08 04/10/03
Go up one level in this thread
On April 10, 2003 at 06:35:07, Uri Blass wrote:
>On April 09, 2003 at 23:56:54, Russell Reagan wrote:
>
>>So...who wants to explain how this works? I don't know how it works, but it
>>finds all of the solutions to the 8 queens problem.
>>
>>#include <stdio.h>
>>int v,i,j,k,l,s,a[99];
>>void main(void){
>>for(s=8;*a-s;v=a[j*=v]-a[i],k=i<s,j+=(v=j<s&&(!k&&!!printf(2+"\n\n%c"-(!l<<!j),"
>>#Q"[l^v?(l^j)&1:2])&&++l||a[i]<s&&v&&v-i+j&&v+i-j))&&!(l%=s),v||(i==j?a[i+=k]=0:++a[i])>=s*k&&++a[--i]);
>> printf("\n\n");
>>}
>
>I do not understand this code because my C knowledge is not enough.
>
>What is *a-s
>
>I understand that j*=v is j=j*v butI do not understand the meaning when * is at
>the beginning of the command.
>
>I never used it.
>
>Uri
Another question
Am I allowed to post this code in another forum of programmers or I need to post
a link?
I think that we may get more answers if this post is posted also
in anther forum but if I post a link people will need first to register to CCC.
I can post it in a forum of programming language(language of discussions hebrew)
when it is possible to ask every question about programs except visual basic but
I hesitate if to do it
Here is a link for the second forum:
http://www.tapuz.co.il/tapuzforum/main/forumpage.asp?id=89
Uri
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.