摘要: 时间:0.5s 空间:128M题目描述:给你一棵以1为根的树,求树的深度,如下的树深为5 输入格式:第一行输入一个整数n,表示树的总点数 第二行输入n−1个数,第i个数表示i+1的父节点标号输出格式:输出一个整数表示树的深度(根节点的深度为1)样例输入:... 阅读全文
posted @ 2018-07-21 21:11 ZJ_MRZ 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 英文DescriptionThere is an objective test result such as “OOXXOXXOOO”. An ‘O’ means a correct answer of a problem and an ‘X’ means ... 阅读全文
posted @ 2018-07-21 14:09 ZJ_MRZ 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 英文DescriptionFor a positive integer N, the digit-sum of N is defined as the sum of N itself and its digits. When M is the digitsu... 阅读全文
posted @ 2018-07-21 13:43 ZJ_MRZ 阅读(265) 评论(0) 推荐(0) 编辑