上一页 1 2 3 4 5 6 7 8 ··· 12 下一页
摘要: 给定一个 nn 个点 mm 条边有向图,每个点有一个权值,求一条路径,使路径经过的点权值之和最大。你只需要求出这个权值和。 允许多次经过一条边或者一个点,但是,重复经过的点,权值只计算一次。 第一行两个正整数 n,mn,m 第二行 nn 个整数,依次代表点权 第三至 m+2m+2 行,每行两个整数  阅读全文
posted @ 2021-05-28 21:27 _LH2000 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 题目大意:给出一张左上角点为(1,1),右下角点为(N,M)(上图中N=4,M=5).有以下三种类型的道路1:(x,y)<==>(x+1,y)2:(x,y)<==>(x,y+1)3:(x,y)<==>(x+1,y+1)n,m<=1000求最小割. 数据太大,网络流会很卡(不太清楚用一些玄学的底层优化 阅读全文
posted @ 2021-05-28 20:45 _LH2000 阅读(137) 评论(0) 推荐(0) 编辑
摘要: [HNOI2005]狡猾的商人 - 题目 - 黑暗爆炸OJ (darkbzoj.tk) 注意维护的是边而不是点 s需要-1 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int mod=9982443 阅读全文
posted @ 2021-05-27 12:43 _LH2000 阅读(39) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; typedef long long ll; namespace MCMF { const int MAXN = 10000, MAXM = 10000, INF = 0x7fffffff; int head[M 阅读全文
posted @ 2021-05-24 19:26 _LH2000 阅读(52) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; typedef long long ll; int G[1003][1003]; int match[1003]; int rb[1004]; int k,mg,nb; ll n; bool dfs(int x 阅读全文
posted @ 2021-05-24 09:11 _LH2000 阅读(27) 评论(0) 推荐(0) 编辑
摘要: // luogu-judger-enable-o2 #include<cstring> #include<cstdio> #include<queue> #define min(a,b) a<b?a:b #define N 10001 #define M 100001 using namespace 阅读全文
posted @ 2021-04-29 20:10 _LH2000 阅读(27) 评论(0) 推荐(0) 编辑
摘要: mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); double rnd(double l, double r){return uniform_real_distribution<double>(l,r)(rng) 阅读全文
posted @ 2021-04-22 15:59 _LH2000 阅读(79) 评论(0) 推荐(0) 编辑
摘要: //本模板是离散后对权值建树 #include<bits/stdc++.h> #define mid (l+r>>1) using namespace std; const int N=2e5+10; struct TR { int sum,lo,ro; }tr[N<<5]; int tr_cnt; 阅读全文
posted @ 2021-04-14 20:40 _LH2000 阅读(33) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 10; struct CMT { int seq[N << 1], rt[N], tot, m; struct { int l, r; long long sum; } 阅读全文
posted @ 2021-04-13 21:42 _LH2000 阅读(57) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/gym/102511/problem/A 题目大意: 给两个二元组 分别为 a1.first -an.first a1.second-an.second b1.first-bn.first b1.seocnd-bn.second 现在对两个二元组进行排序 阅读全文
posted @ 2021-04-09 20:41 _LH2000 阅读(62) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页