01 2022 档案
发表于 2022-01-30 14:48阅读次数:57评论次数:0
摘要:一、code 初始化 int fa[N]; void init(int n){ for(int i=0;i<n;i++){ fa[i]=i; } } 查询 注:上溯到根父亲节点 int find(int now){ if(fa[now]==now){ return now; }else{ retur
阅读全文 »
发表于 2022-01-29 16:50阅读次数:32评论次数:0
摘要:一、原题链接 题目详情 - 1034 Head of a Gang (30 分) (pintia.cn) 二、题面 One way that the police finds the head of a gang is to check people’s phone calls. If there
阅读全文 »
发表于 2022-01-29 12:04阅读次数:33评论次数:0
摘要:一、原题链接 题目详情 - 1031 Hello World for U (20 分) (pintia.cn) 二、题面 Given any string of N (>=5) characters, you are asked to form the characters into the sha
阅读全文 »
发表于 2022-01-16 14:09阅读次数:34评论次数:0
摘要:一、原题链接 https://pintia.cn/problem-sets/994805342720868352/problems/994805458722734080 二、题面 With highways available, driving a car from Hangzhou to any
阅读全文 »