![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
倪倪倪倪倪~
这个作者很懒,什么都没留下…
展开
-
Prime Ring Problem
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. Note: the number原创 2017-07-14 09:09:28 · 156 阅读 · 0 评论 -
胜利大逃亡
Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会. 魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标中的其中一个.现在给你城堡的地图,请你计原创 2017-07-15 16:08:10 · 373 阅读 · 0 评论 -
FZU 1046 Tempter of the Bone
The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone原创 2017-07-27 10:45:33 · 189 阅读 · 0 评论 -
51nod 1109 01组成的N的倍数(bfs)
给定一个自然数N,找出一个M,使得M > 0且M是N的倍数,并且M的10进制表示只包含0或1。求最小的M。 例如:N = 4,M = 100。 Input输入1个数N。(1 Output输出符合条件的最小的M。 Sample Input 4 Sample Output 100 #include #include #include #include #i原创 2017-07-28 15:07:28 · 285 阅读 · 0 评论 -
51Nod 1459 迷宫游戏
你来到一个迷宫前。该迷宫由若干个房间组成,每个房间都有一个得分,第一次进入这个房间,你就可以得到这个分数。还有若干双向道路连结这些房间,你沿着这些道路从一个房间走到另外一个房间需要一些时间。游戏规定了你的起点和终点房间,你首要目标是从起点尽快到达终点,在满足首要目标的前提下,使得你的得分总和尽可能大。现在问题来了,给定房间、道路、分数、起点和终点等全部信息,你能计算在尽快离开迷宫的前提下,你的最大原创 2017-07-28 15:21:55 · 302 阅读 · 0 评论 -
hdu 1072 Nightmare
Ignatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius should get out of the labyrinth before the bomb explodes. The initial ...原创 2017-07-28 15:26:15 · 202 阅读 · 0 评论 -
python实现八皇后问题(二位列表)
八皇后问题: 在8*8的国际象棋盘上,放置8个皇后,使任何一个皇后都不能吃掉另一个。国际象棋规则中,皇后可以吃到任何一个与他在同一行、同一列或者同一斜线上的敌方棋子,所以八皇后问题的所有解满足: 8个皇后都不在同一行、同一列,或者同一斜线上。 要求:输出所有的解。提示,用递归 这是简单的dfs搜索,python如下 def print1(): global t,arr ...原创 2019-06-25 15:09:56 · 831 阅读 · 0 评论