Files
Cody Boone Ferguson 28554b7791 Add missing alt code to 1990/baruch
I did this a while back but somehow forgot to do a git add baruch.alt.c
so the alt code was only referenced in the README.md and Makefile. That
has now been corrected.
2023-04-17 10:07:31 -07:00

7 lines
252 B
C

int v,i,j,k,l,s,a[99];
int main(void)
{
for(scanf("%d",&s);*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])
;puts("");
}