一上来看见题目就用了深搜(因为只会深搜)果断内存超限(据说时间也会超限)无奈只好开始用广搜其实广搜的思路和深搜有很多类似的地方 不过实现的过程中用到了队列 因此有点难以理解(好吧我个人认为)这题是最基本的广搜了 只是一个二叉树所以先画个二叉树出来看一下广搜的顺序每一个节点下一层的节点入队之后就把这个...
分类:
其他好文 时间:
2015-12-11 22:10:07
阅读次数:
221
D. Lazy StudentStudent Vladislav came to his programming exam completely unprepared as usual. He got a question about some strange algorithm on a grap...
分类:
其他好文 时间:
2015-12-11 18:45:19
阅读次数:
162
一个exgcd解决一个线性同余问题,多个exgcd解决线性同余方程组。Strange Way to Express IntegersTime Limit: 1000MSMemory Limit: 131072KTotal Submissions: 12001Accepted: 3797Descrip...
分类:
其他好文 时间:
2015-11-24 16:11:51
阅读次数:
173
题意:一部电梯(共top层),每一楼有一个数字k,在该层只能上k层或者下k层(up和down按钮),问从当前层到目标层按按钮的最小次数。分析:广度优先搜索。总结:初写BFS,仿照别人的代码,这方面要继续加强。代码:#include#include#include#include#includeusi...
分类:
其他好文 时间:
2015-11-23 13:25:04
阅读次数:
192
本文记录go语言中如何返回匿名函数,被调用同时能保留其局部变量的值
分类:
其他好文 时间:
2015-11-22 18:43:27
阅读次数:
153
http://poj.org/problem?id=2891Strange Way to Express IntegersTime Limit:1000MSMemory Limit:131072KTotal Submissions:11970Accepted:3788DescriptionElina...
分类:
其他好文 时间:
2015-11-13 18:51:16
阅读次数:
338
Warning:your console font probably does not support unicode , if you experience strange characters in the output ,consider switching to a TrueType fon...
分类:
其他好文 时间:
2015-11-11 11:37:53
阅读次数:
183
I's very strange that I found the messy code.I 've never seen this before.this is the java code: /** * list * * @throws UnsupportedEnc...
分类:
其他好文 时间:
2015-11-04 13:16:27
阅读次数:
329
Leapin' LizardsProblem DescriptionYour platoon of wandering lizards has entered a strange room in the labyrinth you are exploring. As you are looking ...
S-TreesTime Limit:3000MSMemory Limit:Unknown64bit IO Format:%lld & %lluSubmitStatusDescriptionA Strange Tree (S-tree) over the variable setis a binary...
分类:
其他好文 时间:
2015-10-04 11:00:16
阅读次数:
219