黄学骏
黄学骏
全部文章
分类
题解(14)
归档
标签
去牛客网
登录
/
注册
黄学骏的博客
全部文章
(共14篇)
题解 | #PUBG#
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int ,int > PII; const int N = 110; int n; int g[N][...
最短路
2022-09-15
1
330
题解 | #Travel#
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 525020,M = 3 * N; int n,m; ll a[N*2],sum[N*2]; ll e[M],...
最短路
2022-09-05
2
466
题解 | #Chocolate Giving#
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int ,int> PII; const int N = 200010; int p,n,m; int...
最短路
2022-09-05
2
268
题解 | #[HAOI2006]受欢迎的牛#
//标记上时间后: //dfn[u]dfs遍历到u的时间(编号) //low[u]从u开始走所能遍历到的最小时间戳 //得先预处理出dfn和low //当一个强连通的出度为0,则该强连通分量中的所有点都被其他强连通分量的牛欢迎 //但假如存在两及以上个出度=0的牛(强连通分量) //则必然有一头牛...
2022-08-16
1
453
题解 | #受欢迎的牛#
//标记上时间后: //dfn[u]dfs遍历到u的时间(编号) //low[u]从u开始走所能遍历到的最小时间戳 //得先预处理出dfn和low //当一个强连通的出度为0,则该强连通分量中的所有点都被其他强连通分量的牛欢迎 //但假如存在两及以上个出度=0的牛(强连通分量) //则必然有一头牛...
2022-08-16
1
317
题解 | #秘密的牛奶运输#
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 510, M = 10010; int n,m; int e[N*2],ne[N*2],w[N*2],h[N],id...
最小生成树
2022-08-16
1
364
题解 | #走廊泼水节#
#include <bits/stdc++.h> using namespace std; const int N = 201000; int n,t; int p[N],cnt[N]; struct Node { int x,y,z; }st[N]; ...
最小生成树
2022-08-13
1
286
题解 | #北极通讯网络#
#include <bits/stdc++.h> using namespace std; typedef double ld; typedef pair <int,int> PII; const int N = 201000; int n,k,idx; ...
最小生成树
2022-08-13
1
410
题解 | #[USACO 2010 Dec G]Big Macs Around the World#
#include <bits/stdc++.h> using namespace std; typedef pair<double,double> PII; typedef double ld; const int N = 350010; int n,m,idx,A...
最短路
2022-08-06
1
312
题解 | #[USACO 2010 Dec S]Apple Delivery#
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> PII; const int N = 400100; int C,P,PB,PA1,PA2; int e[N],w[N],ne[N]...
最短路
2022-08-06
1
361
首页
上一页
1
2
下一页
末页