- 博客(6)
- 资源 (1)
- 收藏
- 关注
原创 广度优先搜索-八数码问题
算法简介:广度优先搜索问题给定一个一幅图和一个起点s,回答“从s到给定的顶点v是否存在一条路径?如果有,找出其中最短的那条(所含边数最少)。“思路边数最少,很自然想到从从经过1条边能到达的节点有哪些?然后经过这些边再到达的节点有哪些?这样我不就能够想出来最短的路径了吗?没错,这是非常简单的想法,然而真正的广度优先算法也是这样,简单而有效。解决方法图片来源:https://commons.wikime
2016-11-02 13:59:05
5420
原创 uva 1583 - Digit Generator
For a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits. When M is the digitsum of N , we call N a generator of M .For example, the digit-sum of 245 is 256 (= 245
2016-05-13 23:43:19
333
原创 uva 1586 - Molar mass
An organic compound is any member of a large class of chemical compounds whose molecules contain carbon. The molar mass of an organic compound is the mass of one mole of the organic compound. The molar
2016-05-11 20:49:37
275
原创 uva 10340 - All in All
You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss
2016-05-10 21:48:17
393
原创 uva 1225 - Digit Counting
Trung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N (1 < N < 10000) . After that, he counts the number of
2016-05-10 21:31:47
243
原创 uva 1585 - Score
There is an objective test result such as `OOXXOXXOOO". AnO’ means a correct answer of a problem and an X' means a wrong answer. The score of each problem of this test is calculated by itself and its j
2016-05-10 21:28:06
890
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人