设为首页收藏本站

LUPA开源社区

 找回密码
 注册
文章 帖子 博客
LUPA开源社区 首页 业界资讯 开源资讯 查看内容

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

2015-5-5 22:12| 发布者: joejoe0332| 查看: 1668| 评论: 0|原作者: 钱曙光|来自: CSDN

摘要: 新加坡总理李显龙自因4月20日在IT industry leaders上称,他写的最后一个程序是几年前写的 C++ 数独求解器。有人想要程序源代码,他就在Facebook上发布了一组他亲自编写的复杂程序代码,还提供了一个指向Google Driv ...

  李显龙是谁?请看极客头条此前的这篇文章《李显龙:会C++的总理》。


data/attachment/portal/201505/05/221205mt5tud5dillrhtdc.jpg


  图片来自李显龙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

HN关于李显龙的热帖:

Prime Minister of Singapore Coded Sudoku Solver in C++(125 comments)

PM of Singapore Shares His C++ Sudoku Solver Source Code(140 comments)



酷毙

雷人

鲜花

鸡蛋

漂亮
  • 快毕业了,没工作经验,
    找份工作好难啊?
    赶紧去人才芯片公司磨练吧!!

最新评论

关于LUPA|人才芯片工程|人才招聘|LUPA认证|LUPA教育|LUPA开源社区 ( 浙B2-20090187 浙公网安备 33010602006705号   

返回顶部