-
八皇后问题c语言实现
void show() /* 输出所有皇后的坐标 */
{
int i;
for(i = 0; i < max; i++)
{
printf("(%d,%d) ", i, queen[i]);
}
printf("
");
sum++;
}
int check(int n) /* 检查当前列能否放置皇后 */
{
int i;
for(i = 0; i < n; i++) /* 检查横排和对角线上是否可以放置皇后 */
{
if(queen[i] == queen[n] || abs(queen[i] - queen[n]) == (n - i))
{
return 1;
}
}
return 0;
}
void put(int n) /* 回溯尝试皇后位置,n为横坐标 */
{
int i;
for(i = 0; i < max; i++)
{
&nbs
- 2022-05-09 12:47:00下载
- 积分:1
-
Bio metric engine starter Arduino Uno
使用Arduino Uno用指纹(生物测量)启动汽车发动机
- 2022-09-13 16:50:03下载
- 积分:1
-
opencv提取关键帧,关键帧分水岭和阈值分割
opencv提取关键帧,关键帧分水岭和阈值分割
- 2023-01-28 11:40:09下载
- 积分:1
-
Matlab-Realization-of-a-special-matrix
使用Matlab实现特殊矩阵,对初学Matlab的人很有帮助(It has benefits for learners)
- 2010-08-30 09:58:40下载
- 积分:1
-
ccode
包括汉诺塔、杨辉三角、求根值等c程序,在VC++6.0运行没问题。(Including the Tower of Hanoi, Yang Hui triangle, the value of such c rooting process running in VC++6.0 no problem.)
- 2010-12-15 08:41:27下载
- 积分:1
-
AnimBear
Animate a bear using sprites, using cocos 2D
- 2010-08-07 13:44:20下载
- 积分:1
-
digital filter
说明: 各种滤波器,包括高通、低通、带通等滤波器,可用,直接输入数值即可,可直接使用,没有bug(bandpass filter,Band pass filter, available, direct input value, can be used directly, no bug)
- 2021-04-16 21:20:00下载
- 积分:1
-
FileBillParsor
说明: 在文件系统中,FileBillParsor利用重叠IO,分块、分行处理数据(in the file system, using overlapping FileBillParsor IO, block, the branch data processing)
- 2006-05-11 13:52:04下载
- 积分:1
-
Attiny24A_ADC
说明: Attiny24a多通道ADC驱动程序,可以采集多个AD信号,值得借鉴。(Attiny24a multi-channel ADC driver can collect multiple AD signals, which is worth learning.)
- 2021-04-01 23:09:07下载
- 积分:1
-
MFC_TreeCRTL
对话框以及树控件的描述及应用,很值得初学者学习,代码可以直接运行(Dialog boxes, and a description of the tree control and application, it is worth learning for beginners, the code can be run directly)
- 2013-06-27 09:01:38下载
- 积分:1