Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #72.8K
~914 People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.
Favorite Forums
Favorite Tags
1 Posted Topic
Re: N Queen
you can try this one: [CODE]# include<stdio.h> int v,i,j,k,l,s,a[99]; int main() { 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"); return 0; }[/CODE] or this one: [CODE]# include<stdio.h> # define Q 9 struct POINT {int x,y;}; POINT q[Q]; int N; bool chkAll(int x){ for ( int i =x ; i >=0 ; i--) for(int j …
The End.