摘要:
题目 P1457 [USACO2.1]城堡 The Castle 思路 三遍DFS求解 代码 #include<bits/stdc++.h> using namespace std; int n,m; const int maxn=50+5; int a[maxn][maxn][maxn][maxn 阅读全文
摘要:
题目 狡猾的商人 思路 用spfa求解,查询当前是否合法,正向加正边,反向加反边。记得判负环。 #include<bits/stdc++.h> using namespace std; const int maxm=500+10,maxn=4000+10; int head[maxn],ver[ma 阅读全文