2023年10月30日
摘要: 10.30总结 复习了软考下午题目4的算法内容。 阅读全文
posted @ 2023-10-30 22:39 201812 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1.N皇后问题(非递归) #include<stdio.h> #include <math.h> #define N 4 int q[N + 1]; //存储皇后的列号 //检查第j个皇后的位置是否合法 int check(int j) { int i; for (int i = 1; i < j; 阅读全文
posted @ 2023-10-30 20:27 201812 阅读(25) 评论(0) 推荐(0) 编辑