摘要:
时间:0.5s 空间:128M题目描述:给你一棵以1为根的树,求树的深度,如下的树深为5 输入格式:第一行输入一个整数n,表示树的总点数 第二行输入n−1个数,第i个数表示i+1的父节点标号输出格式:输出一个整数表示树的深度(根节点的深度为1)样例输入:... 阅读全文
摘要:
英文DescriptionThere is an objective test result such as “OOXXOXXOOO”. An ‘O’ means a correct answer of a problem and an ‘X’ means ... 阅读全文
摘要:
英文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... 阅读全文