Advertisement
Guest User

Untitled

a guest
Jan 17th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. //
  2. // Created by ppinh on 30/11/2019.
  3. //
  4.  
  5. #ifndef AED_LP1_PROJETO_PROJETO_H
  6. #define AED_LP1_PROJETO_PROJETO_H
  7. #define NUM 9
  8.  
  9. struct node{
  10. int data;
  11. int array[NUM];
  12. int tam;
  13. int lin; /// para poder fazer os quadrados(para saber em que posicao estou e percorrer a area certa do quadrado)
  14. int col;
  15.  
  16. struct node *pnext;
  17. struct node *prev_node;
  18. struct node *N;
  19. struct node *S;
  20.  
  21. struct node *NO;
  22. struct node *NE;
  23. struct node *SO;
  24. struct node *SE;
  25. };
  26. struct tabuleiros{
  27. struct node *no;
  28. struct tabuleiros *next,*prev;
  29. int index;
  30. };
  31. struct fila{
  32. int size;
  33. struct tabuleiros * tabuleiro;
  34. struct tabuleiros *inicio, *fim;
  35. };
  36.  
  37. /// fila ///
  38. void printfila(struct fila *f);
  39. struct fila * createFila();
  40. struct fila addFila(struct fila *f, struct node *head);
  41. ///////
  42. int main_projeto(int argc, char **argv);
  43. /// brute force ///
  44. int verifica_quadrado(struct node *current,int num);
  45. int verifica_col(struct node *tab,int num);
  46. int verifica_lin(struct node *tab,int num);
  47. int verifica_x_principal(struct node *current,int num);
  48. struct node * encontra_zeros(struct node *tab);
  49. int verificar_condicoes(struct node * tab,int num);
  50. int sudoku(struct node *head);
  51. ///
  52. int ** matriz_aleatoria();
  53. void carregar_matriz(struct node **head);
  54. void imprimirSudoku(struct node *pcs);
  55. void guardar_matriztxt(struct node * tab);
  56. void guardar_matrizbin(struct node * tab);
  57. void verificar_consistencia(int **matriz);
  58. int ***tabuleirosmemoria(int **matriz, int ***memoria);
  59. int **resolverONK(int **matriz, int ***memoria);
  60. /// ALGORITMO DO SUDOKU ///
  61. void numeros_possiveis(struct node *current);
  62. void remover_numero(struct node *current,int cel,struct node *head);
  63. int verifica_oculto(struct node *current,int cel );
  64. void elimina_par_coluna(struct node *current);
  65. void elimina_par_linha(struct node *current);
  66. void elimina_par_diag(struct node *current);
  67. void elimina_par_diag_secun(struct node *current);
  68. void elimina_par_quadrado(struct node *current);
  69. void pares_sozinhos (struct node * current);
  70. int resolver_matriz(struct node *head);
  71. int alg_sudoku(struct node **head, int ***memoria);
  72. ///
  73. void menu();
  74. #endif //AED_LP1_PROJETO_PROJETO_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement