10 2020 档案

摘要:#格式化输出 age = 18; print("我的名字是%s, 我的国籍是%s"%("小张","中国")); print("我的年纪:%d"%age); print("aaa", "bbb", "ccc"); print("www", "baidu", "com", sep = '.'); pri 阅读全文
posted @ 2020-10-18 12:02 楼主好菜啊 阅读(69) 评论(0) 推荐(0) 编辑
摘要:leedcode : https://leetcode-cn.com/problems/sum-of-distances-in-tree/ 思路 : 一遍 dfs 可以求到以任意一个点为根,所有点所含孩子的个数,cnt数组记录 考虑每一条边的贡献时,即此边左右节点数相乘 第2遍 dfs, 以其他点为 阅读全文
posted @ 2020-10-06 20:29 楼主好菜啊 阅读(136) 评论(0) 推荐(0) 编辑
摘要:推荐知乎 : https://zhuanlan.zhihu.com/p/69101372 阅读全文
posted @ 2020-10-06 17:25 楼主好菜啊 阅读(84) 评论(0) 推荐(0) 编辑
摘要://FILE *stdin1; //FILE *stdin2; //freopen("D:/p/BB/11.txt", "r", stdin); //freopen("D:/p/BB/22.txt", "r", stdin2); freopen("D:/p/BB/1_2.txt", "w", std 阅读全文
posted @ 2020-10-06 10:59 楼主好菜啊 阅读(1006) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示