首页 > TAG信息列表 > vist

1021 Deepest Root(甲级)

1021 Deepest Root (25分) A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root is called the deepest root. I

P3953 逛公园

______________________________________________________________________________________________________ 绝望题目,一点一点从30--70--100,打完了所有部分分 【大部分时间都在查错 ————————————————————————————————————————————

OpenJudge 4001:抓住那头牛

题目链接 题解: 这个题可以用广搜来解决,从农夫到牛的走法每次都有三种选择,定义一个队列,把农夫的节点加进队列,然后以这三种走法找牛,队列先进先出,按顺序直到找到牛的位置。 代码: #include<iostream> #include<stdio.h> #include<queue> #include<cstring> using namespace std; int n,