![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
广度优先搜索(BFS)
文章平均质量分 78
ZJ_MRZ
这个作者很懒,什么都没留下…
展开
-
XJOI 3326 树的深度again 题解
时间:1s 空间:128M 题目描述: 给你一棵以1为根的树,求树的深度 输入格式: 第一行输入一个整数n,表示树的总点数 第二行输入n−1个数,第i个数表示i+1的父节点标号 输出格式: 输出一个整数表示树的深度(根节点的深度为1) 样例输入: 4 1 2 3 样例输出: 4 约定: 1<=n<=100000 提示: 此题是XJOI 332...原创 2018-07-23 10:39:54 · 565 阅读 · 0 评论 -
XJOI 3330 Knight moving 骑士出行 题解
英文 Time Limit:1s Memory Limit:256M Description Please calculate the least steps knight moves from one position to another. Input The first line is an integer n,represent a n*n chess board(x...原创 2018-07-13 15:04:26 · 731 阅读 · 0 评论 -
XJOI 3585 The rescue plan 营救计划 题解
英文 Time Limit:1s Memory Limit:256M Description Given a n*m map.A “Mengxin” is trapped.You are the one to rescue him.In the map,there are some guards,you must defeat the guards to get your way.D...原创 2018-07-13 15:41:46 · 1195 阅读 · 0 评论