摘要: Prime Permutation codeforces 123A You are given a string s, consisting of small Latin letters. Let's denote the length of the string as |s|. The chara 阅读全文
posted @ 2018-10-07 22:59 *starry* 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 小字辈 (25 分) 本题给定一个庞大家族的家谱,要请你给出最小一辈的名单。 输入格式: 输入在第一行给出家族人口总数 N(不超过 100 000 的正整数) —— 简单起见,我们把家族成员从 1 到 N 编号。随后第二行给出 N 个编号,其中第 i 个编号对应第 i 位成员的父/母。家谱中辈分最高 阅读全文
posted @ 2018-10-07 18:14 *starry* 阅读(482) 评论(0) 推荐(0) 编辑