摘要: 题目:https://pintia.cn/problem sets/994805342720868352/problems/994805424153280512 1053 Path of Equal Weight (30分) Given a non empty tree with root R , 阅读全文
posted @ 2020-02-10 22:40 musecho 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 本地能运行,但PAT显示编译错误 缺少头文件 变量取名不要使用C++库函数同名等此类关键词,例如:给数组取名 。会判定缺少头文件。 输出格式有误 阅读全文
posted @ 2020-02-10 22:39 musecho 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 更新至1115 注意 谨记一句话“ 所有变量使用前都要初始化赋值。 ” 经常碰到因为没初始化导致运算结果出错的情况,在C++中局部变量使用前一定要手动初始化,全局变量会默认初始化,但记来记去容易搞混,全部初始化吧。 变量尽量全放在开头定义 有时变量放在开头定义和就近定义的答案不一样 写代码时,设置最 阅读全文
posted @ 2020-02-10 14:53 musecho 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 1048 Find Coins (25分) Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal s 阅读全文
posted @ 2020-02-10 13:27 musecho 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequen 阅读全文
posted @ 2020-02-10 13:17 musecho 阅读(213) 评论(0) 推荐(0) 编辑