Transaction-Level Modeling Framework for Space Applications
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Macros | |
#define | MAXQUEENS 20 /* Maximum number of queens */ |
#define | MAXRANKS MAXQUEENS /* Maximum number of ranks (rows) */ |
#define | MAXFILES MAXQUEENS /* Maximum number of files (columns) */ |
#define | MAXDIAGS (MAXRANKS+MAXFILES-1) /* Maximum number of diagonals */ |
#define | EMPTY (MAXQUEENS+1) /* Marks unoccupied file or diagonal */ |
Functions | |
void | find (int level) |
void | pboard (void) |
int | main (int argc, char **argv) |
void | find (register int level) |
Variables | |
int | queens |
int | ranks |
int | files |
int | printing = 0 |
int | findall = 0 |
unsigned long | solutions = 0 |
int | queen [MAXRANKS] |
int | file [MAXFILES] |
int | fordiag [MAXDIAGS] |
int | bakdiag [MAXDIAGS] |
void find | ( | int | level | ) |
void find | ( | register int | level | ) |
int files |
int findall = 0 |
int printing = 0 |
int queens |
int ranks |
unsigned long solutions = 0 |