![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索题
四年rain
我好困啊
展开
-
leetcode-八皇后问题-递归解法(打印地图)
八皇后问题起源 八皇后问题,是一个古老而著名的问题,是回溯算法的典型案例。该问题是国际西洋棋棋手马克斯·贝瑟尔于1848年提出:在8×8格的国际象棋上摆放八个皇后,使其不能互相攻击,即任意两个皇后都不能处于同一行、同一列或同一斜线上,问有多少种摆法。 高斯认为有76种方案。1854年在柏林的象棋杂志上不同的作者发表了40种不同的解,后来有人用图论的方法解出92种结果。计算机发明后,有多种计算机语言可以解决此问题。 leetcode 问题描述: 设计一种算法,打印 N 皇后在 N × N 棋盘上的各种摆法,其原创 2020-10-18 14:17:56 · 373 阅读 · 3 评论 -
poj3126 Prime Path (欧拉素数筛+BFS)
题目链接: poj3126 原题 The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It ...原创 2019-08-03 19:43:29 · 131 阅读 · 0 评论