摘要:
直接采用Dijkstra算法 #include<iostream> #include<vector> #include<cstdio> using namespace std; const int INF=1000000; int dis[500][500],mindis[500],cost[500 阅读全文
摘要:
采用DFS: #include<iostream> #include<vector> using namespace std; int N,M,C1,C2; int dis[500][500],mindis[500],num_of_team[500],paths,teams; vector<int> 阅读全文
摘要:
count函数可以用来统计字符串中某个字符的个数使用方法是count(begin,end,‘a’),其中begin指的是起始地址,end指的是结束地址,第三个参数指的是需要查找的字符。 #include <bits/stdc++.h> using namespace std; int main() 阅读全文