登录
首页 » c » 八皇后问题c语言实现

八皇后问题c语言实现

于 2022-05-09 发布 文件大小:9.69 kB
0 111
下载积分: 2 下载次数: 1

代码说明:

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

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • VisualCplus6.0
    VisualC++6.0基础与实例教程,VisualC++6.0使用说明,还有具体的实例,以及源代码(VisualC++6.0-based tutorials and examples, VisualC++6.0 instructions for use, there are specific examples and source code)
    2010-01-14 14:30:03下载
    积分:1
  • 电动车无刷电机驱动
    【实例简介】电动车无刷电机驱动
    2021-11-25 00:45:01下载
    积分:1
  • AVR寻迹小车
    说明:  可以实现小车的寻迹,巡线,自动避障等基本功能(It can realize tracking, line patrol, automatic obstacle avoidance and other basic functions)
    2020-06-27 08:21:00下载
    积分:1
  • Distributed Dynamic Routing Algorithm for Satellite Constellation
    Distributed Dynamic Routing Algorithm for Satellite Constellation,采用比较新颖的接收端检测解调方法 实现对当下比较新颖的空间调制的matlab仿真 同时 代码简单 易懂 适用于初学者对该空间调制的了解 各个功能单独封装 可以自己选用合适的代码  了解当下比较好的通信技术
    2022-05-08 14:26:37下载
    积分:1
  • handdetection3
    基于opencv的手部皮肤识别程序,可以根据手掌的大小判断出手掌展开或者握拳的两种状态,并将状态通过网络发送出去。(Opencv hand based on skin identification procedures, based on the size of the palm or fist, palm and determine the two states, and the state sent through the network.)
    2010-12-05 19:00:34下载
    积分:1
  • robot
    matlab 和VisualC++结合的写出工业机器人的实例(The example of industrial robotics is with matlab and VisualC++)
    2011-08-16 19:38:08下载
    积分:1
  • TunnelShell
    利用ICMP隧道技术的一个 SHELL 后门(use of the tunnel ICMP a backdoor SHELL)
    2005-06-28 10:35:03下载
    积分:1
  • 华为校园招聘笔试面试题合集
    华为校园招聘合集,各个岗位的的笔试题,非常有用(good book is good book)
    2018-03-20 21:50:52下载
    积分:1
  • lcd-ls020-stm32
    lcd ls020 from siemens s65 libery for stm32f10x
    2012-01-22 01:38:58下载
    积分:1
  • EastReport报表,内含说明和使用示例
    Eastreport 是采用C#编写的专门针对net环境开发的报表工具。 它有以下一些特点: 1. 方便强大的可视化设计工具。您通过简单的托拽和设置就可以制作普通的报表。 2. 报表采用c#开发。完全基于.net 3. 报表的数据源为Dataset方便和您的程序进行集成。(外部程序传dataset给报表,使得报表可以做到数据平台的无关性) 4. 集成图片,条码,图表等报表常用控件。 5. 强大的脚本功能。脚本采用C#语言编写。有编译报错机制。通过脚本可以极大的提供报表应用的灵活性。 6. web报表功能支持。 7.结构开放灵活方便您和您的框架程序集成。例如保存报表等工具采用事件的方式。你可以处理相应的事件来实现您需要的效果。
    2022-01-21 00:35:37下载
    积分:1
  • 696518资源总数
  • 106164会员总数
  • 18今日下载