作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在创建一个 C 程序来播放 Gomoku .它使用 Minimax搜索以决定最佳移动。但是,它只能搜索最佳着法 10 秒。如何确定我的搜索功能何时搜索了 10 秒。如果您能向我提供示例或文档链接,我们将不胜感激。
最佳答案
#include <time.h>
time_t start_time = time(NULL);
while (((int)(time(NULL) - start_time)) < 10) {
//search
}
也就是我想到的。虽然它没有经过测试。
关于c - 五子棋:限时搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3950784/
假设我有一群 N 人要乘火车旅行。我需要以最小化总门票成本的方式组织他们到售票处。如果一家人买家庭票,去同一目的地的人买团体票,成本可以降到最低。 我不知道这些人中谁是家人,他们要去哪里旅行。 我能做
限时 QQ音乐幸运狂欢PARTY 最高可抽豪华绿钻24个月 手机打开链接 登录即可参与活动 每人登录就有两次机会 分享一下活动还有一次机会 必中项目 但是抽中什么就看自己的了 反正小编抽中的都是
我有一个 Python 脚本,其中我连接到 MQTT 服务器。我希望通过我订阅的主题收到消息,但如果我没有收到消息,我想完全终止脚本。 我正在使用的脚本如下所示: #!/usr/bin/python
我有一个客户想在线销售教程视频。我已经预览了他从 CF 流式传输的教程(这是公开的)。现在我想使用 c# sdk 生成私有(private)的、有时间限制的 URL,以允许购买教程的客户在有限的时间段
如何使用 AWS SDK 创建云端签名 URL ? 这看起来确实应该很容易做到,但我就是看不到。我大体上了解它是如何工作的,并且可能会拼凑简单的 Java 代码来自己完成。 AWS SDK 没有为此提
我是一名优秀的程序员,十分优秀!