递归与递推
文章平均质量分 69
Daemoonn
编程呵呵哒~~
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj2362 Square DFS剪枝
SquareTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 22779 Accepted: 7894DescriptionGiven a set of sticks of various lengths, is it possible to join原创 2016-03-09 19:01:05 · 535 阅读 · 0 评论 -
蓝桥杯历届试题 大臣的旅费 记忆化搜索DFS
历届试题 大臣的旅费 时间限制:1.0s 内存限制:256.0MB 问题描述很久以前,T王国空前繁荣。为了更好地管理国家,王国修建了大量的快速路,用于连接首都和王国内的各大城市。为节省经费,T国的大臣们经过思考,制定了一套优秀的修建方案,使得任何一个大城市都能从首都直接或者通过其他大城市间接到达。同时,如果不重复经过大城市,从首都原创 2017-03-27 22:50:42 · 783 阅读 · 0 评论 -
pat 1127. ZigZagging on a Tree (30) 递归建树 + BFS
1127. ZigZagging on a Tree (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose that all the keys in a binary原创 2017-03-04 19:54:09 · 693 阅读 · 0 评论 -
pat甲级 1020. Tree Traversals map递归建树 + BFS
先用map建立一棵二叉树,mr存右孩子节点,ml存左孩子节点,然后输出BFS路径就行了#include #include #include #include #include using namespace std;int N;int po[35], in[35], prin[35];int root, ip, len;map ml, mr;int solve原创 2017-02-22 15:32:16 · 871 阅读 · 0 评论 -
hdu1028 Ignatius and the Princess III 递推
Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17872 Accepted Submission(s): 12532Problem Descripti转载 2016-05-23 19:18:50 · 383 阅读 · 0 评论 -
UVa 297 Quadtrees 递归
#include #include #include using namespace std;const int maxn = 1024;const int len = 32;char s[maxn + 10];int buf[len + 5][len + 5], cnt;void draw(const char *a, int& p, int r, int c, int w原创 2016-05-17 10:20:46 · 457 阅读 · 0 评论 -
团体程序设计天梯赛-练习集 L2-006 树的遍历 根据后序中序建树+BFS
L2-006. 树的遍历时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越给定一棵二叉树的后序遍历和中序遍历,请你输出其层序遍历的序列。这里假设键值都是互不相等的正整数。输入格式:输入第原创 2016-05-17 09:04:06 · 2191 阅读 · 0 评论 -
codeforces 676B Pyramid of Glasses 递归
B. Pyramid of Glassestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMary has just graduated from one well-known Univ原创 2016-05-27 11:25:31 · 803 阅读 · 0 评论 -
hdu4283 You Are the One 区间dp 记忆化搜索or递推
You Are the OneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3032 Accepted Submission(s): 1352Problem Description The TV s原创 2016-04-23 21:28:10 · 1754 阅读 · 3 评论
分享