2019年11月14日
摘要:
1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 int T; 7 cin >> T; 8 while (T--) 9 { 10 int a, b; 11 cin >> a >> b; 12 if ((a == 2 ||
阅读全文
posted @ 2019-11-14 10:19
thjkhdf12
阅读(172)
推荐(0)
摘要:
1 #include<iostream> 2 using namespace std; 3 4 template<class Type> 5 Type min(Type a, Type b) 6 { 7 return a < b ? a : b; 8 } 9 10 int main() 11 { 1
阅读全文
posted @ 2019-11-14 10:09
thjkhdf12
阅读(121)
推荐(0)
2019年11月9日
摘要:
1 #include<iostream> 2 #include<queue> 3 #include<cstdio> 4 #include<cstring> 5 #include<cmath> 6 using namespace std; 7 8 const int INF = 0x3f3f3f3f;
阅读全文
posted @ 2019-11-09 23:25
thjkhdf12
阅读(108)
推荐(0)
摘要:
1 #include<iostream> 2 #include<set> 3 #include<map> 4 #include<queue> 5 #include<algorithm> 6 using namespace std; 7 8 const int maxn = 100010; 9 int
阅读全文
posted @ 2019-11-09 00:17
thjkhdf12
阅读(143)
推荐(0)
2019年11月8日
摘要:
1 #include <iostream> 2 using namespace std; 3 4 typedef long long LL; 5 6 LL gcd(LL a, LL b) 7 { 8 if (!b) return a; 9 return gcd(b, a % b); 10 } 11
阅读全文
posted @ 2019-11-08 23:06
thjkhdf12
阅读(164)
推荐(0)
摘要:
int d[maxn]; int now[maxn]; int st,ed; void add_dinic(int u, int v) { e[++cnt].v = v; e[cnt].w = 0; e[cnt].nxt = head[u]; head[u] = cnt; } int dfs_din
阅读全文
posted @ 2019-11-08 22:46
thjkhdf12
阅读(147)
推荐(0)
摘要:
1 #include<iostream> 2 #include<queue> 3 #include<cstring> 4 using namespace std; 5 6 const int maxn = 60; 7 8 const int INF = 0x3f3f3f3f; 9 int n; 10
阅读全文
posted @ 2019-11-08 22:44
thjkhdf12
阅读(105)
推荐(0)
2019年11月7日
摘要:
1 #include<iostream> 2 #include<map> 3 #include<set> 4 #include<string> 5 #include<vector> 6 using namespace std; 7 8 string s, t; 9 vector<pair<int,
阅读全文
posted @ 2019-11-07 17:10
thjkhdf12
阅读(184)
推荐(0)
摘要:
1 #include<iostream> 2 #include<algorithm> 3 #include<map> 4 using namespace std; 5 6 map<int, int>cnt; 7 8 int main() 9 { 10 int T; 11 cin >> T; 12 w
阅读全文
posted @ 2019-11-07 12:32
thjkhdf12
阅读(143)
推荐(0)
2019年10月30日
摘要:
int dis_spfa[maxn]; bool vis_spfa[maxn]; queue<int>q_spfa; void spfa(int x) { mem(dis_spfa, 0x3f); mem(vis_spfa, false); dis_spfa[x] = 0; q_spfa.push(
阅读全文
posted @ 2019-10-30 17:29
thjkhdf12
阅读(98)
推荐(0)