
递归与递推
文章平均质量分 69
Daemoonn
编程呵呵哒~~
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj2362 Square DFS剪枝
Square Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 22779 Accepted: 7894 Description Given a set of sticks of various lengths, is it possible to join原创 2016-03-09 19:01:05 · 508 阅读 · 0 评论 -
蓝桥杯历届试题 大臣的旅费 记忆化搜索DFS
历届试题 大臣的旅费 时间限制:1.0s 内存限制:256.0MB 问题描述 很久以前,T王国空前繁荣。为了更好地管理国家,王国修建了大量的快速路,用于连接首都和王国内的各大城市。 为节省经费,T国的大臣们经过思考,制定了一套优秀的修建方案,使得任何一个大城市都能从首都直接或者通过其他大城市间接到达。同时,如果不重复经过大城市,从首都原创 2017-03-27 22:50:42 · 760 阅读 · 0 评论 -
pat 1127. ZigZagging on a Tree (30) 递归建树 + BFS
1127. ZigZagging on a Tree (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Suppose that all the keys in a binary原创 2017-03-04 19:54:09 · 667 阅读 · 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 · 839 阅读 · 0 评论 -
hdu1028 Ignatius and the Princess III 递推
Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 17872 Accepted Submission(s): 12532 Problem Descripti转载 2016-05-23 19:18:50 · 362 阅读 · 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 · 432 阅读 · 0 评论 -
团体程序设计天梯赛-练习集 L2-006 树的遍历 根据后序中序建树+BFS
L2-006. 树的遍历 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 给定一棵二叉树的后序遍历和中序遍历,请你输出其层序遍历的序列。这里假设键值都是互不相等的正整数。 输入格式: 输入第原创 2016-05-17 09:04:06 · 2157 阅读 · 0 评论 -
codeforces 676B Pyramid of Glasses 递归
B. Pyramid of Glasses time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Mary has just graduated from one well-known Univ原创 2016-05-27 11:25:31 · 757 阅读 · 0 评论 -
hdu4283 You Are the One 区间dp 记忆化搜索or递推
You Are the One Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3032 Accepted Submission(s): 1352 Problem Description The TV s原创 2016-04-23 21:28:10 · 1709 阅读 · 3 评论