摘要:
1.输到40是负的 11.longlong定义数组 22.递归是要先计算之前的 这里m也要是long long 否则还是-的 #include <bits/stdc++.h> using namespace std; long long f[45][3]; long long dp[45]; lon 阅读全文
摘要:
果然是天才的灵光一现 #include <bits/stdc++.h> using namespace std; int dx[4]={1,-1,0,0}; int dy[4]={0,0,1,-1}; int bfs(string st) { map<string,int>m; queue<stri 阅读全文
摘要:
也是深搜实现,进去看看这条路可以走吗 #include <bits/stdc++.h> using namespace std; int ans=0; int m[50]; int mm[50]; int j[50]; int arr[50]; int n; void print() { if(an 阅读全文
摘要:
自己到自己是0 标号不用改了 #include <bits/stdc++.h> using namespace std; int main() { int n,m; while(cin>>n>>m) { int tt=m; vector<vector<int> >d(n+1,vector<int>( 阅读全文
摘要:
双向建边 200*2 建两次防止超过 #include <bits/stdc++.h> using namespace std; int vis[205][205]; int visited[205]; int h[205];int idx=0; int n,m; struct node { int 阅读全文