摘要:
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2723题意:给出一些字符串u,v,代表u->v,问有几条边是多余的,也就是说去掉那些边后,u仍能到达v。思路:穷举每条边,试着去掉该边,bfs搜索两个点是否仍然可达。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std; 10 char s1[210],s2[210],.. 阅读全文
摘要:
题目描述Sylvester Stallion is an old horse who likes nothing better than to wander around in the fields around his stable. Sylvester is a little single minded and will walk in a straight line unless there is a rock in this path. If that\'s the case, he does one of three things: 1) if there is no roc 阅读全文