搜总裁网—中国有影响力的公司总裁高管企业家信息大全

李显龙总理公布几年前用C++写的数独求解器源码

互联网 2016-01-21 09:38100未知总裁2

李显龙总理公布几年前用C++写的数独求解器源码

图片来自李显龙Facebook主页,已获得33,414+ 个 like 和 10766+ 次分享。

新加坡总理李显龙自因4月20日在IT industry leaders上称,他写的最后一个程序是几年前写的 C++ 数独求解器。有人想要程序源代码,他就在Facebook上发布了一组他亲自编写的复杂程序代码,还提供了一个指向Google Drive的链接,里面包含了这段代码及其输出示例和编译后的Windows可执行文件。

The program is pretty basic: it runs at the command prompt, in a DOS window. Type in the data line by line (e.g. 1-3-8---6), then the solver will print out the solution (or all the solutions if there are several), the number of steps the program took searching for the solution, plus some search statistics.

这段程序很基础,是以命令提示符的形式运行,环境是一个DOS window。逐行输入数据后(例如1-3-8---6),求解器就会输出答案(如果有多个答案,则会输出所有答案)、搜索答案所花费的步骤,以及一些搜索统计数据。

相关链接:

李显龙原帖:Facebook

源代码等:Google Drive

李显龙此前的演讲视频+实录:Transcript of Speech by Prime Minister Lee Hsien Loong at Founders Forum Smart Nation Singapore Reception on 20 April 2015

GitHub 上的镜像文件:Sudoku2.cpp

标签关键词:

 备案号:辽ICP备09017512号-1

联系QQ: 邮箱地址: