摘要:
#include<cstdio> #include<queue> #include<vector> #include<cstring> using namespace std; int n,m,k; int dis[100001]; vector<int>a[100001],zhi[100001]; 阅读全文
摘要:
题目描述 A 国有 n 个城市从 1 到 n 编号,在城市间有 m 条单向航线。 A 国首都位于编号为 w 的城市,现在 A 国政府希望在首都召开会 议,就想要让各地人民都能够通过若干条航线到达首都,那么至少需 要新建多少条航线?(可能有重边和自环) 输入输出格式 输入格式: 第一行三个整数 n,m 阅读全文
摘要:
有依赖背包 #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int maxn=55; const int maxv=100005; int tmp[maxv]; int f[max 阅读全文