
算法竞赛入门经典
Mustache_ACM
这个作者很懒,什么都没留下…
展开
-
《算法竞赛入门经典》6-6小球下落——二叉树的编号
6.3.1 二叉树的编号6-6 Dropping BallsA number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first visits a non-terminal node. It the...原创 2019-04-06 14:52:41 · 325 阅读 · 0 评论 -
《算法竞赛入门经典》6-7 Trees on the level UVA122——二叉树的层次遍历(宽度优先遍历BFS)
Trees on the level UVA - 122Trees are fundamental in many branches of computer science (Pun definitely intended). Current state- of-the art parallel computers such as Thinking Machines’ CM-5 ...原创 2019-04-06 16:50:19 · 344 阅读 · 0 评论 -
《算法竞赛入门经典》6-8树TREE UVA548——二叉树的递归遍历/深度优先遍历DFS
You are to determine the value of the leaf node in a given binary tree that is the terminal node of apath of least value from the root of the binary tree to any leaf. The value of a path is the sum o...原创 2019-04-06 21:12:25 · 270 阅读 · 0 评论 -
算法竞赛入门经典第四章(自顶向下,逐步求精 编写程序)
4-1古老的密码 //古老的密码 WRONG ANSWR #define maxn 100+10 int cmp(const void* a,const void* b){ return *(int *)a-*(int *)b;//从小到大排序 } int main() { char a[maxn]; char b[maxn]; while(scanf("%s %s",a...原创 2019-04-03 11:17:41 · 380 阅读 · 1 评论